Play
Begin playing the video at the (optionally) specified time.
player.play(time);
Parameter | Data Type | Description |
---|---|---|
time | integer | 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);
Parameter | Data Type | Description |
---|---|---|
millis | integer | interval in milliseconds |
Rewind
Rewind the video by the number of milliseconds given.
player.rewind(millis);
Parameter | Data Type | Description |
---|---|---|
millis | integer | interval in milliseconds |
Set Volume
Sets the volume of a video to a specified level.
player.setVolume(volume);
Parameter | Data Type | Description |
---|---|---|
volume | float | level 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);
Parameter | Data Type | Description |
---|---|---|
videoId | string | ID of the video to be loaded |