afterPlayerInit |
Triggered after player initialization. |
(player, playConfig) The player instance and the play configuration parameters |
onChannelRender |
Triggered by AI parameter callback for channel rendering. |
(param: Frame['param'], renderer: PlayRender) The frame data AI parameters, rendering DOM node |
afterLoaded |
Triggered when the stream data connection is successfully acquired. |
(player, eventData) The player instance and the returned link data |
afterReady |
Triggered by the play-ready event for user-triggered play. |
(player, eventData) The player instance and the returned play status data |
beforePlay |
Triggered when the user calls to play. |
(player, eventData) The player instance and the play data delivered |
afterPlay |
Triggered when the renderer begins to play, and the state machine changes to Playing status. |
(player, eventData) The player instance and the play data delivered |
beforePause |
Triggered when the user calls to pause. |
(player, eventData) The player instance and the play data delivered |
afterPause |
Triggered when the renderer pauses playing, and the state machine changes to Paused status. |
(player, eventData) The player instance and the callback pause data |
beforeStop |
Triggered when the user calls to stop. |
(player, eventData) The player instance and the play data delivered |
afterStop |
Triggered when the renderer stops playing, and the state machine changes to Stopped status. |
(player, eventData) The player instance and the callback stop data |
beforeSeek |
Triggered when the user calls to seek, entering Seeking status. |
(player, eventData) The player instance and the play data delivered |
afterSeek |
Triggered when the seek is successful, and the state machine changes to Playing status. |
(player, eventData) The player instance and the callback seek data |
beforeDestroy |
Triggered when the user calls to destroy. |
(player, eventData) The player instance and the destroy data delivered |
onError |
Error callback event |
(errorData, player) The standard errorData and the player instance |
onPlayEnded |
Triggered when the auto-play ends. |
(player, eventData) The player instance and the ended channel information data |
onLoading |
Used for callback of loading percentage and network speed information, applicable to both live view and playback. |
(list, done) The player channel status information and the flag indicating whether loading is complete |
loadingTimeout |
Used to determine the buffer timeout (20 s). The timeout duration is the same as the seek timeout. |
(list) |
startReconnect |
The hook triggered when starting to reconnect after a disconnection. |
(player, eventData) The player instance and the reconnection information |
reconnectSuccess |
The hook triggered upon successful reconnection after a disconnection. |
(player, eventData) The player instance and the reconnection information |
playerStatusToggle |
Triggered when the playback channel status changes. It needs to be distinguished from the player status. The playback status refers to whether the channel is playing a stream or is idle. The placeholder plugin can be used to customize the mask when there is no video. |
(statusList) |
onTimeChange |
Actively pushes time during playback. The push frequency can be configured in config. The default value is 500ms. For smooth timeline movement in the business layer, the frequency can be set lower, especially for small files in server playback. |
(params: [data]) The time information |