Skip to content

ReferenceSkins

CompatLiveVideoSkin

A live video skin designed for broader browser compatibility

The Compat skin of the live video preset provides basic controls and plain surfaces, with broader browser compatibility as its design goal. It shows a Live button in place of time controls. See Customize skins to install and edit its source.

Import

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

Anatomy

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

<LiveVideoPlayer>
  <CompatLiveVideoSkin>
    <HlsVideo />
  </CompatLiveVideoSkin>
</LiveVideoPlayer>

This uses the lightweight HLS video element because most browsers can’t play HLS streams with a plain <video>. See Play live streams.

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.

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

import { CompatLiveVideoSkin, LiveVideoPlayer } from '@videojs/react/live-video';
import { HlsVideo } from '@videojs/react/media/hls-video';

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

export default function BasicUsage() {
  return (
    <LiveVideoPlayer>
      <CompatLiveVideoSkin className="react-live-video-compat-skin-basic">
        <HlsVideo src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" playsInline crossOrigin="anonymous" />
      </CompatLiveVideoSkin>
    </LiveVideoPlayer>
  );
}

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.