# 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](https://videojs.org/docs/framework/react/guides/customize-skins) to install and edit its source.

## Import

```tsx
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.

```tsx
<LiveVideoPlayer>
  <CompatLiveVideoSkin>
    <HlsVideo />
  </CompatLiveVideoSkin>
</LiveVideoPlayer>
```

This uses the lightweight [HLS video element](https://videojs.org/docs/framework/react/reference/components/hls-video) because most browsers can’t play HLS streams with a plain `<video>`. See [Play live streams](https://videojs.org/docs/framework/react/guides/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](https://videojs.org/docs/framework/react/guides/poster) 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](https://videojs.org/docs/framework/react/guides/customize-skins#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.

## Examples

### Basic Usage

**App.tsx**

```tsx
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>
  );
}
```

**App.css**

```css
.react-live-video-compat-skin-basic {
  width: 100%;
  aspect-ratio: 16 / 9;
}
```

## 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.

- [Install Video.js with Shadcn](https://videojs.org/docs/guides/installation/shadcn?framework=react#choose-how-to-install): Add editable skin source and build a working React or HTML player

---

React documentation: https://videojs.org/docs/framework/react/llms.txt
All documentation: https://videojs.org/llms.txt
