{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "video-player",
  "title": "Video Player",
  "description": "An on-demand video player built on Video.js 10, with the skin themed by the shadcn/ui tokens, a composable media element and declarative text tracks.",
  "dependencies": [
    "@videojs/react@10.3.0",
    "cn"
  ],
  "registryDependencies": [
    "litingyes/blocove/media-theme",
    "litingyes/blocove/media-tracks"
  ],
  "files": [
    {
      "path": "src/registry/blocove/ui/media/video.tsx",
      "content": "import type { VideoSkinProps } from '@videojs/react/video'\nimport type { CSSProperties, ReactNode, VideoHTMLAttributes } from 'react'\nimport type { MediaTrack } from '@/components/blocove/media/tracks'\nimport type { MediaAspectRatio, MediaThemeOptions } from '@/lib/blocove/media-theme'\nimport { I18nProvider } from '@videojs/react'\nimport {\n  Video as VideoJsMedia,\n  VideoPlayer as VideoJsPlayer,\n  VideoSkin as VideoJsSkin,\n} from '@videojs/react/video'\nimport { cn } from 'cn'\nimport { MediaTracks } from '@/components/blocove/media/tracks'\nimport { mediaAspectRatioStyle, mediaThemeStyle } from '@/lib/blocove/media-theme'\nimport '@videojs/react/video/skin.css'\n\nexport interface VideoMediaProps extends VideoHTMLAttributes<HTMLVideoElement> {\n  /** Text tracks rendered inside the element. */\n  tracks?: MediaTrack[]\n}\n\n/**\n * The native `<video>` element every video item plays through. It registers\n * itself as the player's media on mount, so another media element can take its\n * place without changing the shell.\n */\nexport function VideoMedia({\n  children,\n  playsInline = true,\n  preload = 'metadata',\n  tracks,\n  ...props\n}: VideoMediaProps) {\n  return (\n    <VideoJsMedia playsInline={playsInline} preload={preload} {...props}>\n      {tracks\n        ? <MediaTracks tracks={tracks} />\n        : null}\n      {children}\n    </VideoJsMedia>\n  )\n}\n\nexport interface VideoPlayerProps {\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?: VideoSkinProps['renderPoster']\n  /** Replaces the storyboard frame the skin draws while scrubbing the timeline. */\n  renderThumbnail?: VideoSkinProps['renderThumbnail']\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: `<VideoMedia>` or another media element for the same player. */\n  children: ReactNode\n}\n\n/**\n * An on-demand video player: the Video.js video preset and its skin, themed\n * with the shadcn/ui tokens you already have. Compose the media inside it.\n */\nexport function VideoPlayer({\n  title,\n  poster,\n  aspectRatio = 'video',\n  accentColor,\n  objectFit,\n  objectPosition,\n  renderPoster,\n  renderThumbnail,\n  locale,\n  className,\n  style,\n  children,\n}: VideoPlayerProps) {\n  const skin = (\n    <VideoJsSkin\n      className={cn('w-full', className)}\n      style={{\n        ...mediaThemeStyle({ accentColor, objectFit, objectPosition }),\n        ...mediaAspectRatioStyle(aspectRatio),\n        ...style,\n      }}\n      renderPoster={renderPoster}\n      renderThumbnail={renderThumbnail}\n    >\n      {children}\n    </VideoJsSkin>\n  )\n\n  return (\n    <VideoJsPlayer title={title} poster={poster}>\n      {locale\n        ? <I18nProvider locale={locale}>{skin}</I18nProvider>\n        : skin}\n    </VideoJsPlayer>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/blocove/media/video.tsx"
    }
  ],
  "categories": [
    "media"
  ],
  "type": "registry:ui"
}