Play

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

player.play(time);
ParameterData TypeDescription
timeinteger

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

default = null


Pause

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

player.pause();


Stop

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

player.stop();


Forward

Fast forward the video by the number of milliseconds given.

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


Rewind

Rewind the video by the number of milliseconds given.

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


Set Volume

Sets the volume of a video to a specified level.

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)


Toggle Mute

Toggles the audio on or off.

player.toggleMute();


Get Current Time

Returns the current video time in seconds.

player.getCurrentTime();


Get Duration

Returns the duration of the current video in seconds.

player.getDuration();


Get Buffered Time

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

player.getBufferedTime();


Get Video Title

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

player.getApi("metaData").getVideoTitle();


Switch Video

Load a video specified by ID.

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