Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column

Transport Controls

Play

Pause

Stop

Forward

Rewind

Column

Volume Controls

Set Volume

Toggle Mute

Column

Timing

Get Current Time

Get Duration

Get Buffered Time

Column

Video Data

Get Video Title

Switch Video




Anchor
play
play

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Play

Begin playing the video at the (optionally) specified time.

Code Block
languagetext
player.play(time);
ParameterData TypeDescription
timeinteger

optional: the video should begin playing from this time (in seconds)

default = null


Anchor
pause
pause

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Pause

Pauses the video; there is no effect if the Player is already paused.

Code Block
languagetext
player.pause();


Anchor
stop
stop

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Stop

Stops the video; no effect if the Player is already stopped.

Code Block
languagetext
player.stop();


Anchor
forward
forward

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Forward

Fast forward the video by the number of milliseconds given.

Code Block
languagetext
player.forward(millis);
ParameterData TypeDescription
millisintegerinterval in milliseconds


Anchor
rewind
rewind

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Rewind

Rewind the video by the number of milliseconds given.

Code Block
languagetext
player.rewind(millis);
ParameterData TypeDescription
millisintegerinterval in milliseconds


Anchor
setVolume
setVolume

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Set Volume

Sets the volume of a video to a specified level.

Code Block
languagetext
player.setVolume(volume);
ParameterData TypeDescription
volumefloatlevel to set the volume of the video to (range from 0.0 to 1.0 with a step size of 0.1)


Anchor
toggleMute
toggleMute

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Toggle Mute

Toggles the audio on or off.

Code Block
languagetext
player.toggleMute();


Anchor
getCurrentTime
getCurrentTime

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Get Current Time

Returns the current video time in seconds.

Code Block
languagetext
player.getCurrentTime();


Anchor
getDuration
getDuration

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Get Duration

Returns the duration of the current video in seconds.

Code Block
languagetext
player.getDuration();


Anchor
getBufferedTime
getBufferedTime

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Get Buffered Time

Returns the total time of the video that has been buffered in seconds.

Code Block
languagetext
player.getBufferedTime();


Anchor
getVideoTitle
getVideoTitle

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Get Video Title

Returns the title of the current video. (only for native player)

Code Block
languagetext
player.getApi("metaData").getVideoTitle();


Anchor
switchVideo
switchVideo

Panel
borderColor#f2f2f2
bgColor#f2f2f2

Switch Video

Load a video specified by ID.

Code Block
languagetext
player.switchVideo(videoId);
ParameterData TypeDescription
videoIdstringID of the video to be loaded