You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Start video

 Begin playing the video (optionally: at the second given).

Player.play(time)


ParameterData TypeDescription
timeinteger

default = null

optional: The time in seconds that the video should begin playing.


Pause video

Pauses a played-out video; no effect if the player is already paused.

Player.pause()


Stop video

Stops a played-out video; no effect if the player is already stopped.

Player.stop()


Set volume

Adjusts volume level in the scale values from 0.0, 0.1, 0.2, ... 1.

Player.setVolume(volume)


Mute

Toggles the audio on or off.

Player.toggleMute()


Jump forward

Jump forward by milliseconds given.

Player.forward(millis)
ParameterData TypeDescription
millisinteger

Interval in milliseconds.


Rewind

Reverse the video by milliseconds given.

Player.rewind(millis)
ParameterData TypeDescription
millisinteger

Interval in milliseconds.


Get current time

The current playing time in seconds will be returned.

Player.getCurrentTime()


Get video length

Returns the video length of the current video.

Player.getDuration()


Get buffered time of video

Returns how far the video has been already buffered.

Player.getBufferedTime()


Get video title

Returns the title of the current video.

Player.getApi('metaData').getVideoTitle()


Switch player sources

Load a video specified by ID.

Player.switchVideo(videoId)

ParameterData TypeDescription
videoIdstringID of the video to be loaded.