This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The activeVRDisplays
read-only property of the Navigator
interface returns an array containing every VRDisplay
object that is currently presenting (VRDisplay.ispresenting
is true
).
var myActiveDisplays = navigator.activeVRDisplays;
An array of VRDisplay
objects.
function showActive() { var displays = navigator.activeVRDisplays; for(var i = 0; i < displays.length; i++) { console.log('Display ' + displays[i].displayId + ' is active.'); } }
Specification | Status | Comment |
---|---|---|
Unknown The definition of 'activeVRDisplays' in that specification. | Unknown | Initial definition |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | No
|
Yes | 55
|
No | No | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | Yes | Yes
|
No | 55 | No | No | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/navigator/activeVRDisplays