With js3q you can listen to all player events or to specific kind of events.
#EventListener
js3qVideoPlayer.on('*.*', function (data) {
console.log('js3q::' + this.event + ' ' + JSON.stringify(data));
});
js3qVideoPlayer.on('media.*', function (data) {
console.log('js3q::' + this.event + ' ' + JSON.stringify(data));
});
js3qVideoPlayer.once('media.ready', function (data) {
console.log('js3q::' + this.event + ' ' + JSON.stringify(data));
});
#Available events
#Player Events
Event |
Description |
player.fullscreenChange |
Is called when the player enters/leave fullscreen. |
player.controllbarChange |
|
player.playRequest |
Is called when the user requests playback. |
player.pauseRequest |
|
player.seekRequest |
|
#Configuration Events
Event |
Description |
configuration.loaded |
|
configuration.loadError |
The configuration is not loaded due to an error. statuscode is provided. |
#Media Events
Event |
Description |
media.loading |
|
media.ready |
|
media.autoplayfailed |
Autoplay failed (user gesture required) |
media.autoplaymuted |
If allowmutedautoplay is configured, the player try to start the video muted. |
media.playing |
|
media.paused |
|
media.muted |
|
media.unmuted |
|
media.complete |
|
media.seeking |
|
media.seeked |
|
media.volumeChange |
|
media.timeChange |
|
media.durationChange |
|
media.subtitleChange |
|
media.audioChange |
|
#Ad Events
Event |
Description |
ads.initEvent |
|
ads.adsLoadError |
|
ads.adPlaying |
An ad starts playing. |
ads.adPlaying |
|
ads.adPaused |
|
ads.skipped |
|
ads.adComplete |
|
ads.contentPauseRequest |
|
ads.contentResumeRequest |
|
ads.completeEvent |
|
#Casting
Event |
Description |
cast.started |
|
cast.stopped |
|
#CtA
Event |
Description |
cta.displaying |
|
cta.closed |
|