How to enable cardboard mode in Youtube Android Player API? - android

I want to enable viewing 360-degree videos from Youtube inside my app in the cardboard mode which splits the video into two halves for the two lenses in a Google cardboard, like in the Youtube app. I'm using Youtube's Player API for Android to show youtube video's in my app but I don't see any option to enable cardboard mode in the YouTubePlayer interface docs.
Please advice how can this be done.
Thanks

Seems that Google VR is now much more easy to use as they provide all the tools you need through the Android SDK.
Seems also that equirectangular format is the most widely accepted format now.
See: https://developers.google.com/vr/android/samples/video360

Related

Support for SBS left/right videos with Google VR SDK

I have some side-by-side left/right videos (in mp4 format) and my employer wants me to make an app that use the Google VR SDK to play videos for CardBoard users.
Can the Google VR SDK play these videos (without anything to do my self for the rendering) by taking the left side of the video for the left eye and the right side of the video for the right side?
I see that there's a VrVideoView class that has a loadVideo method that takes a VrVideoView.Option. In these options, there's a TYPE_STEREO_OVER_UNDER.
In order to be clear my questions are:
Has the Google VR SDK a viewer that can play SBS Left/Right video ?
If not, has the Google VR SDK a viewer that can play a SBS Over/Under video?
If yes, should i say my employer "instead of doing SBS left/right videos, you should do SBS Over/Under videos in mp4 format because they are directly handled by the Google VR SDK" ?
Thanks for your help.
So, if the you want to play a 360° stereoscopic over/under video, the VrVideoView can play it.
If you want to play normal stereoscopic videos, you have to manage the rendering by yourself and take the good part of the video each time you do the renderring for an eye.
Quick and dirty example :
https://github.com/Zanfas/Cardboard_VideoPlayer

How to create dual view for Youtube in Android VR app?

I want to create an app that allows you to watch regular Youtube videos in a VR headset (that's normal videos, not VR 360 videos).
Does anyone know how to embed two youtube viewers in the same activity, playing the same video to create the stereoscopic views for a VR type app?
It doesn't seem you can do with with the Youtube Android API as it only lets you play one Youtube viewer at a time.
It's definitely possible, as this app shows ...
https://play.google.com/store/apps/details?id=com.ekm.youtubevr3dvideos
Thanks in advance.
As stated by #Tempus, you can use the Google Cardboard which lets you experience virtual reality in a simple and fun way. With Cardboard and the YouTube mobile app, you can even watch 360 degree videos for an immersive experience.
Also, you can check this documentation on how to embed VR view.
VR View sample code:
There are two sample apps which demonstrate the VR View functionality in the SDK: simplepanowidget and simplevideowidget. Both of these samples are single activity applications that display an embedded panoramic image or video using VrPanoramaView and VrVideoView, respectively.

Is there anyway to Embed youtube 360 video to Android

I want to live stream a 360 video to my android app.
The main function of the app is to watch live 360 videos.
I tried using the YouTube API, but it does not work as it doesn´t render the video. I tried using the Google VRVideoView from the cardboard API. But it seems it can´t parse YouTube URI.
Is there any way I can do this? Or any alternative platform that supports 360 video steaming on mobile?
I have used Pan frame SDK to play 360 video in Android App. I have updated the complete source code in Github,
https://github.com/JayaprakashR-Zealot/360VR
Please let me know if you find any issues.

Load 360 degree video on youtube using VrVideoView (Google VR SDK)?

I want to load a 360 degree video, which is on youtube, in an native android app using VrVideoView (Google VR SDK).
Looking at the android api reference here, it doesn't seem to be supported,
but it seems to be available for iOS version?
Is there anyway to do this on android? Thanks
You can't play YouTube videos in custom video player because of YouTube content policy.
Even if you get video stream URL, your application will be rejected from Google Play.
The only thing you can do is to use Android YouTube player API
In the case of a 360 YouTube video it is 'Mono 360 uses a single pano.'
You can solve this problem by changing VrVideoView.Options
VrVideoView.Options options = new VrVideoView.Options();
options.inputType = VrVideoView.Options.TYPE_MONO;
videoWidgetView.loadVideoFromAsset("<your local youtube video>", options);
if you are not integrated sdk yet here is the .
link
for more info link

Streaming Video From Vimeo to Android

I am looking for a way to stream my videos from vimeo.com to android phone, their API is only available for Web, I have also tried to embed their player in WebView but that way I can see the thumbnail but video won't play, I am using Android 2.2 and Have Flash Player installed.
Is there way to make embedded players work on android or any other better way to do it?
You don't have to use the adv api to play vimeo videos. This is the video url the oembed api uses. I managed to get this rendering and playing in webview.
http://player.vimeo.com/video/<VIDEO_ID_GOES_HERE>?player_id=player&title=0&byline=0&portrait=0&autoplay=1&api=1
Also worth checking flash player is enabled and installed
No you have to use the advanced api and have the user get authorized ive have been trying to find a way around this but have not
the real url would be something like this
http://player.vimeo.com/play_redirect?quality=mobile&clip_id=s00000000&time=1318531921&sig=4c8a2fcb3303c5b76112046e84f516f8&type=mobile_site
not
player.vimeo.com/video/0000000
which the sig is passed after your set up the oauth with the advanced api which is your key and secret after authorization

Categories

Resources