immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
381 stars 84 forks source link

Polyfill for AR? #73

Open pampas93 opened 5 years ago

pampas93 commented 5 years ago

I'm trying to create an AR test from the latest chrome stable (76.0.3809.111) browser on my pixel 2, but after enabling all the WebXR flags, I get an exception while calling the navigator.xr.requestDevice() with TypeError: navigator.xr.requestDevice is not a function

I get the above error with and without using the webxr-polyfill.js within my loading page. Any idea if or how and get around this? Or is it just implemented for supporting VR for now?

The above works fine on the Chrome Dev (71.0.3574.0).

jsantell commented 5 years ago

The latest WebXR spec no longer has requestDevice API, and Chrome 76-77(ish) are targeting this newer version, as well as the polyfill. The AR features are still being developed, and there's not yet anyway to polyfill those (tracking in https://github.com/immersive-web/webxr-polyfill/issues/22). This repo will be updated once the implementation has stabilized in a browser