Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

874 B
Raw Blame
import { cn } from '@/lib/utils';

interface VideoProps {
  src: string;
  caption?: string;
  poster?: string;
  autoPlay?: boolean;
  loop?: boolean;
  muted?: boolean;
  controls?: boolean;
  className?: string;
}

export function Video({
  src,
  caption,
  poster,
  autoPlay = false,
  loop = true,
  muted = true,
  controls = true,
  className,
}: VideoProps) {
  return (
    <figure className={cn('my-8', className)}>
      <video
        src={src}
        poster={poster}
        autoPlay={autoPlay}
        loop={loop}
        muted={muted}
        controls={controls}
        playsInline
        preload="metadata"
        className="w-full rounded-lg border border-fd-border"
      />
      {caption && (
        <figcaption className="mt-3 text-sm text-fd-muted-foreground text-center">
          {caption}
        </figcaption>
      )}
    </figure>
  );
}