googlevr / gvr-android-sdk

Google VR SDK for Android
http://developers.google.com/vr/android/
Other
3.28k stars 1.29k forks source link

Video Player sample wants DayDream #523

Open MrCsabaToth opened 6 years ago

MrCsabaToth commented 6 years ago

I'm not sure if it's only some problem with with my device - a OnePlus 3t - but I'd expect the video player to work with "plain" card board as well. Unless the API really requires DayDream...

jdduke commented 6 years ago

Hi @MrCsabaToth, the VideoPlayer sample does currently require a Daydream-ready device. Part of the problem is that the OnePlus 3t has declared itself as a Daydream-ready device, but it hasn't actually undergone Daydream-ready certification, so not all of the associated software features may work correctly. Are you able to install the Daydream app from the Play Store?

sigmaxipi commented 6 years ago

The sample as written does require Daydream since it uses Daydream-specific functionality like the controller and VR transitions. However, you can remove the Daydream functionality if you want it to work on plain Cardboard.

To do this:

  1. Delete the Daydream entries from AndroidManifest.xml
  2. Delete the DaydreamApi code from VideoActivity. This is only used to perform Daydream transitions into VR. You can use standard Android Intents for a Cardboard launch.
  3. Create a new version of VrVideoActivity that doesn't use DaydreamApi or ControllerManager. You'll need to use the gaze and tap code from the Treasure Hunt sample instead of the controller input.
jdduke commented 6 years ago

Also, would you mind sharing what Android build you're using with the OnePlus 3t? Are you by chance using OxygenOS or one of the other mod flavors that has manually marked the device as being Daydream-capable?

MrCsabaToth commented 6 years ago

@sigmaxipi That really valuable input, could we add this into a README next to that particular sample? I can make a PR as well.

MrCsabaToth commented 6 years ago

@jdduke I'm going with the "stock" OxygenOS Open Beta 20 (that's the latest) right now. And at this point I'm with the OnePlus's recovery, but back in the summer I was demoing DayDream for a bunch of people and I had it rooted, TWRP recovery and I used the two liner DayDream hack. (OP 3t after all is as powerful as a Pixel XL, with actually more memory. I know that the latency can be different but in my eyes the lower resolution is even an advantage regarding heat and speed, although it decreases quality). Anyways, the past of the device may have to do something with this. Since it was daydream hacked I had at least 4 OS updates. Right now I'm not rooted, but I haven't deleted any Android apps which were installed before for DayDream (I think it's one or two core apps from the App Store). Sorry about that.

MrCsabaToth commented 6 years ago

@sigmaxipi I'll possibly try to make that change, it could be a variation of the existing example if embraced. A lot of people are not DayDream compatible, so they can benefit from that.

sigmaxipi commented 6 years ago

I'll add a section to https://developers.google.com/vr/android/samples/video360 about converting the sample into a Cardboard app.

sewasewa777 commented 5 years ago

523