import clsx from "clsx"; import type { ComponentPropsWithoutRef } from "react"; import styles from "./Video.module.css"; export type VideoProps = Omit>, "src"> & { src: { // at least one is required: webm?: string; mp4?: string; // optional: vtt?: string; }; poster?: string; autoplay?: boolean; responsive?: boolean; className?: string; }; const Video = ({ src, poster, autoplay = false, responsive = true, className, ...rest }: VideoProps) => { if (!src || (!src.mp4 && !src.webm)) { throw new Error("'src' prop must include either 'mp4' or 'webm' URL."); } return (
); }; export default Video;