Callbacks
Before starting​
- Refer to the Video player instantiation input article to understand the role of the callbacks in the video player instantiation.
- Refer to the Basic instantiation code article to understand what part of code you can extend with the callbacks full list.
Callbacks full list​
Property | Type | Default | Description |
---|---|---|---|
setAPI | function | NA | It exposes DIVA APIs |
setPluginsManager | function | NA | It exposes DIVA Plugins Manager APIs: register, remove and change the
status of plugins |
onLog | function | NA | Logs callback |
onVideoIdChanges | function | NA | Called when current videos change |
onVideoMetadataChanges | function | NA | Called when videometadata of the main video changes |
onAnalyticEvent | function | NA | Callback for generic analytic events |
onMediaAnalyticEvent | function | NA | Callback for media analytic events |
onBackButtonClick | function | NA | Called when the user clicks on the back button during End of Play Note: The implementation of this callback affects the presence of the button itself |
onPlaybackRate | function | NA | Called when playback speed of the main video changes |
onPlayerPosition | function | NA | Called when player position (both relative to the video logical start
and unix timecode) of the main video changes
|
onPlayerMaxPosition | function | NA | Called when player max position (both relative to the video logical
start and unix timecode) of the main video changes
|
onPlayerState | function | NA | Called when player state of the main video changes |
onPreferredAudioTrack | function | NA | Called when the user select an audiotrack |
onPreferredCCTrack | function | NA | Called when the user select a closed caption |
onPreferredVideoQuality | function | NA | Called when the user select a video quality |
onVideoError | function | NA | Called on DIVA errors
|
onVideoEnd | function | NA | Called when video end is reached |
onPlayerActionRequest | function | NA | Callback for actions called by API: play, pause, seek, seekBack,
seekFroward, seekPercentage, seekAbsolute |
onPlaybackSession | function | NA | Called on DIVA playback session changed.
|