Reference
Events
The events sent by the Player API
These are all the events you can listen for, along with an example of data passed to the callback registered using the on() callback.
Events include some detail about the current state but you can always use the get methods to return any additional data you need.
Event | Data type | Example data passed to callback |
---|---|---|
durationchange | Object | {"duration":11.4} |
ended | Object | {"seconds":11.4,"percentage":100} |
fullscreenchange | Object | {"fullscreen":true} |
hotspotclicked | Object | {"id":"abcdefgh12345678","seconds":5} |
loadedmetadata | Object | {"videoWidth":1920,"videoHeight":1080} |
pause | Object | {"seconds":7.235,"percentage":63.461} |
play | Object | {"seconds":1.341,"percentage":11.761} |
playing | Object | {"seconds":1.341,"percentage":11.767} |
progress | Object | {"percentage":100} |
qualitychange | Object | {"quality":"720p"} |
playbackratechange | Object | {"playbackRate":1.5} |
seeked | Object | {"seconds":5,"percentage":43.86} |
seeking | Object | {"seconds":5,"percentage":43.86} |
trackchange | Object | {"language":"en"} |
timeupdate | Object | {"seconds":7.648,"percentage":67.089} |
volumechange | Object | {"volume":0.82} |