# live-video-compat-skin

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/html/guides/customize-skins) to install and edit its source.

## Import

```ts
import '@videojs/html/live-video/compat-skin';
```

## Anatomy

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

```html
<live-video-player>
  <live-video-compat-skin>
    <hls-video></hls-video>
  </live-video-compat-skin>
</live-video-player>
```

This uses the lightweight [HLS video element](https://videojs.org/docs/framework/html/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/html/guides/live-streams).

## Poster

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

See [Add a poster and loading placeholder](https://videojs.org/docs/framework/html/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/html/guides/customize-skins#style-a-packaged-skin) documents the properties. For deeper changes, the Video.js registry provides the skin files.

## Examples

### Basic Usage

**index.html**

```html
<live-video-player>
  <live-video-compat-skin class="html-live-video-compat-skin-basic">
    <hls-video src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" playsinline crossorigin="anonymous"></hls-video>
  </live-video-compat-skin>
</live-video-player>
```

**index.css**

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

**index.ts**

```ts
import '@videojs/html/live-video/player';
import '@videojs/html/live-video/compat-skin';
import '@videojs/html/media/hls-video';
```

## 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=html#choose-how-to-install): Add editable skin source and build a working React or HTML player

---

HTML documentation: https://videojs.org/docs/framework/html/llms.txt
All documentation: https://videojs.org/llms.txt
