当我运行以下命令时
navigator.xr.requestDevice()
在chrome (Version67.0.3396.62(正式构建)(64位))开发工具的控制台中(启用所有 WebXR标志并重新启动浏览器),我将收到此错误。
Uncaught (in promise) DOMException: No devices found.这个示例代码也不起作用..。https://github.com/immersive-web/webxr-samples/blob/master/xr-barebones.html
我在桌面和移动Chrome浏览器上试过这个。
为什么Chrome67中的WebXR API不能工作?
谢谢
发布于 2018-06-27 22:27:17
您将不得不使用来使用WebXR api。在相当长的一段时间内,它将无法在稳定的环境中使用。一旦你有Canary (目前的版本是: 69.0.3)。您必须启用#webxr和#webxr-hit-test标志。
一旦你有了它。转到这个URL来测试API,它应该对您有用。
https://immersive-web.github.io/webxr-samples/proposals/phone-ar.html许多旧的API现在不能工作了。所以,不要忘记查看源代码。
https://github.com/immersive-web/webxr-samples/blob/master/proposals/phone-ar.htmlhttps://stackoverflow.com/questions/50623074
复制相似问题