You can monitor the player events using the player.on() method. The player also supports all HTMLMediaElement events. For details, refer to the MDN documentation.
The following table provides a description of each player event and its purpose:
| Name | Data | Trigger Event Description |
|---|---|---|
audiotrackswitched | null | The player changes audio tracks. |
handle-play-clicked | null | The play button is clicked. |
theaterchanging | null | Theater mode is changed. |
fullscreenchanging | boolean | Full-screen mode is changing (before the change completes). |
fullscreenchanged | boolean | Full-screen mode change completed. |
toclang | string | Cue points language changes. |
cclang | string | Captions language changes. |
annotationslang | string | Annotations language changes. |
qualitychange | string | The quality level changes (automatic or manual). |
manualquality | string | The quality level is manually changed by the user. |
resizeplayer | { width, height, outerWidth } | The player size changes. |
prevtrack | null | Switching to the previous track in the playlist. |
nexttrack | null | Switching to the next track in the playlist. |
mobiletouch | null | Mobile touch events. |
downloadRequested | (url: string, callback: function) | The player returns the download URL and callback per the user's request to download the media. |
statechanged | (state: PlayerState, old: PlayerState) | The player state changes. Emits both the new state and the previous state. |
cclayoutchange | { mode, fontSize } | The closed captions layout changes. |
captionschange | PlayerTimeDataSource | The captions change. |
changeplaylistmode | bottom / right | The player playlist mode changes. |
changesource | PlayerSource | The current media source changes. |