{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "live-player",
  "title": "Live Player",
  "description": "Live video and audio players built on the Video.js live presets: the live button, the DVR window and the same skin settings as the on-demand items.",
  "dependencies": [
    "@videojs/react@10.3.0",
    "cn"
  ],
  "registryDependencies": [
    "litingyes/blocove/media-theme"
  ],
  "files": [
    {
      "path": "src/registry/blocove/ui/media/live.tsx",
      "content": "import type { LiveVideoSkinProps } from '@videojs/react/live-video'\nimport type { CSSProperties, ReactNode } from 'react'\nimport type { MediaAspectRatio, MediaThemeOptions } from '@/lib/blocove/media-theme'\nimport { I18nProvider } from '@videojs/react'\nimport {\n  LiveAudioPlayer as LiveAudioJsPlayer,\n  LiveAudioSkin as LiveAudioJsSkin,\n} from '@videojs/react/live-audio'\nimport {\n  LiveVideoPlayer as LiveVideoJsPlayer,\n  LiveVideoSkin as LiveVideoJsSkin,\n} from '@videojs/react/live-video'\nimport { cn } from 'cn'\nimport { mediaAspectRatioStyle, mediaThemeStyle } from '@/lib/blocove/media-theme'\nimport '@videojs/react/live-audio/skin.css'\nimport '@videojs/react/live-video/skin.css'\n\nexport interface LiveVideoPlayerProps {\n  /** Title the player reports, shown by the interface; overrides the media's. */\n  title?: string | null\n  /** Poster the player reports, shown before playback; overrides the media's. */\n  poster?: string | null\n  /** The player's aspect ratio. */\n  aspectRatio?: MediaAspectRatio\n  /** Brand color for slider fills, highlighted controls and primary actions. */\n  accentColor?: string\n  /** How the video and poster fill the player. */\n  objectFit?: MediaThemeOptions['objectFit']\n  /** Where the video and poster sit when they do not fill the player. */\n  objectPosition?: string\n  /** Replaces the poster image the skin draws. */\n  renderPoster?: LiveVideoSkinProps['renderPoster']\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: `<HlsVideoMedia>` or another video element for the same player. */\n  children: ReactNode\n}\n\n/**\n * A live video player: the Video.js live video preset and its skin, which swaps\n * the time controls for a live button that seeks back to the edge. The media\n * element stays a separate item, so an HLS stream and a progressive file play\n * through the same interface.\n */\nexport function LiveVideoPlayer({\n  title,\n  poster,\n  aspectRatio = 'video',\n  accentColor,\n  objectFit,\n  objectPosition,\n  renderPoster,\n  locale,\n  className,\n  style,\n  children,\n}: LiveVideoPlayerProps) {\n  const skin = (\n    <LiveVideoJsSkin\n      className={cn('w-full', className)}\n      style={{\n        ...mediaThemeStyle({ accentColor, objectFit, objectPosition }),\n        ...mediaAspectRatioStyle(aspectRatio),\n        ...style,\n      }}\n      renderPoster={renderPoster}\n    >\n      {children}\n    </LiveVideoJsSkin>\n  )\n\n  return (\n    <LiveVideoJsPlayer title={title} poster={poster}>\n      {locale\n        ? <I18nProvider locale={locale}>{skin}</I18nProvider>\n        : skin}\n    </LiveVideoJsPlayer>\n  )\n}\n\nexport interface LiveAudioPlayerProps {\n  /** Title the player reports for the current stream or episode. */\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: `<HlsAudioMedia>` or another audio element for the same player. */\n  children: ReactNode\n}\n\n/**\n * A live audio player: the Video.js live audio preset and its skin, for streams,\n * radio and live episodes. The skin follows the inherited `color-scheme`, so it\n * adapts to light and dark pages.\n */\nexport function LiveAudioPlayer({\n  title,\n  poster,\n  accentColor,\n  locale,\n  className,\n  style,\n  children,\n}: LiveAudioPlayerProps) {\n  const skin = (\n    <LiveAudioJsSkin\n      className={cn('w-full', className)}\n      style={{\n        ...mediaThemeStyle({ accentColor }),\n        ...style,\n      }}\n    >\n      {children}\n    </LiveAudioJsSkin>\n  )\n\n  return (\n    <LiveAudioJsPlayer title={title} poster={poster}>\n      {locale\n        ? <I18nProvider locale={locale}>{skin}</I18nProvider>\n        : skin}\n    </LiveAudioJsPlayer>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/blocove/media/live.tsx"
    }
  ],
  "categories": [
    "media"
  ],
  "type": "registry:ui"
}