Drop-in video and audio players for React.
Swap <video> for <VideoPlayer> and keep every native prop.
Docs | Examples | Reference | npm
- Native props. Every attribute you put on a video or audio element works unchanged.
- Source you own. The shadcn CLI copies the components into your repo. Edit any line.
- Keyboard first. Space, J, K, L, arrows and more, scoped to the focused player.
- Adaptive streams. Add the HLS loader. hls.js loads only when an
.m3u8source appears. - Your theme. Styled with your tokens, so it matches your app in light and dark.
- Composable. Unstyled parts and a selector hook for when the defaults do not fit.
Copy the source into your project with the shadcn CLI:
npx shadcn@latest add https://bobine.fyi/r/video-player.json| Item | What you get |
|---|---|
video-player |
<VideoPlayer> with auto-hiding controls, captions and a settings menu |
audio-player |
<AudioPlayer> that follows your theme tokens |
media |
The store and unstyled parts, to compose your own player |
media-hls |
The HLS loader. hls.js loads on demand, only when an .m3u8 source appears |
Or install the package. It needs React 19, Tailwind CSS v4 and shadcn theme tokens.
pnpm add bobinejsSetup for the package is in packages/bobine.
Change the element name and drop controls. Sources, posters and caption tracks stay as they are.
import { VideoPlayer } from "@/components/ui/video-player"
<VideoPlayer
src="/clip.mp4"
poster="/clip.jpg"
tracks={[{ src: "/clip.en.vtt", label: "English", srcLang: "en", default: true }]}
/>Captions and playback speed share one settings menu:
The audio player uses the same parts:
import { AudioPlayer } from "@/components/ui/audio-player"
<AudioPlayer src="/episode.mp3" title="Morning Drift" description="Demo track" showSpeed />
Composition, streaming, every part and every keyboard shortcut are in the docs.
Install the skill so your coding agent knows the components, props and common mistakes:
npx skills add SanyamPunia/bobineThe skill lives in skills/bobine. The site also serves:
/llms.txt: index of the docs and registry/llms-full.txt: the full docs in one file/docs.md: the docs page as Markdown
pnpm install
pnpm dev # site on localhost:3000
pnpm check # typecheck, lint, test and build: run before every push
pnpm package:build # the npm package