Consider allowing VR when fullscreen isn't supported
See original GitHub issueBrowser: Safari or Chrome Operating System: iOS 13 Sandcastle example: https://sandcastle.cesium.com/gallery/Cardboard.html
Hi, I have been working with Cesium on a personal project for a couple of weeks now and didn’t wanted to report this until I had a more comprehensive knowledge of everything around WebVR / WebXR.
Thing is Cesium just don’t work on iOS as it was supposed to be. It doesn’t show the vrButton
or fullScreen
buttons when you configure the Cesium Viewer with those options. It does not even work in the original Cardboard Sandcastle demo (linked above).
I suspect this has something to do with how iOS require apps to mandatory get the user actively triggering grant permission. AFrame had the same issue described here and here and they solved it requesting those permissions on this PR.
Is this what could be happening to you? It makes sense if Cesium doesn’t detect motion capabilities on the device (because iOS will return false if user isn’t prompted), so it wont show/allow VR features. Can you please confirm?
PS: I have created a workaround for this based on this “Synced Views Sandcastle” and “this guy’s approach to sync deviceMotion-Viewer”, and I have a “working version” of stereo view 3d/VR Cesium at my app, so its definitely something doable, but obviously i’d prefer having it working “the proper way”.
Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
I believe the reason the VR button doesn’t appear on iOS is because the fullscreen API isn’t supported. See https://caniuse.com/#feat=fullscreen. Notice iOS 13 has only partial support (for iPads, not iPhones).
This is where the VR button checks if fullscreen is allowed and decides whether to hide it: https://github.com/CesiumGS/cesium/blob/d781f6f7fc971757436c566da769a5e174bf488a/Source/Widgets/VRButton/VRButtonViewModel.js#L157
This is where CesiumJS detects if fullscreen is allowed:
https://github.com/CesiumGS/cesium/blob/d781f6f7fc971757436c566da769a5e174bf488a/Source/Core/Fullscreen.js#L118
In your workaround, does the URL address bar still appear at the top of the page when running your VR mode?
I think that would be my approach yeah. If you can open that PR and provide some screenshots/instructions on testing it that can help elicit some feedback from others on this change.