Added video calling

This commit is contained in:
Mitchell McCaffrey
2020-03-19 12:02:31 +11:00
parent 25ee35de44
commit fb43cc3fc2
8 changed files with 97 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
import React, { useRef, useEffect } from "react";
function PartyVideo({ stream }) {
const videoRef = useRef();
useEffect(() => {
if (videoRef.current) {
videoRef.current.srcObject = stream;
}
}, [stream]);
return <video ref={videoRef} autoPlay muted />;
}
export default PartyVideo;