From 30948b8e4aceda3dd76b147915bb378dda0472da Mon Sep 17 00:00:00 2001 From: Karl Stolley Date: Sun, 18 Oct 2020 14:08:15 -0500 Subject: [PATCH] Apply corrective patch for Step 6 from GitHub See https://github.com/googlecodelabs/webrtc-web/issues/102#issuecomment-644213892 --- step-06/index.js | 3 ++- step-06/js/main.js | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/step-06/index.js b/step-06/index.js index ae178ae..4b2c003 100644 --- a/step-06/index.js +++ b/step-06/index.js @@ -43,7 +43,8 @@ io.sockets.on('connection', function(socket) { socket.join(room); socket.emit('joined', room, socket.id); io.sockets.in(room).emit('ready', room); - socket.broadcast.emit('ready', room); + // Pull Request #89 + // socket.broadcast.emit('ready', room); } else { // max two clients socket.emit('full', room); } diff --git a/step-06/js/main.js b/step-06/js/main.js index 9ba7701..f9b8b87 100644 --- a/step-06/js/main.js +++ b/step-06/js/main.js @@ -62,7 +62,8 @@ socket.on('created', function(room, clientId) { socket.on('joined', function(room, clientId) { console.log('This peer has joined room', room, 'with client ID', clientId); isInitiator = false; - createPeerConnection(isInitiator, configuration); + // PR #89 + //createPeerConnection(isInitiator, configuration); grabWebCamVideo(); }); @@ -186,7 +187,10 @@ function signalingMessageCallback(message) { } else if (message.type === 'candidate') { peerConn.addIceCandidate(new RTCIceCandidate({ - candidate: message.candidate + candidate: message.candidate, + // Issue 102 + sdpMid: message.id, + sdpMLineIndex: message.label })); }