On this page
Customize player controls
Attach a player and choose its controls and options.
Before you begin: Add a video player.
JavaScript Attach
Frontbacked.video.attach(element, source, options) attaches adaptive playback and returns a player instance.
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
The source can be:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Use the post file object when you have it. It gives Frontbacked the most metadata.
Player Options
| Option | Values | Purpose |
|---|---|---|
player | "standard", "frontbacked", false | Enables the Frontbacked player UI. Use false for native browser controls. |
qualitySelector | true, false | Shows Auto, 240p, 360p, 480p, 720p, and other available renditions. |
timelineThumbnails | true, false | Shows storyboard thumbnails when the user hovers or scrubs the timeline. |
layout | "landscape", "portrait" | Uses a wide player or a short-style vertical player. |
poster | "auto" or URL | Uses the generated poster or a custom poster. |
autoplay | true, false | Requests autoplay. Browser autoplay rules still apply. |
muted | true, false | Starts muted or unmuted. |
controls | true, false | Shows native controls when the Frontbacked player UI is disabled. |
hideControls | true, false | Hides every Frontbacked player control, including the timeline. |
hiddenControls | string array | Hides only selected controls. |
maxQuality | "auto" or height | Caps automatic quality selection. |
dataSaver | "respect", "force" | Respects browser data-saving hints by default; use force to preview constrained playback. |
hlsLoaderUrl | URL, "false", or "off" | Overrides or disables the HLS helper script for browsers that need it. |
onPlayback | function | Receives time updates while the video plays. |
onTimeUpdate | function | Alias-style callback for playback time updates. |
events | object | Use events.playback or events.timeupdate callbacks. |
The matching HTML attributes use f-video-:
Hiding Controls
Hide everything:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Hide only selected controls:
Reference excerpt: use this with the page, variables and functions described in this guide. Try a complete example →
Control names:
| Name | Hides |
|---|---|
play | Play and pause button. |
prev | Previous playlist button. |
next | Next playlist button. |
mute | Mute button and volume slider. |
time | Current time and duration pill. |
timeline | Seek bar, buffered bar, and thumbnail preview. |
quality | Quality selector. |
fullscreen | Fullscreen button. |
Aliases such as pause, volume, seekbar, timebar, previous, and full are normalized to the matching control names.
Continue with Control video playback.