Skip to content

Commit 701e0a9

Browse files
committed
Add SDP params
1 parent 6297764 commit 701e0a9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

step-05/js/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,9 @@ socket.on('message', function(message) {
7979
pc.setRemoteDescription(new RTCSessionDescription(message));
8080
} else if (message.type === 'candidate' && isStarted) {
8181
var candidate = new RTCIceCandidate({
82+
candidate: message.candidate,
83+
sdpMid: message.id,
8284
sdpMLineIndex: message.label,
83-
candidate: message.candidate
8485
});
8586
pc.addIceCandidate(candidate);
8687
} else if (message === 'bye' && isStarted) {

step-06/js/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ function signalingMessageCallback(message) {
160160

161161
} else if (message.type === 'candidate') {
162162
peerConn.addIceCandidate(new RTCIceCandidate({
163-
candidate: message.candidate
163+
candidate: message.candidate,
164+
sdpMid: message.id,
165+
sdpMLineIndex: message.label,
164166
}));
165167

166168
} else if (message === 'bye') {

0 commit comments

Comments
 (0)