Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Dpoletaev's avatar
Dpoletaev
Honored Guest
6 years ago

WebVR getVRDisplays() error

Hello!
I have a problem with WebVR API, when I call a getVRDisplays() Oculus Browser returns error: Uncaught (in promise) DOMException

Code:
navigator.getVRDisplays().then(displays => {
if (displays.length) {
VRManager.display = displays[0];
console.log("VR api found " + VRManager.display.displayName);
}
});

but in Firefox Reality it works great, appearse only in Oculus Browser.
Maybe someone know where is a problem may be, thanks for help!
No RepliesBe the first to reply