import React, { useEffect, useRef, useState } from "react"; const Video = ({ stream, muted }) => { const ref = useRef(null); const [isMuted, setIsMuted] = useState(false); useEffect(() => { if (ref.current) ref.current.srcObject = stream; if (muted) setIsMuted(muted); }); return (