Skip to content

Commit

Permalink
Add SDP params
Browse files Browse the repository at this point in the history
  • Loading branch information
platy committed Sep 30, 2018
1 parent 6297764 commit 701e0a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 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
4 changes: 3 additions & 1 deletion step-06/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ function signalingMessageCallback(message) {

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

} else if (message === 'bye') {
Expand Down

0 comments on commit 701e0a9

Please sign in to comment.