Exception
Exception

Reputation: 2323

Load 360 degree Youtube video using VrVideoView

I want to stream a 360 video from YouTube in my android app using VrVideoView. I have searching about this for some time but haven't really found a question with accepted or highly voted answer. Even on google developer website, I only found this statement.

A remote URL with a http or https scheme, such as "http://foo.com/file.mp4". HLS URLS (e.g. "http://foo.com/file.m3u8") are supported but require the correct input format to be set in the VrVideoView.Options object.

Someone please help me figure out whether it is possible or not? If possible, then How do I do it?

Thanks in advance!

Upvotes: 2

Views: 1267

Answers (2)

overlord1234
overlord1234

Reputation: 2536

For the options object, you can use

    Options options = new Options();
    options.inputFormat = Options.FORMAT_HLS;
    options.inputType = Options.TYPE_MONO; // for 360 video
    // options.inputType = Options.TYPE_STEREO_OVER_UNDER; //for 3D 360 video
    videoWidgetView.loadVideo(youtubeURI, options);

For more reference, you can refer to documentation available at Google VR

or refer to the simple video widget sample in Google VR SDK

Upvotes: 1

Christopher
Christopher

Reputation: 71

to play video in VrVideoView you need to get the direct url to video, you can do this with tool like youtube-dl but this tool needs python, try to find another way to get the url

Upvotes: 0

Related Questions