{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "audio-player",
  "title": "Audio Player",
  "description": "An audio-only player built on Video.js 10, with a skin that follows the page color scheme and the shadcn/ui tokens, for episodes, tracks and podcasts.",
  "dependencies": [
    "@videojs/react@10.3.0",
    "cn"
  ],
  "registryDependencies": [
    "litingyes/blocove/media-theme",
    "litingyes/blocove/media-tracks"
  ],
  "files": [
    {
      "path": "src/registry/blocove/ui/media/audio.tsx",
      "content": "import type { AudioHTMLAttributes, CSSProperties, ReactNode } from 'react'\nimport type { MediaTrack } from '@/components/blocove/media/tracks'\nimport { I18nProvider } from '@videojs/react'\nimport {\n  Audio as AudioJsMedia,\n  AudioPlayer as AudioJsPlayer,\n  AudioSkin as AudioJsSkin,\n} from '@videojs/react/audio'\nimport { cn } from 'cn'\nimport { MediaTracks } from '@/components/blocove/media/tracks'\nimport { mediaThemeStyle } from '@/lib/blocove/media-theme'\nimport '@videojs/react/audio/skin.css'\n\nexport interface AudioMediaProps extends AudioHTMLAttributes<HTMLAudioElement> {\n  /** Text tracks rendered inside the element. */\n  tracks?: MediaTrack[]\n}\n\n/**\n * The native `<audio>` element the audio item plays through, with text tracks\n * and a metadata-only preload.\n */\nexport function AudioMedia({\n  children,\n  preload = 'metadata',\n  tracks,\n  ...props\n}: AudioMediaProps) {\n  return (\n    <AudioJsMedia preload={preload} {...props}>\n      {tracks\n        ? <MediaTracks tracks={tracks} />\n        : null}\n      {children}\n    </AudioJsMedia>\n  )\n}\n\nexport interface AudioPlayerProps {\n  /** Title the player reports for the current episode or track. */\n  title?: string | null\n  /** Cover art the player reports, drawn by the skin behind the interface. */\n  poster?: string | null\n  /** Brand color for slider fills, highlighted controls and primary actions. */\n  accentColor?: string\n  /** BCP 47 language tag for the player labels, for example `en` or `zh-CN`. */\n  locale?: string\n  className?: string\n  style?: CSSProperties\n  /** The media: `<AudioMedia>` or another audio element for the same player. */\n  children: ReactNode\n}\n\n/**\n * An audio player: the Video.js audio preset and its skin, themed with the\n * shadcn/ui tokens you already have. The skin follows the inherited\n * `color-scheme`, so it adapts to light and dark pages.\n */\nexport function AudioPlayer({\n  title,\n  poster,\n  accentColor,\n  locale,\n  className,\n  style,\n  children,\n}: AudioPlayerProps) {\n  const skin = (\n    <AudioJsSkin\n      className={cn('w-full', className)}\n      style={{\n        ...mediaThemeStyle({ accentColor }),\n        ...style,\n      }}\n    >\n      {children}\n    </AudioJsSkin>\n  )\n\n  return (\n    <AudioJsPlayer title={title} poster={poster}>\n      {locale\n        ? <I18nProvider locale={locale}>{skin}</I18nProvider>\n        : skin}\n    </AudioJsPlayer>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/blocove/media/audio.tsx"
    }
  ],
  "categories": [
    "media"
  ],
  "type": "registry:ui"
}