Actions

About

Using Actions you can control the StreamOne Player’s behaviour externally through Javascript. You can toggle the play/pause button for example, using javascript.

Performing an Action

Actions can be easily performed using javascript (instantiated using the variable name player in this example):

player.pause();

Every action is available as a function on the player object. Note that is handled by the player wrapper. If the HTML5 or Flash player is embedded directly, actions must be performed using the action() function.

Available Actions

All available actions (case-sensitive) can be found in the following table:

Action name Description
togglePlayPause Toggle the play/pause state
play Causes the Player to start playing
pause Causes the Player to pause
toggleFullscreen Toggle the fullscreen state (html5 only)
enterFullscreen Enter the fullscreen state (html5 only)
leaveFullscreen Leave the fullscreen state
toggleMute Toggle the mute state
previousTrack Play the previous track
nextTrack Play the next track
getDuration Retrieve the duration of the currently active video
getPosition Retrieve the current position of the active video