Skip to main content

Customize Quickplay Player

This guide covers UI customization for QuickplayPlayer and ContentPlayer. You can tune controls, error overlay behavior, top chrome content, and CSS variables without modifying bundled player code.

Configure controls options

Use controlsOptions to toggle optional controls and customize built-in error overlay copy and actions. Audio track selection, video quality, playback speed, and caption menus are built in and appear automatically when the stream supports them — no extra configuration is needed.

<QuickplayPlayer
source={source}
controlsOptions={{
showPipButton: true,
showCastButton: true,
showCaptionsButton: true,
showErrorOverlay: true,
errorTitle: 'Something went wrong',
errorMessage: "We couldn't play this video",
errorPrimaryLabel: 'Try again',
errorSecondaryLabel: 'Go back',
onErrorPrimary: () => window.location.reload(),
onErrorSecondary: () => window.history.back(),
}}
/>

controlsOptions supports these fields:

FieldTypeDefaultDescription
showPipButtonbooleanfalseShow the Picture-in-Picture button.
showCastButtonbooleanfalseShow the Chromecast button.
showCaptionsButtonbooleanfalseShow an inline captions toggle in addition to the captions menu.
showErrorOverlaybooleantrueShow the built-in error overlay on playback failure.
errorTitlestringHeading text for the error overlay.
errorMessagestringBody text for the error overlay.
errorPrimaryLabelstringPrimary action button label.
errorSecondaryLabelstringSecondary action button label.
onErrorPrimary() => voidCallback for the primary error action button.
onErrorSecondary() => voidCallback for the secondary error action button.

Replace the default top chrome

You can supply custom top overlay content through the top-chrome slot.

<QuickplayPlayer source={source}>
<div slot="top-chrome" className="custom-header">
<img src="/logo.png" alt="Company logo" />
<div>
<h1>Custom title</h1>
<p>Custom metadata</p>
</div>
</div>
</QuickplayPlayer>

Apply CSS custom properties

The player exposes CSS custom properties so you can brand controls without touching bundled CSS. Set overrides on media-controller to apply to every player on the page, or combine with className to target a specific instance.

/* All players */
media-controller {
--media-accent-color: #f97316;
--media-menu-background: #1a1a2e;
}
<QuickplayPlayer source={source} className="brand-player" />
/* One specific player */
media-controller.brand-player {
--media-accent-color: #00b4d8;
--media-primary-color: #f0f0f0;
}

Colors

PropertyDefaultDescription
--media-primary-color#ffffffIcon and text fill.
--media-secondary-colortransparentControl bar background tint.
--media-accent-color#0778D6Progress bar fill, range thumb, and menu checkmark.
--media-menu-background#252732Background for overlay menus (audio, quality, etc.).
--media-tooltip-background#252732Tooltip background.
--media-tooltip-text-color#ffffffTooltip text color.
--media-live-button-indicator-color#E42121Live indicator dot.

Seek bar

PropertyDefaultDescription
--media-range-track-backgroundrgba(255, 255, 255, 0.5)Track color.
--media-range-track-pointer-backgroundrgba(255, 255, 255, 0.5)Hover-preview pointer color.
--media-time-range-buffered-colorrgba(255, 255, 255, 0.5)Buffered portion color.

Volume slider

PropertyDefaultDescription
--media-range-track-backgroundrgba(255, 255, 255, 0.2)Track color.
--media-range-thumb-background#ffffffThumb color.

Typography and sizing

PropertyDefaultDescription
--media-font-familyRoboto, sans-serifFont family.
--media-text-colorsame as --media-primary-colorMain text color.
--media-control-hover-backgroundtransparentControl hover state.
--media-range-track-height4pxSeek and volume track height.
--media-range-thumb-height16pxRange thumb height.
--media-range-thumb-width16pxRange thumb width.
--media-range-thumb-border-radius50%Range thumb corner radius.
--media-tooltip-border-radius4pxTooltip corner radius.
--media-tooltip-padding5px 10pxTooltip padding.
--media-tooltip-font-size12pxTooltip font size.

Scale all controls

--base (default 18px) scales control heights, icon sizes, and font sizes together. Use it for compact or large-format players:

media-controller {
--base: 14px; /* smaller controls */
}

Target individual controls

For finer control, target media-chrome elements directly under media-controller.

Note: Targeting individual controls directly is not part of the stable public API and may break across minor releases. Prefer CSS custom properties where possible.

media-controller media-play-button {
width: 48px;
height: 48px;
}

media-controller media-fullscreen-button {
display: none;
}

Next steps

Continue with feature-specific behavior and diagnostics.