Skip to content

Player — Theming & Customization

Both the Player and StreamCrafter ship with built-in theme presets. Apply with a single prop:

// React
<Player contentId="a1b2c3d4e5f6g7h8" contentType="live" options={{ theme: "dracula" }} />
<StreamCrafter whipUrl="..." theme="tokyo-night" />
<!-- Web Components -->
<fw-player content-id="a1b2c3d4e5f6g7h8" theme="nord"></fw-player>
<fw-streamcrafter whip-url="..." theme="catppuccin"></fw-streamcrafter>
// Vanilla
const player = createPlayer({ ..., theme: "rose-pine" });
const studio = createStreamCrafter({ ..., theme: "gruvbox" });
ThemeModeAccent
defaultDarkBlue
lightLightBlue
neutral-darkDarkBlue
tokyo-nightDarkBlue
tokyo-night-lightLightBlue
draculaDarkPurple
nordDarkFrost blue
catppuccinDarkMauve
catppuccin-lightLightMauve
gruvboxDarkYellow
gruvbox-lightLightYellow
one-darkDarkBlue
github-darkDarkBlue
rose-pineDarkIris (purple)
solarizedDarkCyan
solarized-lightLightCyan
ayu-mirageDarkOrange
// Vanilla player
player.theme = "tokyo-night";
// Vanilla studio
studio.theme = "catppuccin";

Color tokens use bare HSL triplets. Consume via hsl(var(--fw-*) / <alpha>) for opacity support. --fw-radius is a CSS length (for example 8px).

Colors

TokenPurpose
--fw-accentPrimary interactive color
--fw-accent-secondarySecondary accent
--fw-successSuccess indicators
--fw-dangerError and destructive actions
--fw-warningWarning indicators
--fw-infoInformational indicators
--fw-liveLive badge and pulse
--fw-on-accentText/icons on accent fills
--fw-on-liveText/icons on live fills

Surfaces

TokenPurpose
--fw-surfaceDefault background
--fw-surface-deepDeepest background layer
--fw-surface-raisedElevated elements (controls, menus)
--fw-surface-activeActive/pressed state

Text

TokenPurpose
--fw-textPrimary text
--fw-text-brightHigh-emphasis text
--fw-text-mutedSecondary text
--fw-text-faintDisabled and hint text

Layout

TokenPurpose
--fw-shadow-colorShadow HSL base
--fw-radiusBorder radius (CSS length, default 0)
TokenPurpose
--fw-sc-surface-deepDeepest background
--fw-sc-surfacePanel surfaces
--fw-sc-surface-raisedElevated surfaces
--fw-sc-surface-activeActive/pressed state
--fw-sc-borderBorder color
--fw-sc-textPrimary text
--fw-sc-text-brightHigh-emphasis text
--fw-sc-text-mutedSecondary text
--fw-sc-text-faintDisabled and hint text
--fw-sc-accentInteractive elements
--fw-sc-accent-secondarySecondary accent
--fw-sc-successSuccess indicators
--fw-sc-dangerError/destructive actions
--fw-sc-warningWarning indicators
--fw-sc-infoInformational indicators
--fw-sc-liveLive indicator

CSS (global, React/Svelte/vanilla)

/* Player: load after player.css */
.fw-player-root {
--fw-accent: 280 70% 60%;
--fw-surface: 0 0% 10%;
}
/* Studio */
.fw-sc-root {
--fw-sc-accent: 262 80% 60%;
--fw-sc-surface-deep: 230 15% 12%;
}

Page CSS cannot theme the web components this way. <fw-player> and <fw-streamcrafter> redeclare every token on their root element inside the shadow root, so custom properties set on the host element have no effect. Use the theme attribute (both elements) or the themeOverrides property (<fw-player>) instead.

JavaScript (per-instance)

// Player
player.setThemeOverrides({
accent: "262 80% 60%",
surface: "230 15% 12%",
radius: "12px",
});
player.clearTheme(); // Reset to preset
// Studio
studio.theme = {
accent: "262 80% 60%",
surfaceDeep: "230 15% 12%",
};

Five built-in locale packs: en, es, fr, de, nl.

// React
<Player
contentId="a1b2c3d4e5f6g7h8"
contentType="live"
options={{
locale: "de",
translations: {
play: "Starten",
pause: "Pausieren",
},
}}
/>
// Vanilla
import { getLocalePack } from "@livepeer-frameworks/player-core";
import { createPlayer } from "@livepeer-frameworks/player-core/vanilla";
const player = createPlayer({
...,
locale: "de",
translations: {
play: "Starten",
pause: "Pausieren",
},
});
// Or fetch specific translation strings
const deTranslations = getLocalePack("de");
<!-- Svelte -->
<Player
contentId="a1b2c3d4e5f6g7h8"
contentType="live"
options={{
locale: "de",
translations: {
play: "Starten",
pause: "Pausieren",
},
}}
/>
// Web component
const player = document.querySelector("fw-player");
player.locale = "de";
player.translations = {
play: "Starten",
pause: "Pausieren",
};

Translation overrides are layered over the selected locale pack, so you only need to provide the strings you want to rename for your product.

// React
<StreamCrafter whipUrl="..." locale="es" />;
// Vanilla
const studio = createStreamCrafter({
whipUrl: "...",
locale: "de",
translations: {
goLive: "Live gehen",
stopStreaming: "Stoppen",
},
});

Default player shortcuts:

ShortcutAction
Space / KPlay/Pause
J / ArrowLeftSkip back 10s
L / ArrowRightSkip forward 10s
ArrowUp / ArrowDownVolume +/- 10%
MMute/Unmute
FFullscreen
CCaptions
0-9Seek to 0-90%
, / .Prev/Next frame (paused)

Mouse / Touch:

GestureAction
Double-clickFullscreen toggle
Double-tap (left/right)Skip +/- 10s
Click & Hold2x speed
const studio = createStreamCrafter({
whipUrl: "...",
keyMap: {
toggleStream: ["g"],
toggleMute: ["m"],
addCamera: ["c"],
shareScreen: ["s"],
toggleSettings: [","],
},
});