Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome WebXR在Chrome 67中不工作(启用所有XR标志)_Google Chrome_Webvr - Fatal编程技术网

Google chrome WebXR在Chrome 67中不工作(启用所有XR标志)

Google chrome WebXR在Chrome 67中不工作(启用所有XR标志),google-chrome,webvr,Google Chrome,Webvr,当我运行以下命令时 navigator.xr.requestDevice() 在chrome(版本67.0.3396.62(官方版本)(64位))开发工具的控制台中(在启用下的所有WebXR标志后)chrome://flags 并重新启动浏览器)我收到此错误 Uncaught (in promise) DOMException: No devices found. 此示例代码也不起作用。。。 我在桌面和移动Chrome浏览器上试过这个 为什么WebXR API在Chrome 67中不起作用

当我运行以下命令时

navigator.xr.requestDevice()

在chrome(版本67.0.3396.62(官方版本)(64位))开发工具的控制台中(在启用下的所有WebXR标志后)chrome://flags 并重新启动浏览器)我收到此错误

Uncaught (in promise) DOMException: No devices found.
此示例代码也不起作用。。。

我在桌面和移动Chrome浏览器上试过这个

为什么WebXR API在Chrome 67中不起作用


谢谢

您必须使用Chrome Canary才能使用WebXR api。在很长一段时间内,马厩里都不会有。 一旦你有了Chrome金丝雀(目前的版本是:69.0.3)。您必须启用
#webxr
#webxr命中测试
标志

一旦你有了它。 转到此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.html