"use client"; import { useRef, useState } from "react"; import { Play, Pause, Volume2, VolumeX, Maximize2 } from "lucide-react"; import { cn } from "@/lib/cn"; interface PerformanceVideoProps { src?: string; poster?: string; duration?: string; themeColor?: string; className?: string; } export default function PerformanceVideo({ src, poster, duration = "00:15", themeColor = "#8b5cf6", className, }: PerformanceVideoProps) { const videoRef = useRef(null); const [playing, setPlaying] = useState(false); const [muted, setMuted] = useState(false); const togglePlay = () => { const v = videoRef.current; if (!v) return; if (v.paused) { v.play(); setPlaying(true); } else { v.pause(); setPlaying(false); } }; const toggleMute = () => { const v = videoRef.current; if (!v) return; v.muted = !v.muted; setMuted(v.muted); }; const goFullscreen = () => { videoRef.current?.requestFullscreen?.(); }; return (
{src ? (
); }