Avalible events
We use the HTMLMediaElement implementation to trigger events of the player. Please make sure you check our code sample for correct way of listening to events and triggers.
You can also use the Player API for easier implementation.
Event Type | Description |
---|---|
panda_timeupdate | The time indicated by the element's currentTime attribute has changed. That's the HTMLMediaElement's timeupdate event. |
panda_progress | Sent periodically to inform interested parties of progress downloading the media (not the progress of the playback). That's the HTMLMediaElement's progress event. If you want to track video progress, make sure you use panda_timeupdate instead. |
panda_ready | Triggered when the instance is ready for API calls. |
panda_play | Sent when playback of the media starts after having been paused; that is, when playback is resumed after a prior pause event. |
panda_pause | Sent when playback is paused. |
panda_seeking | Sent when a seek operation begins. |
panda_seeked | Sent when a seek operation completes. |
panda_ended | Sent when playback completes. Note: This does not fire if autoplay is true. |
panda_enterfullscreen | Sent when the player enters fullscreen mode (either the proper fullscreen or full-window fallback for older browsers). |
panda_exitfullscreen | Sent when the player exits fullscreen mode. |
panda_captionsenabled | Sent when captions are enabled. |
panda_captionsdisabled | Sent when captions are disabled. |
panda_languagechange | Sent when the caption language is changed. |
panda_canplay | Sent when enough data is available that the media can be played, at least for a couple of frames. This corresponds to the HAVEENOUGH_DATA _readyState. |
panda_error | Sent when playback doesn't work |
panda_speed_update | Sent when the user changes player velocity |
panda_smart_search | Sent when the user typed in the smart search function |
panda_ai_quiz | Sent when user uses AI Quiz project |
Usage
window.addEventListener("message", (event) => {
/*
event = {
message: Event Type,
currentTime: Video current time,
video: Video ID
}
*/
const { data } = event
if (data.message === 'panda_pause') {
// do something
}
}, false);