i actually like it....sidebar with messenger feel and rest of canvas with discord feel

This commit is contained in:
talksik
2022-05-17 05:34:26 -05:00
parent d1a8ca2909
commit 747447137c
6 changed files with 191 additions and 163 deletions
@@ -57,13 +57,12 @@ export function StreamProvider({ children }: { children: React.ReactChild }) {
const localStreamRef = useRef<HTMLVideoElement>(null);
useEffect(() => {
navigator.mediaDevices
.getUserMedia({ video: true, audio: true })
.then((localMediaStream: MediaStream) => {
setUserLocalStream(localMediaStream);
if (localStreamRef.current) localStreamRef.current.srcObject = localMediaStream;
});
// navigator.mediaDevices
// .getUserMedia({ video: true, audio: true })
// .then((localMediaStream: MediaStream) => {
// setUserLocalStream(localMediaStream);
// if (localStreamRef.current) localStreamRef.current.srcObject = localMediaStream;
// });
}, [localStreamRef]);
useEffect(() => {