Player Events
Configure custom code that runs on player lifecycle events such as play, pause, frame, mute, and replay
Use Player Events when custom code should run at a specific player lifecycle moment. Player-event logic can support advanced interactions, external calls, state updates, frame-based behavior, and custom analytics-adjacent workflows.

Event Types
onAllReady
When the video is ready to play.
Initialize custom state or prepare external behavior.
onFirstPlay
Immediately after the viewer clicks play for the first time.
Trigger first-play logic that should run once.
onPlay
Every time the viewer presses play.
Resume state, trigger play-specific behavior, or restart a custom timer.
onFrame
When the video reaches a configured frame.
Trigger frame-specific behavior, reveal logic, or external calls.
onReplay
When the viewer finishes watching and presses replay.
Reset custom state for another viewing pass.
onPause
When the viewer pauses the video.
Pause custom timers or update external state.
onMute
When the viewer mutes the video.
Update audio-related state or custom UI logic.
onUnmute
When the viewer unmutes the video.
Restore audio-related state or custom UI logic.
Options
Event trigger
The lifecycle event that runs the code.
Choose the narrowest event that matches the desired behavior.
Frame value
The frame that triggers onFrame.
Confirm the frame exists and is reached in every relevant path.
Custom code
The JavaScript that runs for the event.
Keep the code focused on the event's purpose.
Input values
Any project data, live-control value, or state referenced by the code.
Confirm referenced values exist and have fallbacks.
Repeat behavior
Whether the code should run once or every time the event occurs.
Important for onPlay, onPause, onMute, onUnmute, and replay flows.
Failure handling
What happens if a value is missing or an external action fails.
Avoid blocking normal playback.
Configure a Player Event
Success Checks
Before publishing Player Events, confirm:
The selected event matches the intended playback moment.
Repeated events do not run code more often than intended.
onFrametriggers at the correct frame in each relevant path.Missing data and external failures do not stop playback.
Custom event code does not interfere with analytics, form submission, links, or normal player controls.
Last updated

