Navigator.activeVRDisplays

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

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

Specification Status Comment
WebVR 1.1
The definition of 'activeVRDisplays' in that specification.
Draft Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
activeVRDisplays
ExperimentalDeprecated
Chrome No support NoEdge No support 15 — 79
Notes
No support 15 — 79
Notes
Notes WebVR content requires a Windows Mixed Reality headset or the Windows Mixed Reality Portal Simulator.
Firefox Full support 55
Notes
Full support 55
Notes
Notes Windows support was enabled in Firefox 55.
Full support 64
Notes
Notes macOS support was enabled in Firefox 64.
IE No support NoOpera No support NoSafari No support NoWebView Android No support 79 — 80Chrome Android No support 79 — 80
Notes
No support 79 — 80
Notes
Notes Supported only by Google Daydream.
Firefox Android Full support 55Opera Android No support NoSafari iOS No support NoSamsung Internet Android Full support Yes
Notes
Full support Yes
Notes
Notes Currently supported only by Google Daydream.
Secure context required
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox Full support 73IE No support NoOpera No support NoSafari No support NoWebView Android No support 79 — 80Chrome Android No support 79 — 80Firefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android Full support Yes

Legend

Full support  
Full support
No support  
No support
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