live-audio-skin
The live audio preset's default skin, which swaps time controls for a Live button
The default skin of the live audio preset: the audio layout with the time slider and time displays swapped for a Live button. MinimalLiveAudioSkin is the same preset’s other variant. See Skins for how packaged skins work and Presets for what the live audio preset ships.
Import
import { LiveAudioSkin } from '@videojs/react/live-audio';
import '@videojs/react/live-audio/skin.css';import '@videojs/html/live-audio/skin';The import registers the skin and every UI element it composes. The CDN player bundle registers this skin together with its player:
<script type="module" src="https://cdn.jsdelivr.net/npm/@videojs/cdn@10.0.0-beta.32/live-audio.js"></script>Usage
The skin goes between the player and the media element. It renders its controls around the media.
<LiveAudioPlayer>
<LiveAudioSkin>
<MuxAudio src="live.m3u8" />
</LiveAudioSkin>
</LiveAudioPlayer><live-audio-player>
<live-audio-skin>
<mux-audio src="live.m3u8"></mux-audio>
</live-audio-skin>
</live-audio-player>The examples use 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. When you need deeper changes, eject the skin.
Eject the skin
The @videojs/live-audio skin installs under components/videojs/skins/live-audio. The player and media remain package imports. Follow Customize skins to set up the CLI, install the skin, and use the copied files.