Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: How to create YouTube-like VR-controls?

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.

enter image description here

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.

like image 582
Nick Avatar asked Nov 11 '16 09:11

Nick


People also ask

What is the YouTube VR app?

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.

How to search for videos in YouTube VR?

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 .

How to customize the playback control in YouTube android player?

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.

How to create a VR application in Minecraft?

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.


1 Answers

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.).

like image 182
Nick Avatar answered Sep 21 '22 15:09

Nick