Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport exiting immersive mode #24075
Comments
|
@asajeffrey is there a JS API that exits a webxr session? I wonder what happens if a page invokes that on a timer, since we don't have any input support yet. |
|
@jdm the relevant JS API is session.end() https://github.com/servo/servo/blob/master/components/script/dom/xrsession.rs#L395 |
Yes. |
|
@jdm I get an exception going to immersive mode:
|
|
@jdm which webxr demo do you use for your tests? |
|
@paulrouget That's #24061. I recommend using https://www.joshmatthews.net/webgl-to-webxr/webxr-ar.html. |
|
Any idea what I might be missing:
|
|
Have you installed the OpenXR package from the windows store? That needs to happen every time the emulator is restarted. |
|
Yes I did. Still trying to figure out why it can't find openxr. |
|
Never mind, I didn't fully install the runtime. |
|
It is usable after leaving the immersive mode. I can navigate to a new page, scroll and click. The problem appears to be only with the page that initiated the immersive mode. |
|
Is requestAnimationFrame paused for 2D webgl content when switching to immersive mode? |
|
The 2d rAF should still be running after you entered immersive mode. This is needed for devices where the browser window is still visible when there's impressive content running, e.g. a desktop browser with an attached headset. |
|
I could use some help here. When we leave the immersive mode, servo get stuck here: Not in the callback, but in Any clue? |
|
Yeah, that should be calling https://github.com/servo/webxr/blob/bf4e5a541bb2fcbace61cb1a071959bab10d9c19/webxr-api/session.rs#L250 :/ |
|
What needs to work:
Testing 2 demos: bbjs basic, and webvr-ar. bbjs demo:
webxr-ar demo:
When using webvr-ar demo, when leaving the immersive mode via |
|
Not getting the block issue anymore with openxr version 100.1908.0.3002 |
|
One of the issue with the RAF not being called in the webxr-ar demo was an issue with the demo itself. RAF is properly called but nothing is rendered (keeping in mind that in the case of the bbjs demo, the webgl canvas is properly updated). |
|
Other issue with webxr-ar is that 1) viewport is not reset 2) after the IM session, it's still bound to xrLayer.frameBuffer. |
|
webxr-ar demo updated: http://paulrouget.com/test/webxr-ar.html |
|
With latest master + latest openxr + latest demos, "it works". Will be filing specific issues for remaining problems. |
When I'm immersive mode on the HL I can open up the windows menu and press the home button to take me out of immersive mode, but Servo no longer appears to be usable when I do this. We should figure out how to support this properly.
@paulrouget Do you have time to look into this?