'use client'; import { useRef, useState } from 'react'; export default function VideoPlayer({ src }: { src: string }) { const videoRef = useRef(null); const [playing, setPlaying] = useState(false); const [muted, setMuted] = useState(true); const togglePlay = () => { if (videoRef.current) { if (playing) { videoRef.current.pause(); } else { videoRef.current.play(); } setPlaying(!playing); } }; const toggleMute = () => { if (videoRef.current) { videoRef.current.muted = !muted; setMuted(!muted); } }; return (
); }