CesiumGS / CesiumGS/cesium

Consider allowing VR when fullscreen isn't supported

Open
#8,746 5 comments 0 reactions 0 assignees View on GitHub
type - enhancement
Dominant language
JavaScript
Stars
15.7k
Forks
3.9k
Avg merge
4d 6h
Merged PRs (30d)
34

Description

**Browser:** 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](https://github.com/aframevr/aframe/issues/4277) and [here](https://github.com/aframevr/aframe/issues/4287) and they solved it requesting those permissions [on this PR](https://github.com/aframevr/aframe/pull/4303).

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" ](https://sandcastle.cesium.com/gallery/Multiple%20Synced%20Views.html) and ["this guy's approach to sync deviceMotion-Viewer"](https://groups.google.com/forum/#!topic/cesium-dev/efDWVKhry3Y), 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.

Contributor guide

Open the contributing guide

Research direction

Start with the Cardboard Sandcastle example and the Cesium Viewer options for vrButton and fullScreen. Reproduce the behavior on Safari or Chrome with iOS 13 and compare whether VR is incorrectly gated by fullscreen support or motion-permission detection. Done means the intended VR behavior is available when fullscreen is unsupported and the result is verified in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
ar-vr-xr, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.