Skip to content

ReferenceSkins

CompatVideoSkin

A video skin designed for broader browser compatibility

The Compat skin of the video preset provides basic controls and plain surfaces, with broader browser compatibility as its design goal. Its time slider supports chapter segments and thumbnail previews. See Customize skins to install and edit its source.

Import

import { CompatVideoSkin } from '@videojs/react/video';
import '@videojs/react/video/compat-skin.css';

Anatomy

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

<VideoPlayer>
  <CompatVideoSkin>
    <Video />
  </CompatVideoSkin>
</VideoPlayer>

Poster

The skin renders a poster image before playback starts. Pass renderPoster to replace it with your own component.

See Add a poster and loading placeholder for complete examples.

Thumbnail

The skin renders a storyboard preview image while scrubbing the time slider. Pass renderThumbnail to replace it with your own image, for example to set crossOrigin, loading, or fetchPriority.

See Show timeline thumbnail previews for complete examples.

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

0:00
import { CompatVideoSkin, Video, VideoPlayer } from '@videojs/react/video';

import '@videojs/react/video/compat-skin.css';

export default function BasicUsage() {
  return (
    <VideoPlayer poster="https://image.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/thumbnail.jpg">
      <CompatVideoSkin className="react-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>
      </CompatVideoSkin>
    </VideoPlayer>
  );
}

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.