DocsVideo players
On this page

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:

js

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:

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Or with HTML:

index.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:

js

Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →

Common events:

EventPurpose
frontbacked:video-statusProcessing status for a video that is not ready yet.
frontbacked:video-readyPlayback sources were attached.
frontbacked:video-qualityThe active rendition changed.
frontbacked:video-playbackTime update with currentTime, remaining, and percent.
frontbacked:video-errorPlayback or source loading error.

Uploading Videos

Videos are uploaded with the normal file upload flow:

js

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.

js

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.