Class: shaka.ui.VRManager

Constructor

new VRManager(containernon-null, canvasnullable, videonon-null, playernon-null, config)

Parameters:
Name Type Attributes Description
container HTMLElement
canvas HTMLCanvasElement <nullable>
video HTMLMediaElement
player shaka.Player
config shaka.extern.UIConfiguration
Implements:
Source:

Members

TO_RADIANS_ :number

Type:
  • number
Source:

canvas_ :HTMLCanvasElement

Type:
  • HTMLCanvasElement
Source:

container_ :HTMLElement

Type:
  • HTMLElement
Source:

gl_ :WebGLRenderingContext

Type:
  • WebGLRenderingContext
Source:

onGesture_ :boolean

Type:
  • boolean
Source:

prevAlpha_ :number

Type:
  • number
Source:

prevBeta_ :number

Type:
  • number
Source:

prevGamma_ :number

Type:
  • number
Source:

prevX_ :number

Type:
  • number
Source:

prevY_ :number

Type:
  • number
Source:

vrAsset_ :string

Type:
  • string
Source:

Methods

canPlayVR() → {boolean}

Returns if a VR is capable.
Source:
Returns:
Type
boolean

checkVrStatus_()

Source:

configure(confignon-null)

Parameters:
Name Type Description
config shaka.extern.UIConfiguration
Source:

gestureMove_(x, y)

Parameters:
Name Type Description
x number
y number
Source:

gestureStart_(x, y)

Parameters:
Name Type Description
x number
y number
Source:

getFieldOfView() → {number}

Returns the field of view.
Source:
Returns:
Type
number

getGL_() → {WebGLRenderingContext}

Source:
Returns:
Type
WebGLRenderingContext

getNorth() → {number}

Get the angle of the north.
Source:
Returns:
Type
number

incrementPitch(angle)

Increment the pitch in X angle in degrees.
Parameters:
Name Type Description
angle number
Source:

incrementRoll(angle)

Increment the roll in X angle in degrees.
Parameters:
Name Type Description
angle number
Source:

incrementYaw(angle)

Increment the yaw in X angle in degrees.
Parameters:
Name Type Description
angle number
Source:

init_(projectionMode)

Parameters:
Name Type Description
projectionMode string
Source:

isPlayingVR() → {boolean}

Returns if a VR is supported.
Source:
Returns:
Type
boolean

isStereoscopicModeEnabled() → {boolean}

Returns true if stereoscopic mode is enabled.
Source:
Returns:
Type
boolean

release()

Request that this object release all internal references.
Implements:
Source:

reset()

Reset VR view.
Source:

setFieldOfView(fieldOfView)

Set the field of view.
Parameters:
Name Type Description
fieldOfView number
Source:

setupDeviceOrientationListener_()

Source:

setupVRListerners_()

Source:

toggleStereoscopicMode()

Toggle stereoscopic mode.
Source: