From 4c4e49dc71d54a006f741b6734d4e6d2e47ada25 Mon Sep 17 00:00:00 2001 From: talksik Date: Thu, 28 Apr 2022 12:22:39 -0500 Subject: [PATCH] should be playing with two people in the room but it's not --- packages/api/routes/rtc.ts | 4 ++-- packages/web/pages/rtc/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/api/routes/rtc.ts b/packages/api/routes/rtc.ts index fac4bff..53e7ecd 100644 --- a/packages/api/routes/rtc.ts +++ b/packages/api/routes/rtc.ts @@ -82,7 +82,7 @@ function handleStreams(e: any, peer: any, lineId: string) { } // dumb smoke test - testMainStream = e.streams[0]; + if (!testMainStream) testMainStream = e.streams[0]; - console.log(linesStreams); + console.log(testMainStream); } diff --git a/packages/web/pages/rtc/index.tsx b/packages/web/pages/rtc/index.tsx index d5cc64a..3b871e3 100644 --- a/packages/web/pages/rtc/index.tsx +++ b/packages/web/pages/rtc/index.tsx @@ -98,7 +98,7 @@ export default function VideoChat() { const handleTrackEvent = (e: any) => { const incomingStream = e.streams[0]; - console.log("incoming stream", incomingStream.getTracks()); + console.log("incoming stream", incomingStream); if (incomingVideoRef.current) { toast(`setting incoming stream ref`);