← ui

player

ui · paid

the controls for a video or any clock: a bar cut in chapters, transport, speed

npx shadcn add @ag/player

A paid item: its source installs with a licence key, kept in .env.local as AG_LICENCE_KEY and sent from components.json. The source stays in your project and out of any public repository. The licence

components.json
{
  "registries": {
    "@ag": {
      "url": "https://ui.adriangalilea.com/r/{name}.json",
      "headers": { "Authorization": "Bearer ${AG_LICENCE_KEY}" }
    }
  }
}
Already installed? Preview an update
npx shadcn add @ag/player --dry-run

Your installed source stays unchanged until you update it. How updates work

Latest changes · 2026-11-05
  • Changed (breaking): Player takes playable where it took clip. Migration: playable={…}.
Updated 2026-11-05 · release notes

also called video player, media player, audio player

shelves media, motion

uses playable, timebase, playback, button, material, popover, tooltip, menu, kbd, keys, key-router, image, media-line, scrims, scroll-area

used by film-mosaic

the demo above, verbatim

player.demo.tsx
"use client"

import { Sample } from "@/app/samples"
import artJson from "@/public/macos/awake/art.json"
import heroJson from "@/public/macos/awake/hero.json"
import {
  type Art,
  sceneClock,
  type Timeline,
} from "@/registry/base-nova/lib/macos-session"
import { ClaudeCode } from "@/registry/base-nova/ui/claude-code"
import { Codex } from "@/registry/base-nova/ui/codex"
import { Macos } from "@/registry/base-nova/ui/macos"
import {
  Player,
  PlayerBar,
  PlayerCaptions,
  PlayerChrome,
  PlayerFoot,
  PlayerFullscreen,
  PlayerSound,
  PlayerSpeed,
  PlayerTransport,
} from "@/registry/base-nova/ui/player"
import {
  VideoPicture,
  VideoPlayback,
} from "@/registry/base-nova/ui/video-playback"

// #region macos
const HERO = heroJson as Timeline
const CLOCK = sceneClock(HERO)
const AGENTS = { claude: ClaudeCode, codex: Codex }
// #endregion

// #region faces
const MOON = {
  src: "/kennedy/moon.mp4",
  poster: "/kennedy/moon.jpg",
  width: 640,
  height: 480,
  label: "We choose to go to the Moon",
  captions: [
    {
      src: "/kennedy/moon.en.vtt",
      lang: "en",
      label: "English",
      default: true,
    },
    { src: "/kennedy/moon.es.vtt", lang: "es", label: "español" },
  ],
}
// #endregion

export default function PlayerDemo() {
  return (
    <div className="space-y-12">
      <Sample
        name="video"
        glance="large"
        title="a video, its bar"
        description="the plain chrome over one video: a transport in the middle, the bar at the foot"
        with="faces"
      >
        <div className="w-full max-w-md">
          <VideoPlayback {...MOON}>
            <VideoPicture>
              <PlayerChrome>
                <PlayerTransport />
                <PlayerFoot>
                  <PlayerBar label={MOON.label} playButton={false}>
                    <PlayerCaptions />
                    <PlayerSound />
                    <PlayerFullscreen />
                  </PlayerBar>
                </PlayerFoot>
              </PlayerChrome>
            </VideoPicture>
          </VideoPlayback>
        </div>
      </Sample>
      <Sample
        name="macos"
        title="a macos stage"
        description="its captions are the chapters"
        with="macos"
      >
        <Player
          playable={CLOCK.playable}
          label="awake's hero scene"
          chapters="hover"
        >
          <Macos
            timeline={HERO}
            art={artJson as Art}
            agents={AGENTS}
            accent="#e7a13c"
            device="macbook"
            alt="awake: Claude Code at work, ⌃⌥⌘A keeps the Mac awake, the lid closes, the work gets done"
          />
        </Player>
      </Sample>
      <Sample
        name="faces"
        title="plain and glass"
        description="the chrome's material is every part's inside it, their menus and tooltips too; the picture makes them dark"
        with="faces"
      >
        <div className="grid gap-6 sm:grid-cols-2">
          {(["plain", "glass"] as const).map((material) => (
            <VideoPlayback key={material} {...MOON}>
              <VideoPicture>
                <PlayerChrome material={material}>
                  <PlayerTransport />
                  <PlayerFoot>
                    <PlayerBar
                      label={MOON.label}
                      chapters="hover"
                      playButton={false}
                    >
                      <PlayerCaptions />
                      <PlayerSpeed />
                      <PlayerSound />
                      <PlayerFullscreen />
                    </PlayerBar>
                  </PlayerFoot>
                </PlayerChrome>
              </VideoPicture>
            </VideoPlayback>
          ))}
        </div>
      </Sample>
    </div>
  )
}