Respond to video events
Choose layout and quality and handle player events.
Before you begin: Build a video playlist.
Quality Selection
When qualitySelector is enabled, the player shows Auto plus every available rendition. In Auto, Frontbacked considers the player size, device pixel ratio, available renditions, browser network hints, Save-Data, buffer health, and playback telemetry.
Manual quality selection pins playback to the selected rendition until the user returns to Auto:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Only renditions that exist for that video are shown. For example, a 480p source can expose 240p, 360p, and 480p, while a 1080p source can expose higher renditions when available.
Portrait Player
Use portrait layout for short-style videos:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Or with HTML:
Portrait mode uses a 9:16 player, portrait fullscreen framing, top controls, and portrait-style timeline previews.
Events
Listen for player events when you need lower-level hooks:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Common events:
| Event | Purpose |
|---|---|
frontbacked:video-status | Processing status for a video that is not ready yet. |
frontbacked:video-ready | Playback sources were attached. |
frontbacked:video-quality | The active rendition changed. |
frontbacked:video-playback | Time update with currentTime, remaining, and percent. |
frontbacked:video-error | Playback or source loading error. |
Uploading Videos
Videos are uploaded with the normal file upload flow:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Use file.upload.progress for upload progress and file.media.progress for processing progress after the post is read back.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
See Upload File for upload limits, progress events, and resume.
Processing progress covers the first playable quality, poster, and thumbnails. During encoding it follows actual processed video time and is refreshed at most once every ten seconds; short stages also report completion. A stage such as scanning may hold its percentage until it finishes. Progress reaches 100 only after the complete first package is available. Higher-quality preparation uses media.processing and media.qualities instead.
To limit preparation time and output sizes, set maxVideoQuality and, where appropriate, maxVideoDuration with videoDurationOverflow: "trim" on the FRL file field. See file schema rules for duration checks and dynamic preferences.