WebXR-emulator-extension
WebXR-emulator-extension copied to clipboard
How to interact with native WebXR API supported by browser
Some WebXR API needs to recognize XR device, for example supportsSession(mode) checks if device supports the specified mode. Probably need to investigate how emulated XR device can be recognized by WebXR API supported by browser.
Will we always override XR with polyfill XR?
Always overriding so far and I added a note about it to readme.
Maybe I should send the feedback about this issue for test purpose to WebXR API (or somewhere else).
An idea from Kip. We may use WebXR Test API when it's available.
https://github.com/immersive-web/webxr-test-api https://github.com/immersive-web/webxr-test-api/blob/master/explainer.md
If you want to try similar stuff now, we may use VRServiceTest on Firefox with browser flags
dom.vr.puppet.enabled = true
dom.vr.process.enabled = false
Refer to VRPuppetCommandBuffer.h and VRServiceTest.webidl for API.
Another option may be talking to devtool team to see if we can directly embed WebXR emulator extension to browser where it may have access to Testing API, I'm not really sure if Firefox/Chrome accept tho.
That sounds like a giant change. Let's put this on the backburner for now.
Yes, this should be far future work because I researched and realized that there is no easy way to work with the native API noe.