HLS Media
Adaptive HLS video and audio elements that play a manifest through the same shells as a progressive file, filling the quality menu from the renditions the stream declares.
The adaptive elements play an HLS manifest through the shells you already composed: the player and the skin do not change, the quality menu fills itself from the renditions the manifest declares, and captions stay plain `tracks` data. Video.js 10 ships the stream engine, so HLS plays over Media Source Extensions without another dependency, and the engine resolves the segment URIs relative to the manifest it was given. `streamType` defaults to the detected value; pin it when you know the delivery up front, for example `streamType="live"` inside the live shell. The demos play the committed fixtures generated by `scripts/generate-media-samples.sh`.
Preview

Installation
Add the item with the shadcn CLI, or copy the source manually.
pnpm dlx shadcn@latest add litingyes/blocove/hls-mediaRequires a shadcn/ui project set up with Base UI primitives. Blocove is developed against the b0 preset, but it installs no base config or theme tokens: your own preset, fonts and colors stay in place.
Or install from the namespace after adding the registry: npx shadcn@latest add @blocove/hls-media
This example also uses: video-playeraudio-player
pnpm dlx shadcn@latest add litingyes/blocove/video-player litingyes/blocove/audio-playerAPI Reference
Props accepted by the exported components.
HlsVideoMedia
The adaptive `<video>` element. It registers itself as the player's media on mount like the progressive element does, so the same shells play a manifest: the skin, the controls and the settings menu do not change, and the quality menu fills itself from the renditions the manifest declares.
| Prop | Type | Default |
|---|---|---|
src | string | - |
source | HlsVideoSource | null | null |
preload | 'none' | 'metadata' | 'auto' | 'metadata' |
crossOrigin | 'anonymous' | 'use-credentials' | '' | null | null |
disableRemotePlayback | boolean | false |
streamType | 'on-demand' | 'live' | 'unknown' | 'unknown' |
playsInline | boolean | true |
tracks | MediaTrack[] | - |
...props | VideoHTMLAttributes<HTMLVideoElement> | - |
HlsAudioMedia
The adaptive `<audio>` element. It plays the audio rendition of a manifest through the same audio shell as a progressive file, so an episode can move from a download to a playlist without touching the interface.
| Prop | Type | Default |
|---|---|---|
src | string | - |
source | { src?: string, type?: string, drm?: DrmSystemsConfig } | null | null |
preload | 'none' | 'metadata' | 'auto' | 'metadata' |
crossOrigin | 'anonymous' | 'use-credentials' | '' | null | null |
disableRemotePlayback | boolean | false |
tracks | MediaTrack[] | - |
...props | AudioHTMLAttributes<HTMLAudioElement> | - |