-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enter VR button is not working on Android WebView #1940
Comments
Possibly related to: #1933 |
Also related to immersive-web/webvr-polyfill#114 |
This might be a tricky one. I have bypassed the fullscreen problem, then a problem with the orientation lock not being available on the webview. The Enter VR mode button then disappears for the rest of the session, without leaving any console log. |
Just the same thing happens to me (same console output) + "Enter-VR" not possible in Chrome 4.2 on an Android LG 5. However with Chrome 4.3 (Beta) works ok... |
I think that is because Chrome Beta supports the WebVR 1.0 spec and prod does not. Eventually, the webview will support the spec, but there will still be problems with a-frame because of the fullscreen indicator and orientation lock code. |
This is still broken in v0.4.0 and on the master branch. In v0.2.0 it was working perfectly. |
0.4.0 has a nicer message: |
It didn't work because the calls to go into fullscreen failed, and then orientation lock. You can't control these things with javascript because they are app settings. |
This is because the WebView doesn't support vrDisplay, and aframe doesn't support browsers that don't support vrDisplay. A potential fix is to use a-frame 0.2.0 code for presenting as a fallback. |
Sorry, I don't understand the problem. Chrome (not the Chromium WebVR builds), Firefox (not Nightly), Edge or Safari don't support VRDisplay and a-frame works fine. The polyfill should kick in in all those cases. What's different in a webview? |
We don't do Android development in the a-frame team so we cannot test webviews easily. If someone can investigate and provide a fix we will take it |
Sorry, I'm not very familiar with the codebase. Where is the polyfill located? Ahh, it seems to be in index.js - I will have a look into it. |
OK, looks like a simple fix for the webvr-polyfill project. I will submit a pull request with them and keep this bug open to make sure we update the dependency on a-frame. |
Hmm, it looks like the changes were submitted and denied. WTF. |
Description:
A-Frame used to work fine in version 0.2.0
My app runs by default in fullscreen.
When I try clicking on the Enter VR button this error is output in the console:
a-scene.js:175 Uncaught (in promise) Error: Failed to enter VR mode (
requestPresent): Unable to present.(…)enterVRFailure @ a-scene.js:175
The text was updated successfully, but these errors were encountered: