The activeVRDisplays
read-only property of the Navigator
interface returns an array containing every VRDisplay
object that is currently presenting (VRDisplay.ispresenting
is true
).
Syntax
var myActiveDisplays = navigator.activeVRDisplays;
Value
An array of VRDisplay
objects.
Examples
function showActive() {
var displays = navigator.activeVRDisplays;
for(var i = 0; i < displays.length; i++) {
console.log('Display ' + displays[i].displayId + ' is active.');
}
}
Specifications
Browser compatibility
Update compatibility data on GitHub | Desktop | Mobile |
---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Android webview | Chrome for Android | Firefox for Android | Opera for Android | Safari on iOS | Samsung Internet |
---|
activeVRDisplays | Chrome
No support
No-
No support
No
- Notes Available on all platforms behind a flag, but currently only works on desktop in an experimental version of Chrome (other builds won't return any devices when
Navigator.getVRDisplays() is invoked).
| Edge
Full support
15 | Firefox
Full support
55-
Full support
55
- Notes Windows support was enabled in Firefox 55.
-
Full support
64
- Notes macOS support was enabled in Firefox 64.
| IE
No support
No | Opera
No support
No | Safari
No support
No | WebView Android
Full support
Yes | Chrome Android
Full support
Yes-
Full support
Yes
- Notes Currently supported only by Google Daydream.
| Firefox Android
Full support
55 | Opera Android
No support
No | Safari iOS
No support
No | Samsung Internet Android
?
|
---|
Legend
-
Full support
Ā
- Full support
-
No support
Ā
- No support
-
Compatibility unknown
Ā
- Compatibility unknown
- Experimental. Expect behavior to change in the future.
- Experimental. Expect behavior to change in the future.
- Deprecated. Not for use in new websites.
- Deprecated. Not for use in new websites.
- See implementation notes.
- See implementation notes.
See also