Window.onvrdisplayconnect

この記事はまだボランティアによって 日本語 に翻訳されていません。ぜひ MDN に参加して翻訳を手伝ってください!
この記事を English (US) で読むこともできます。

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The onvrdisplayconnect property of the Window interface represents an event handler that will run when a compatible VR display has been connected to the computer (when the vrdisplayconnect event fires).

The event object is of type VRDisplayEvent.

Syntax

window.onvrdisplayconnect = function() { ... };

Examples

window.onvrdisplayconnect = function() {
  info.textContent = 'Display connected.';
};

Specifications

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

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No1 ?

634

555

No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? Yes2 3 ?55 No No Yes6

1. This feature is behind the WebVR preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.

2. Chrome for Android 56 supports only Google Daydream View.

3. Chrome for Android 57 adds support for Google Cardboard.

4. Only Windows and macOS support is enabled.

5. Only Windows support is enabled.

6. Supported on Samsung Internet for GearVR.

See also

ドキュメントのタグと貢献者

このページの貢献者: wbamberg, chrisdavidmills, mattwojo
最終更新者: wbamberg,