"use client"; import { useEffect, useRef } from "react"; type VideoTileProps = { stream: MediaStream | null; name: string; isLocal?: boolean; isHost?: boolean; muted?: boolean; videoOff?: boolean; }; export function VideoTile({ stream, name, isLocal, isHost, muted, videoOff }: VideoTileProps) { const videoRef = useRef(null); useEffect(() => { if (videoRef.current) videoRef.current.srcObject = stream; }, [stream]); return (
{stream && !videoOff ? (
); }