Class: VideoPlugin

PSV.plugins.VideoPlugin

new PSV.plugins.VideoPlugin (psv, options)

Controls a video adapter

Name Type Description
psv PSV.Viewer
options PSV.plugins.VideoPlugin.Options

Extends

Members

id string readonly inherited overrides

Unique identifier of the plugin

Reference to main controller

Methods

destroy () package overrides

getDuration ()number

Returns the durection of the video

Returns:
Type Description
number

getProgress ()number

Returns the play progression of the video

Returns:
Type Description
number 0-1

getTime ()number

Returns the current time of the video

Returns:
Type Description
number

getVolume ()number

Returns the video volume

Returns:
Type Description
number

init () package overrides

isPlaying ()boolean

Returns if the video is playing

Returns:
Type Description
boolean

pause ()

Pauses the cideo if playing

play ()

Starts the video if paused

playPause ()

Starts or pause the video

setKeypoints (keypoints)

Changes the keypoints

Name Type Description
keypoints Array.<PSV.plugins.VideoPlugin.Keypoint>

setMute (mute)

(Un)mutes the video

Name Type Description
mute boolean optional

toggle if undefined

setProgress (progress)

Changes the progression of the video

Name Type Description
progress number

0-1

setTime (time)

Changes the current time of the video

Name Type Description
time number

setVolume (volume)

Sets the volume of the video

Name Type Description
volume number

Type Definitions

PSV.plugins.VideoPlugin.Keypoint Object

Properties:
Name Type Description
position PSV.ExtendedPosition
time number

PSV.plugins.VideoPlugin.Options Object

Properties:
Name Type Argument Default Description
progressbar boolean <optional>
true

displays a progressbar on top of the navbar

bigbutton boolean <optional>
true

displays a big "play" button in the center of the viewer

keypoints Array.<PSV.plugins.VideoPlugin.Keypoint> <optional>

defines autorotate timed keypoints

Events

PSV.plugins.VideoPlugin.event:buffer

Triggered when the video buffer changes

Name Type Description
maxBuffer number

PSV.plugins.VideoPlugin.event:pause

Triggered when the video is paused

PSV.plugins.VideoPlugin.event:play

Triggered when the video starts playing

PSV.plugins.VideoPlugin.event:progress

Triggered when the video play progression changes

Name Type Description
data Object

PSV.plugins.VideoPlugin.event:volume-change

Triggered when the video volume changes

Name Type Description
volume number