Skip to content

Commit 1606722

Browse files
committed
test obsoleted RTCIceCandidate shim
1 parent 70fb8f5 commit 1606722

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/test.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1460,10 +1460,11 @@ test('Basic connection establishment with promise', function(t) {
14601460
}
14611461
};
14621462

1463+
var dictionary = obj => JSON.parse(JSON.stringify(obj));
1464+
14631465
var addCandidate = function(pc, event) {
14641466
if (event.candidate) {
1465-
var cand = new RTCIceCandidate(event.candidate);
1466-
pc.addIceCandidate(cand).then(function() {
1467+
pc.addIceCandidate(dictionary(event.candidate)).then(function() {
14671468
// TODO: Decide if we are interested in adding all candidates
14681469
// as passed tests.
14691470
tc.pass('addIceCandidate ' + counter++);
@@ -1480,8 +1481,6 @@ test('Basic connection establishment with promise', function(t) {
14801481
addCandidate(pc1, event);
14811482
};
14821483

1483-
var dictionary = obj => JSON.parse(JSON.stringify(obj));
1484-
14851484
var constraints = {video: true, fake: true};
14861485
navigator.mediaDevices.getUserMedia(constraints)
14871486
.then(function(stream) {

0 commit comments

Comments
 (0)