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 variables so you can brand controls while keeping the underlying control implementation stable. Set these on the player's container or any ancestor in your stylesheet.

VariableDefaultDescription
--media-primary-color#ffffffIcon and text fill color.
--media-secondary-colortransparentControl bar background tint.
--media-accent-color#0778D6Progress bar fill and range thumb accent.
--media-font-familyRoboto, sans-serifFont family for all player text.
--media-text-colorsame as --media-primary-colorMain text color.
--media-menu-backgroundrgba(28,28,28,0.6)Background for overlay menus.
--media-control-hover-backgroundtransparentControl hover background.
--media-range-track-height4pxHeight of the seek and volume track.
--media-range-thumb-height16pxSeek and volume thumb height.
--media-range-thumb-width16pxSeek and volume thumb width.
--media-range-thumb-border-radius50%Seek and volume thumb corner radius.
--media-tooltip-background#252732Tooltip background.
--media-tooltip-border-radius4pxTooltip corner radius.
--media-tooltip-padding5px 10pxTooltip padding.
--media-tooltip-font-size12pxTooltip font size.

Target a specific player instance with the className prop:

<QuickplayPlayer source={source} className="brand-player" />

Then set CSS variables on that class:

.brand-player {
--media-primary-color: #ff6b00;
--media-accent-color: #ff6b00;
--media-font-family: 'Inter', sans-serif;
}

Target player elements when needed

For finer control, you can target media-chrome elements under .qp-player.

Note: Overriding internal media-chrome elements directly is not part of the stable public API and may break across minor releases. Prefer CSS custom properties where possible.

.qp-player media-play-button {
width: 48px;
height: 48px;
}

.qp-player media-fullscreen-button {
display: none;
}

Next steps

Continue with feature-specific behavior and diagnostics.