Skip to content

Commit

Permalink
Apply corrective patch for Step 6 from GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
karlstolley committed Oct 18, 2020
1 parent 93b2d7c commit 30948b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion step-06/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 6 additions & 2 deletions step-06/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down Expand Up @@ -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
}));

}
Expand Down

0 comments on commit 30948b8

Please sign in to comment.