Skip to content

Studio Script Reference: Player actions ​

These actions communicate back to the host player via the SDK integration. They update context.player state which the SDK can read and react to.

context.actions.setPlayerControls() ​

Requests the host player to show or hide its controls.

Example:

js
context.actions.setPlayerControls({ value: true });  // show controls
context.actions.setPlayerControls({ value: false }); // hide controls

context.actions.setPlayerState() ​

Requests the host player to play or pause.

Example:

js
context.actions.setPlayerState({ value: true });  // play
context.actions.setPlayerState({ value: false }); // pause

context.actions.setPlayerTime() ​

Requests the host player to seek to a specific timecode (in milliseconds).

Example:

js
context.actions.setPlayerTime({ value: 30000 }); // seek to 30s