DocsVideo players
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.

js

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

The source can be:

js

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

OptionValuesPurpose
player"standard", "frontbacked", falseEnables the Frontbacked player UI. Use false for native browser controls.
qualitySelectortrue, falseShows Auto, 240p, 360p, 480p, 720p, and other available renditions.
timelineThumbnailstrue, falseShows 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 URLUses the generated poster or a custom poster.
autoplaytrue, falseRequests autoplay. Browser autoplay rules still apply.
mutedtrue, falseStarts muted or unmuted.
controlstrue, falseShows native controls when the Frontbacked player UI is disabled.
hideControlstrue, falseHides every Frontbacked player control, including the timeline.
hiddenControlsstring arrayHides only selected controls.
maxQuality"auto" or heightCaps automatic quality selection.
dataSaver"respect", "force"Respects browser data-saving hints by default; use force to preview constrained playback.
hlsLoaderUrlURL, "false", or "off"Overrides or disables the HLS helper script for browsers that need it.
onPlaybackfunctionReceives time updates while the video plays.
onTimeUpdatefunctionAlias-style callback for playback time updates.
eventsobjectUse events.playback or events.timeupdate callbacks.

The matching HTML attributes use f-video-:

index.html

Hiding Controls

Hide everything:

js

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

Hide only selected controls:

js

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

Control names:

NameHides
playPlay and pause button.
prevPrevious playlist button.
nextNext playlist button.
muteMute button and volume slider.
timeCurrent time and duration pill.
timelineSeek bar, buffered bar, and thumbnail preview.
qualityQuality selector.
fullscreenFullscreen button.

Aliases such as pause, volume, seekbar, timebar, previous, and full are normalized to the matching control names.

Continue with Control video playback.