-
Notifications
You must be signed in to change notification settings - Fork 25
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
Bypassing Enter AR / Enter VR button by default #224
Comments
After a lot of fumbling around, I found when using the Immersive Web Emulator, the UA doesn't actually check if the |
A test I made was trying to persist the XRSession on the parent frame and reuse on subsequent calls, however the WebXR Polyfill has a lot of checks to see if the instance is actually an XRSession. On a new iframe run the polyfill is run again and the prototype is not the same, so it fails on these sort of tests. I tried messing around with the prototype chains to fool it to work, but there would probably be a lot of unintended consequences. if (!(session instanceof XRSession)) { I believe that the parent.frame XR Session persistance should work on real devices though, but still need to validate the approach. |
OK, so I've been thinking a lot about this, and IMO the default behavior should be attempting to start a session without a user action directly.
This accounts for most use cases. A flag would need to deactivate this in case somebody wants to see the normal user flow. I found a flag on the Meta Quest Browser to deactivate the need for a user action to launch the experience, meaning that after a hard reload, a new immersive session should be started immediately. However, this might not be fluid, and maybe hosting the session on the parent iframe would also be necessary, but this would be a second step. |
This was done and documented in 47695b8 Hopefully it's easier to develop now. I left the default behaviour with |
Feature enhancement details:
While developing, repeatedly pressing the Enter AR button can be tedious. Transitioning from inline to immersive sessions can help with this in the case of VR, but it's not the ideal solution.
Once a user has granted permission on a webpage, they ideally shouldn't be asked for it again. However, due to security concerns, this is currently not possible. The WebXR navigation proposal is expected to address this in the future, with the meta quest browser being the only current implementation. It would be ideal to have a solution that works while coding on a computer.
A potential initial implementation that could be more useful is for web editors like the p5 web editor or P5LIVE, leveraging the use of iframes. Theoretically, it might be possible to request an immersive session on the parent window of the sketch and recreate the rendering context with the parent window still running the immersive session.
More details here:
immersive-web/navigation#17
ffd8/P5LIVE#95
The text was updated successfully, but these errors were encountered: