From ac0b4fa4c9023bd4e3ff6a2f5851106e782c5e44 Mon Sep 17 00:00:00 2001 From: shreyanshyad Date: Wed, 23 Sep 2020 15:43:19 +0530 Subject: [PATCH] Fixed duplicate comments and made them aligned with the solution branch --- public/app.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/public/app.js b/public/app.js index c5d9e52..0cd4d70 100644 --- a/public/app.js +++ b/public/app.js @@ -36,23 +36,19 @@ async function createRoom() { peerConnection = new RTCPeerConnection(configuration); registerPeerConnectionListeners(); - - // Add code for creating a room here - - // Code for creating room above localStream.getTracks().forEach(track => { peerConnection.addTrack(track, localStream); }); - // Code for creating a room below - - // Code for creating a room above - // Code for collecting ICE candidates below // Code for collecting ICE candidates above + // Code for creating a room below + + // Code for creating a room above + peerConnection.addEventListener('track', event => { console.log('Got remote track:', event.streams[0]); event.streams[0].getTracks().forEach(track => {