Getting started
Swap <video> for <VideoPlayer>. Same props and calmer controls. The shadcn CLI puts the source in your repo, so you own every line.
$ npx shadcn@latest add https://bobine.fyi/r/video-player.jsonVideo
Every attribute you would put on a native video element works unchanged. Controls fade away while it plays and return the moment you move.
import { VideoPlayer } from "@/components/ui/video-player"
<VideoPlayer
src="/clip.mp4"
poster="/clip.jpg"
tracks={[{ src: "/clip.en.vtt", label: "English", srcLang: "en" }]}
persistKey="bobine"
/>Audio
Built from the same parts and styled with your theme tokens, so it matches your app in light and dark mode.
$ npx shadcn@latest add https://bobine.fyi/r/audio-player.jsonimport { AudioPlayer } from "@/components/ui/audio-player"
<AudioPlayer src="/episode.mp3" title="Episode 12" description="Field notes" />Or install the package
Prefer a dependency over owning the source? The same components ship as bobinejs, with a framework-agnostic core. The players read shadcn theme tokens, so run npx shadcn@latest init first, or define background, foreground, card, muted, popover, primary and border yourself. For HLS, also add hls.js.
$ pnpm add bobinejs/* globals.css */
@import "tailwindcss";
@import "bobinejs/styles.css";
import { VideoPlayer, AudioPlayer } from "bobinejs"
/* bobinejs/hls needs hls.js: pnpm add hls.js */
import { hlsLoader } from "bobinejs/hls"
import { createMediaStore } from "bobinejs/core"Use with agents
Install the bobine skill so your coding agent knows the components, props and pitfalls. The full docs are also plain text at /llms-full.txt.
$ npx skills add SanyamPunia/bobineAdd bobine media players to this React project.
1. Read https://bobine.fyi/llms-full.txt for the full bobine docs before you change code.
2. If the project has no components.json, run npx shadcn@latest init first. bobine needs React 19, Tailwind CSS 4 and shadcn theme tokens.
3. Install the video player with the shadcn CLI:
npx shadcn@latest add https://bobine.fyi/r/video-player.json
For audio, also run: npx shadcn@latest add https://bobine.fyi/r/audio-player.json
For HLS streams, also run: npx shadcn@latest add https://bobine.fyi/r/media-hls.json
4. Replace each <video controls> element with <VideoPlayer> from "@/components/ui/video-player". Keep src, poster, tracks and the other native props. Remove the controls attribute.
5. Replace each <audio controls> element with <AudioPlayer> from "@/components/ui/audio-player" in the same way.
6. For .m3u8 sources, pass loader={hlsLoader} from "@/lib/media-hls" in a client component.
7. Do not restyle the installed components unless I ask. They use the project's shadcn theme tokens.