Docs
ReferenceEvents

Events

Every event emitted by the Moviie Player API.

The tables below cover every event exposed by the Player API. Subscribe to events with window.Moviie.on(event, handler) — see the Listen to events guide for the full subscription API.

Playback state

EventPayloadDescription
readyonceFires once per session when the player has loaded enough metadata to begin playback. Use this to register listeners that depend on the player being initialised.
playFires every time playback starts or resumes after being paused.
pauseFires every time playback is paused, including when the viewer reaches the end.
endedFires when playback reaches the end of the video. Pair with `pause` if you also need to react to manual pauses.
waitingFires when the player stalls waiting for more data — typically a buffering condition on slow networks.
playingFires when playback resumes after a `waiting` event.

Time

EventPayloadDescription
timeupdate{ currentTime: number }Fires periodically (~250ms) while the video is playing. Throttle any heavy work — this is the highest-frequency event.
durationchange{ duration: number }Fires when the duration becomes available or changes (e.g. live stream metadata refresh).
seeking{ from: number; to: number }Fires when a seek operation starts.
seeked{ currentTime: number }Fires when a seek operation completes and playback can resume.

Volume

EventPayloadDescription
volumechange{ volume: number; muted: boolean }Fires when the volume level or muted state changes.

Fullscreen

EventPayloadDescription
fullscreenenterFires when the player enters fullscreen mode.
fullscreenexitFires when the player exits fullscreen mode.

Picture-in-Picture

EventPayloadDescription
pipenterFires when the player enters Picture-in-Picture mode.
pipexitFires when the player exits Picture-in-Picture mode.

Quality

EventPayloadDescription
qualitychange{ quality: string }Fires when the active video quality changes — either by viewer choice or by the adaptive bitrate logic.

Loading

EventPayloadDescription
loadstartFires when the player begins loading the video manifest.
canplayFires when enough data has been buffered to begin playback.
progress{ buffered: number }Fires when the buffered range advances.

Errors

EventPayloadDescription
error{ code: string; message: string }Fires when an error occurs during loading or playback. The payload exposes a stable error code and a localized message.

Call-to-action overlays

EventPayloadDescription
ctashow{ id: string }Fires when a call-to-action overlay becomes visible.
ctahide{ id: string }Fires when a call-to-action overlay is dismissed.
ctaclick{ id: string; href: string }Fires when a viewer clicks a call-to-action overlay.

On this page