I am trying to develop a VR video player using latest Google VR SDK for Android (v1.0.3), but there is no high-level API to build VR playback controls.
YouTube VR player uses old version of gvr toolkit and renders controls (for example, com.google.android.libraries.youtube.common.ui.TouchImageView
) in some way.
What is the best way to implement such controls using latest VR SDK? Do I need to use custom renderer with OpenGL or NDK?
I would be very grateful for implementation details.
The YouTube VR app allows you to easily find and watch 360 videos and virtual reality content with certain headsets and devices. Note: the instructions below are for users with the Daydream View controller.
Search for videos You can search for videos in YouTube VR in two ways: Voice Search or keyboard search. Search is found in the player controls Menu or from the Home screen. Voice Search Click Search .
The YouTube Android Player allows you to customize the playback control by setting one of the style defined in YouTubePlayer.PlayerStyle enumeration. It currently support three styles DEFAULT, MINIMAL or CHROMELESS; YouTubePlayer.PlayerStyle.DEFAULT – The default style, showing all interactive player controls.
The first thing we need to do is to create a 3D environment that we can use to test our VR application. Doing this is thankfully very simple. First: start a new project and make sure you tick the box to make it a 3D project. Now, once in the editor, choose GameObject > 3D Object > Plane.
GVR SDK does not provide a way do draw something over VrVideoView, so we need to implement VR video by ourselves.
The main idea of solution - use GvrView with custom StereoRenderer. First of all, we need to implement VR video renderer (using VR shaders and MediaPlayer/ExoPlayer).
Then we need to implement custom controls on the scene using OpenGL ES and GVR SDK (HeadTracking, Eye, etc.).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With