Description
The method TouchCastPlayerAPI.doAction()
allows you to run player actions. Player actions are commands the TouchCast player is able to understand and execute. For example, you may want to pause the playback of the player.
Code Block |
---|
|
TouchCastPlayerAPI.doAction(params);
|
Parameters
Name | Description | Type |
---|
params | Object with these possible properties:
action[string]* - mandatory, represents the player action you want to execute; see below the list of all available player actions.playerId[string]* - mandatory, represents the id of the player that will run the action.
Note: this object can have other properties based on the action that's being executed. | object |
List of player actions
Action Type | Action Description | Extra Parameters |
---|
TouchCastPlayerAPI.actions.RESUME_VIDEO
| This action will trigger the video playback to resume. | No extra parameters. |
TouchCastPlayerAPI.actions.PAUSE_VIDEO
| This action will trigger the video playback to pause. | No extra parameters. |
TouchCastPlayerAPI.actions.TOGGLE_PLAYBACK
| This action will toggle the video playback. If the video is playing, it will resume, and if the video is resumed, it will play it. | No extra parameters. |
TouchCastPlayerAPI.actions.RESTART_VIDEO
| This action will restart the video playback. |
|
TouchCastPlayerAPI.actions.SEEK_VIDEO
| This action will seek the video to a certain timecode. |
|
TouchCastPlayerAPI.actions.MUTE_VIDEO
| This action will mute the sound. | No extra parameters. |
TouchCastPlayerAPI.actions.UNMUTE_VIDEO
| This action will un-mute the sound. | No extra parameters. |
TouchCastPlayerAPI.actions.SET_VOLUME
| This action will change the sound volume. |
|
TouchCastPlayerAPI.actions.ENABLE_CONTROL
| This action will be able to enable player controls. |
|
TouchCastPlayerAPI.actions.DISABLE_CONTROL
| This action will be able to disable player controls. |
|
TouchCastPlayerAPI.actions.LOAD_TC_VIDEO
| This action will load a different touchcast video in the player. |
|