Search code examples
androidgoogle-vr

Android VR SDK expose ExoPlayer


I'm using the VR sdk and when trying to play an online video (working on iOS), it gives this error

Internal track renderer error. com.google.android.exoplayer.ExoPlaybackException: com.google.android.exoplayer.extractor.ExtractorSampleSource$UnrecognizedInputFormatException: None of the available extractors (WebmExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream.

that sounds like something I could provide to the ExoPlayer if I could have direct access to it.

Is there any way I can configure the player using the VR SDK?

Is there an alternative way for a 360 video player in Android?

Thanks in advance


Solution

  • Turns out I can flag the video as HLS this way:

    VrVideoView.Options options = new VrVideoView.Options();
    options.inputFormat = VrVideoView.Options.FORMAT_HLS;
    

    and then just

    vrVideoView.loadVideo(VIDEO_URI, options);