Theming with tokens

skin

Change accent, radius and control size live through CSS design tokens.

Accent
Corner radius
Control size

Every skin reads the same --tp-* design tokens. Change them per player, per page or globally, with no rebuild.

Big Buck Bunny © Blender Foundation, CC BY 3.0, via Wikimedia Commons. HLS test stream by Mux, DASH by Akamai.

The code

tsx
createPlayer('#player', {
src: 'movie.mp4',
skin: minimal(),
tokens: {
"accent": "#e5372a",
"radius": "12px",
"control-size": "40px"
},
});
​
/* or in CSS */
.tomato-player { --tp-accent: #e5372a; --tp-radius: 12px; --tp-control-size: 40px; }