The player's VR attributes can be used to change the stereo mode, the viewing direction and the vertical field of view.
For examples on how to use the VR functionality, take a look at our Virtual Reality support page.
The VR attributes are properties of the vr object, which is accessible through the player object.
vr object can have the following properties:
|direction||VRDirection||yes||Sets or returns the viewing direction.
A VR direction object with properties yaw, pitch and roll must be set to change the direction; the values of these properties should be in degrees.
|stereo||boolean||yes||Enables/disabled or returns the stereo mode. Can be set to "true" or "false".
Setting it to true splits the video in left and right channel; setting it to false removes the stereo rendering. Default value is false.
|verticalFOV||number||yes||Sets or returns the vertical field of view in VR. This value can be a degree in the range of [0, 180]. Increasing this value creates a more zoomed in effect.|
vr object supports the following events:
|directionchange||Fires when the viewing direction changes.|
|stereochange||Fires when the player enters or exists VR mode.|
VRDirection object can have the following properties:
|pitch||number||no||Rotational position around the Y-axis. Value in the range of -180 to 180.|
|roll||number||yes||Rotational position around the X-axis. Value in the range of -180 to 180.|
|yaw||number||no||Rotational position around the Z-axis. Value in the range of -180 to 180.|