Skip to content

ReferenceSkins

CompatAudioSkin

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

The Compat skin of the audio preset: the same core controls with plain, unbranded surfaces that avoid newer visual effects such as backdrop blur. Its time slider supports chapter segments and thumbnail previews, and it adds captions and AirPlay buttons that the default audio skin leaves out. The preset also provides AudioSkin, NeutralAudioSkin, and ScaffoldAudioSkin. See Skins to choose between them and Customize skins to install and edit its source.

Import

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

Anatomy

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

<AudioPlayer>
  <CompatAudioSkin>
    <Audio />
  </CompatAudioSkin>
</AudioPlayer>

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 { Audio, AudioPlayer, CompatAudioSkin } from '@videojs/react/audio';

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

export default function BasicUsage() {
  return (
    <AudioPlayer>
      <CompatAudioSkin className="react-audio-compat-skin-basic">
        <Audio src="https://stream.mux.com/BV3YZtogl89mg9VcNBhhnHm02Y34zI1nlMuMQfAbl3dM/audio.m4a" crossOrigin="anonymous" />
      </CompatAudioSkin>
    </AudioPlayer>
  );
}

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.