Skip to content

ReferenceSkins

CompatLiveAudioSkin

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

The Compat skin of the live audio preset: the same core controls with plain, unbranded surfaces that avoid newer visual effects such as backdrop blur. It shows a Live button in place of time controls and adds captions and AirPlay buttons that the default live audio skin leaves out. The preset also provides LiveAudioSkin, NeutralLiveAudioSkin, and ScaffoldLiveAudioSkin. See Skins to choose between them and Customize skins to install and edit its source.

Import

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

Anatomy

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

<LiveAudioPlayer>
  <CompatLiveAudioSkin>
    <MuxAudio />
  </CompatLiveAudioSkin>
</LiveAudioPlayer>

This uses the Mux audio element: a plain <audio> can’t play HLS in most browsers, and this element reports the live playback state the skin’s Live button needs. See Play live streams.

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 { CompatLiveAudioSkin, LiveAudioPlayer } from '@videojs/react/live-audio';
import { MuxAudio } from '@videojs/react/media/mux-audio';

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

export default function BasicUsage() {
  return (
    <LiveAudioPlayer>
      <CompatLiveAudioSkin className="react-live-audio-compat-skin-basic">
        <MuxAudio src="https://stream.mux.com/v69RSHhFelSm4701snP22dYz2jICy4E4FUyk02rW4gxRM.m3u8" crossOrigin="anonymous" />
      </CompatLiveAudioSkin>
    </LiveAudioPlayer>
  );
}

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.