{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ambient-video",
  "title": "Ambient Video",
  "description": "Chrome-less background video for heroes and section backgrounds: autoplaying, muted and looping, with a slot for the content drawn over it.",
  "dependencies": [
    "@videojs/react@10.3.0",
    "cn"
  ],
  "registryDependencies": [
    "litingyes/blocove/media-theme"
  ],
  "files": [
    {
      "path": "src/registry/blocove/ui/media/ambient-video.tsx",
      "content": "import type { CSSProperties, ReactNode } from 'react'\nimport type { MediaAspectRatio } from '@/lib/blocove/media-theme'\nimport {\n  BackgroundVideo as BackgroundVideoMedia,\n  BackgroundVideoPlayer,\n  BackgroundVideoSkin,\n} from '@videojs/react/background'\nimport { cn } from 'cn'\nimport { mediaAspectRatioStyle, mediaThemeStyle } from '@/lib/blocove/media-theme'\nimport '@videojs/react/background/skin.css'\n\nexport interface AmbientVideoProps {\n  /** The video source. Keep it short and loopable, and serve a format every target browser plays. */\n  src: string\n  /** Image shown before the first frame is available. */\n  poster?: string\n  /** The surface's aspect ratio; `auto` fills whatever box the layout gives it. */\n  aspectRatio?: MediaAspectRatio\n  /**\n   * Whether the video plays on its own. The player always mutes and loops it, so\n   * browsers allow playback without a gesture.\n   */\n  autoPlay?: boolean\n  className?: string\n  style?: CSSProperties\n  /**\n   * Content drawn over the video, such as a headline or a call to action. It is\n   * rendered next to the player, so position it with your own classes.\n   */\n  children?: ReactNode\n}\n\n/**\n * Chrome-less ambient video for heroes and section backgrounds: muted, looped\n * and autoplaying, with no visible controls. Render it decorative-only, or put\n * real content on top and point the video at the same story.\n */\nexport function AmbientVideo({\n  src,\n  poster,\n  aspectRatio = 'video',\n  autoPlay = true,\n  className,\n  style,\n  children,\n}: AmbientVideoProps) {\n  return (\n    <div\n      data-slot=\"ambient-video\"\n      className={cn('relative w-full overflow-hidden', className)}\n      style={{\n        ...mediaThemeStyle(),\n        ...mediaAspectRatioStyle(aspectRatio),\n        ...style,\n      }}\n    >\n      <BackgroundVideoPlayer>\n        <BackgroundVideoSkin className=\"h-full w-full\">\n          <BackgroundVideoMedia autoPlay={autoPlay} poster={poster} src={src} />\n        </BackgroundVideoSkin>\n      </BackgroundVideoPlayer>\n      {children}\n    </div>\n  )\n}\n",
      "type": "registry:ui",
      "target": "components/blocove/media/ambient-video.tsx"
    }
  ],
  "categories": [
    "media"
  ],
  "type": "registry:ui"
}