This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.
The VRDisplay interface of the WebVR API represents any VR device supported by this API. It includes generic information such as device IDs and descriptions, as well as methods for starting to present a VR scene, retrieving eye parameters and display capabilities, and other important functionality.
An array of all connected VR Devices can be returned by invoking the Navigator.getVRDisplays() method.
VRDisplay.capabilities Read only
VRDisplayCapabilities object that indicates the various capabilities of the VRDisplay.VRDisplay.depthFarVRDisplay.depthNearVRDisplay.displayId Read only
Gamepad.displayId).VRDisplay.displayName Read only
VRDisplay.VRDisplay.isConnected Read only
Boolean indicating whether the VRDisplay is connected to the computer.VRDisplay.isPresenting Read only
Boolean indicating whether the VRDisplay is currently having content presented through it.VRDisplay.stageParameters Read only
VRStageParameters object containing room-scale parameters, if the VRDisplay is capable of supporting room-scale experiences.VRDisplay.getEyeParameters()VREyeParameters object containing the eye parameters for the specified eye.VRDisplay.getLayers()VRDisplay.VRDisplay.getPose()VRPose object defining the future predicted pose of the VRDisplay as it will be when the current frame is actually presented.VRDisplay.getImmediatePose()VRPose object defining the current pose of the VRDisplay, with no prediction applied.VRDisplay.resetPose()VRDisplay, treating its current VRPose.position and VRPose.orientation as the "origin/zero" values.VRDisplay.cancelAnimationFrame()Window.cancelAnimationFrame that allows callbacks registered with VRDisplay.requestAnimationFrame() to be unregistered.VRDisplay.requestAnimationFrame()Window.requestAnimationFrame containing a callback function that will be called every time a new frame of the VRDisplay presentation is rendered.VRDisplay.requestPresent()VRDisplay presenting a scene.VRDisplay.exitPresent()VRDisplay presenting a scene.VRDisplay.submitFrame()VRLayer currently being presented and displays it on the VRDisplay.TBD.
| Specification | Status | Comment |
|---|---|---|
| WebVR The definition of 'VRDisplay' in that specification. | Editor's Draft | Initial definition |
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) | No support | No support | No support |
| Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
|---|---|---|---|---|---|---|
| Basic support | No support | (Yes) | No support | No support | No support | No support |
© 2005–2017 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/VRDisplay