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.
TouchCastPlayerAPI.doAction(params);
Parameters
Name | Description | Type |
---|---|---|
params | Object with these possible properties:
| 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. | autoPlay
|
TouchCastPlayerAPI.actions.SEEK_VIDEO | This action will seek the video to a certain timecode. | seekTime
|
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. | volume
|
TouchCastPlayerAPI.actions.ENABLE_CONTROL | This action will be able to enable player controls. | list
|
TouchCastPlayerAPI.actions.DISABLE_CONTROL | This action will be able to disable player controls. | list
|
TouchCastPlayerAPI.actions.SWITCH_SUBTITLES | This action will switch language of subtitles in player(loop). | No extra parameters. |
TouchCastPlayerAPI.actions.SET_SUBTITLES | This action will set one language of subtitles in player. |
|
TouchCastPlayerAPI.actions.SEND_CUSTOM_ANALYTICS | This action will pass custom data to fabric tracker. |
|
TouchCastPlayerAPI.actions. | This action will full hide controls on player. | No extra parameters. |
TouchCastPlayerAPI.actions. | This action will show controls on player(after full hide). | No extra parameters. |
TouchCastPlayerAPI.actions.SET_HLS_QUALITY | This action will set hls quality. if it is =-1 it will activate auto switching of quality |
|
TouchCastPlayerAPI.actions.DISABLE_FS_LOGIC | This action will disable or activate logic for go to fullScreen. If it is disabled -after click on fullScreenButton will sent only event without go to fullScreen |
|
TouchCastPlayerAPI.actions.SWITCH_SPEED | This action will switch playback speed |
|
TouchCastPlayerAPI.actions.SWITCH_LIVE_CHAT | This action will show or hide chat on liveStream. |
|
TouchCastPlayerAPI.actions.SHOW_QUESTION_CHAT_POPUP | This action will show popup of question chat. | No extra parameters. |
TouchCastPlayerAPI.actions.FORCE_PLAY_WITH_SOUND | This action will try to start play with sound if it is not possible video will play without sound. | No extra parameters. |
TouchCastPlayerAPI.actions.SHOW_COACHMARK | This action will show coachmark |
|
TouchCastPlayerAPI.actions.SET_EMOJI | This action will configure emoji and show/hide skin menu, the same that we have on /wiki/spaces/ISD/pages/749764609 fields:likeMenuContentAndOrder and |
|
TouchCastPlayerAPI.actions.SET_GA | This action will disable or activate google analytics |
|
Example
// this shows how you can change player volume var params = { action: TouchCastPlayerAPI.actions.SET_VOLUME, playerId: "player_01" volume: 0.6, }; TouchCastPlayerAPI.doAction(params);