This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The VRDisplayEvent interface of the WebVR API represents represents the event object of WebVR-related events (see the list of WebVR window extensions).
Constructor
VRDisplayEvent.VRDisplayEvent()- Creates a
VRDisplayEventobject instance.
Properties
VRDisplayEvent also inherits properties from its parent object, Event.
VRDisplayEvent.displayRead only- The
VRDisplayassociated with this event. VRDisplayEvent.reasonRead only- A human-readable reason why the event was fired.
Examples
window.addEventListener('vrdisplaypresentchange', function(e) {
console.log('Display ' + e.display.displayId + ' presentation has changed. Reason given: ' + e.reason + '.');
})
Specifications
| Specification | Status | Comment |
|---|---|---|
| WebVR 1.1 The definition of 'VRDisplayEvent' in that specification. |
Draft | Initial definition |
Browser compatibility
Update compatibility data on GitHub
| Desktop | Mobile | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Basic support | Chrome No support No | Edge Full support Yes | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Edge Mobile ? | Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
VRDisplayEvent() constructor | Chrome No support No | Edge Full support Yes | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Edge Mobile ? | Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
display | Chrome No support No | Edge Full support 15 | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Edge Mobile ? | Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
reason | Chrome No support No | Edge Full support 15 | Firefox
Full support
55
| IE No support No | Opera ? | Safari ? | WebView Android No support No | Chrome Android
Full support
56
| Edge Mobile ? | Firefox Android Full support 55 | Opera Android ? | Safari iOS ? | Samsung Internet Android Full support 6.0 |
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.
- See implementation notes.
- See implementation notes.
- User must explicitly enable this feature.
- User must explicitly enable this feature.
See also
- WebVR API homepage
- MozVr.com — demos, downloads, and other resources from the Mozilla VR team.
Document Tags and Contributors
Tags:
Contributors to this page:
fscholz,
chrisdavidmills
Last updated by:
fscholz,