MozillaReality / WebXR-emulator-extension

INACTIVE - WebXR emulator extension
Mozilla Public License 2.0
463 stars 55 forks source link

devicechange event? #253

Closed ashconnell closed 2 months ago

ashconnell commented 4 years ago

Setting up an event listener like below doesn't seem to capture any change when switching the device in the WebXR extension tab. It seems to only pick up the change after a refresh:-

navigator.xr.addEventListener('devicechange', event => {
  console.log('XR device changed!')
})

Should this be working or is it not implemented yet?

ashconnell commented 4 years ago

I should note the reason i'm looking for this functionality is so that I can test enabling/disabling a "VR" button at runtime, while devices are connected and disconnected. Without the user needing to refresh.

takahirox commented 4 years ago

Hi, thanks for the report!

Yes, it's a known issue (I forgot to open an issue) and not implemented yet. Hopefully we want to support it within the next two releases.

Kind of Related: #126 #127