aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.69k stars 3.98k forks source link

The version 1.3.0 a-frame does not work in WebView on Android when switching to VR mode #5020

Closed jhfrek closed 2 years ago

jhfrek commented 2 years ago

The version 1.3.0 a-frame does not work in WebView on Android 7 when switching to VR mode. Black screen. Without VR mode, it works. Version 1.0.1 works fine both in VR mode and without VR mode. No one knows if something needs to be done in WebView for the new version 1.3.0, or is this a-frame not working? Why does everything work in version 1.0.1, but does not work in VR mode in version 1.3.0?

When switching to VR mode, it shows this:

https://i.stack.imgur.com/eppJE.jpg

dmarcos commented 2 years ago

Android 7 seems to be pretty old and afaik it predates the WebXR API that now A-Frame supports. Have you tried in newer versions?

ddaydd commented 2 years ago

same,

https://aframe.io/docs/1.3.0/introduction/faq.html#why-is-my-experience-not-entering-vr-or-ar-mode If you are using A-Frame 1.3.0 or older you probably need to update to the latest.

I do not understand the 1.3.0 is not the latest?

Edit: I will try with tick and no longer requestAnimationFrame

dmarcos commented 2 years ago

1.3.0 is the latest. We should probably reword the docs. Sorry for that.

FWIW requestAnimationFrame no longer fires in WebXR (as it did in WebVR) when in an immersive session. Using tick should work. But I have no context about your issue.

To clarify, when I meant trying newer versions I meant newer versions of Android. Reported issue mentions Android 7: released in 2016 and last patch in 2019

jhfrek commented 2 years ago

Android 7 seems to be pretty old and afaik it predates the WebXR API that now A-Frame supports. Have you tried in newer versions?

Yes! Android 9 doesn't work either. Black screen.

dmarcos commented 2 years ago

Is WebXR available in a WebView?

jhfrek commented 2 years ago

Is WebXR available in a WebView?

Yes, android webview does not support WebXR. This is very bad.

dmarcos commented 2 years ago

I don't think we can do anything on A-Frame side. Hopefully WebXR is one day available on a WebView context. Closing this and can reopen if necessary.