Skip to content

Commit

Permalink
Implement suggestions from @nitobuendia 's review on #33
Browse files Browse the repository at this point in the history
  • Loading branch information
platy committed Sep 30, 2018
1 parent 130732d commit e2536f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion step-05/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ socket.on('message', function(message) {
pc.setRemoteDescription(new RTCSessionDescription(message));
} else if (message.type === 'candidate' && isStarted) {
var candidate = new RTCIceCandidate({
candidate: message.candidate,
sdpMid: message.id,
sdpMLineIndex: message.label,
candidate: message.candidate
});
pc.addIceCandidate(candidate);
} else if (message === 'bye' && isStarted) {
Expand Down
6 changes: 3 additions & 3 deletions step-06/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ function signalingMessageCallback(message) {

} else if (message.type === 'candidate') {
peerConn.addIceCandidate(new RTCIceCandidate({
sdpMLineIndex: message.label,
candidate: message.candidate,
sdpMid: message.id,
candidate: message.candidate
}));// Firefox compatible
sdpMLineIndex: message.label,
}));

} else if (message === 'bye') {
// TODO: cleanup RTC connection?
Expand Down

0 comments on commit e2536f1

Please sign in to comment.