Player actions are controllable actions that you can instruct the player to perform when grabbing the player object with JavaScript.
The available Player actions are described in the following table:
Player Action | Description |
---|---|
player.play | Initiates a video playback action. |
player.pause | Pauses the player playback. |
player.mute | Mutes the player’s sound. |
player.volume(number) | Set the player's volume to the specified number. |
player.seekTo(number) | Moves the player's playback marker to the specified number. |
player.version | Returns the version number of the current player. |
player.destroy | Causes the player to remove itself from the web page. |
player.getPlayerInfo |
Returns an object that contains the following player information attributes:
volume - The current player set volume between 0.0(muted) to 1 (volume 100%). Note: This enhancement grants you access to important player information without the need to wait for a triggered player event. |
player.addEventListener |
Allows you to bind a custom JavaScript function to a supported player event. |
player.removeEventListener | Allows you to remove a JavaScript function that was bound to a player event. |