Skip to content

ReferenceSkins

video-compat-skin

The video preset's plain, unbranded skin, a polished step above native controls

The Compat skin of the video preset: the same core controls with plain, unbranded surfaces that avoid newer visual effects such as backdrop blur. It puts large play and seek buttons in the center, fullscreen, picture-in-picture, Cast, and AirPlay in a top corner, and chapter segments and thumbnail previews on its time slider. The preset also provides VideoSkin, NeutralVideoSkin, and ScaffoldVideoSkin. See Skins to choose between them and Customize skins to install and edit its source.

Import

import '@videojs/html/video/compat-skin';

The import registers the skin and every UI element it composes. The CDN player bundle registers this skin together with its player:

<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.5.0/video-compat.js"></script>

Anatomy

The skin goes between the player and the media component. It renders its controls around the media.

<video-player>
  <video-compat-skin>
    <video></video>
  </video-compat-skin>
</video-player>

Poster

The skin renders a poster image before playback starts. An element with slot="poster" replaces it.

See Add a poster and loading placeholder for complete examples.

Thumbnail

The skin renders a storyboard preview image while scrubbing the time slider. An <img slot="thumbnail"> replaces it, so image attributes such as crossorigin, loading, and fetchpriority go on it.

See Show timeline thumbnail previews for complete examples.

Controls before playback

Before playback starts, the skin shows only the large center play button. The other controls appear once playback starts or the media begins to autoplay. Set --media-controls-before-start: visible to show them from the start. See Customize skins.

Styling

Packaged skins style themselves and expose a small set of public CSS custom properties. Everything else inside the skin is private and may change between releases. Customize skins documents the properties. For deeper changes, the Video.js registry provides the skin files.

Examples

Basic Usage

<video-player poster="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/thumbnail.jpg">
  <video-compat-skin class="html-video-compat-skin-basic">
    <video src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/highest.mp4" playsinline crossorigin="anonymous">
      <track kind="metadata" label="thumbnails" src="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/storyboard.vtt" default />
    </video>
  </video-compat-skin>
</video-player>

Own the UI

Packaged skins keep their controls and layout inside Video.js. When you need to add, remove, rearrange, or deeply restyle controls, use Shadcn to add the skin source to your project. Its components, layout, styles, and interactions become local files you can change.