Receive events

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 TypeDescription
panda_timeupdateThe time indicated by the element's currentTime attribute has changed. That's the HTMLMediaElement's timeupdate event.
panda_progressSent 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_readyTriggered when the instance is ready for API calls.
panda_playSent when playback of the media starts after having been paused; that is, when playback is resumed after a prior pause event.
panda_pauseSent when playback is paused.
panda_seekingSent when a seek operation begins.
panda_seekedSent when a seek operation completes.
panda_endedSent when playback completes. Note: This does not fire if autoplay is true.
panda_enterfullscreenSent when the player enters fullscreen mode (either the proper fullscreen or full-window fallback for older browsers).
panda_exitfullscreenSent when the player exits fullscreen mode.
panda_captionsenabledSent when captions are enabled.
panda_captionsdisabledSent when captions are disabled.
panda_languagechangeSent when the caption language is changed.
panda_canplaySent 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_errorSent when playback doesn't work
panda_speed_updateSent when the user changes player velocity
panda_smart_searchSent when the user typed in the smart search function
panda_ai_quizSent when user uses AI Quiz project


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);