Skip to main content

Theming

Override CSS custom properties on any ancestor element to theme the player. There is no JS theming API.

/* Scope to a specific page section */
.my-page {
--eve-accent: #00b4d8; /* progress bar, play-progress bar, active states */
--eve-control-bg: rgba(0, 0, 0, 0.7);
--eve-control-color: #fff;
--eve-radius: 8px;
}
PropertyDefaultUsed for
--eve-accent#e00Played-progress bar, hover states, active quality/PiP icon
--eve-control-bgrgba(0, 0, 0, 0.55)Control bar and popup menu backgrounds
--eve-control-color#fffControl bar and menu text / icon colour
--eve-radius4pxCorner radius on menus and popups
--eve-bar-height42pxControl bar height
--eve-progress-dot-size12pxDiameter of the progress-bar scrubber dot (showProgressDot)
--eve-volume-dot-size10pxDiameter of the volume-bar handle dot (showVolumeDot)
--eve-transition0.18s easeShared hover / state transition timing
--eve-chapter-gap2pxWidth of the gap between chapter segments on the progress bar (chapterMarkers)
--eve-pip-width340pxWidth of the floating PiP overlay
--eve-pip-radius10pxCorner radius of the floating PiP overlay
--eve-pip-shadow0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08)Drop shadow of the floating PiP overlay
note

Bookmark markers on the progress bar are currently a fixed colour (not themeable via --eve-accent) to keep them visible against the accent-coloured played-progress bar.

Progress and volume handles​

Both sliders are drawn as a plain bar by default. The round handle ("dot") at the head of the filled portion is opt-in, per bar, and set at construction time:

const player = new EvePlayer(container, {
showProgressDot: true, // dot on the progress bar
showVolumeDot: true, // dot on the volume bar
});

Each dot is a real element (not an icon-font glyph), so it stays centred on its bar at any height, including while the progress bar thickens on hover. Size them with --eve-progress-dot-size / --eve-volume-dot-size; their colours follow --eve-accent (progress) and --eve-control-color (volume).

DOM targeting​

Video.js wraps the <video> in its own root element, which also carries the class video-js, one level below the container you pass. State classes (vjs-paused, vjs-user-active, …) sit on that inner element: target container .video-js from your CSS, not container itself.