aframe icon indicating copy to clipboard operation
aframe copied to clipboard

Show a screen when in VR but holding the phone in portrait mode

Open floostmodern opened this issue 9 years ago • 3 comments

Description:

  • A-Frame Version: 0.5.0
  • Platform / Device: Any device where that has no dedicated display for VR
  • Reproducible Code Snippet or URL: -

I am trying to get a message to show when a user has its mobile phone in VR mode but holds it inin portrait position. I see that there is some code in aframe/src/components/scene/vr-mode-ui.js:136 to do this. Unfortunately, it is never triggered, because when entering VR the scene locks the phone in landscape mode (aframe/src/core/scene/a-scene.js:246)

Are there any plans to make this feature available again by not locking the orientation of the phone ? I believe it would be better from a UX perspective.

floostmodern avatar Aug 24 '17 08:08 floostmodern

This should work:

img_5523

Let us know if you have more details.

ngokevin avatar Aug 24 '17 16:08 ngokevin

I have done further research and I think I understand now, I'll share its results here in case it helps some fellow developers.

The browser on which I want this feature to work is Chrome for Android. With a vanilla version of the browser, I am able to reproduce the bug as shown here :

img_20170825_100036

But there is a caveat. When the WebVR flag (in chrome://flags) is enabled, the WebVR viewer changes :

  • When the flag is turned off, a bespoke viewer is used screenshot_20170825-123411
  • When the flag is turned on, the Cardboard Viewer is used screenshot_20170825-142655

The Cardboard Viewer will end up being the default one, and its behaviour cannot be changed via HTML code. So this feature cannot be implemented on it. It might be interesting to implement it on the "bespoke" viewer, though.

floostmodern avatar Aug 25 '17 13:08 floostmodern

@ngokevin any thoughts on the above ?

floostmodern avatar Aug 29 '17 11:08 floostmodern