Browse Source

fix: Use RTCIceServer.ulrs instead of RTCIceServer.url

master
Jaya Allamsetty 5 years ago
parent
commit
1431de720a
1 changed files with 8 additions and 8 deletions
  1. 8
    8
      modules/xmpp/strophe.jingle.js

+ 8
- 8
modules/xmpp/strophe.jingle.js View File

@@ -312,15 +312,15 @@ class JingleConnectionPlugin extends ConnectionPlugin {
312 312
 
313 313
                     switch (type) {
314 314
                     case 'stun':
315
-                        dict.url = `stun:${el.attr('host')}`;
315
+                        dict.urls = `stun:${el.attr('host')}`;
316 316
                         if (el.attr('port')) {
317
-                            dict.url += `:${el.attr('port')}`;
317
+                            dict.urls += `:${el.attr('port')}`;
318 318
                         }
319 319
                         iceservers.push(dict);
320 320
                         break;
321 321
                     case 'turn':
322 322
                     case 'turns': {
323
-                        dict.url = `${type}:`;
323
+                        dict.urls = `${type}:`;
324 324
                         const username = el.attr('username');
325 325
 
326 326
                         // https://code.google.com/p/webrtc/issues/detail
@@ -332,22 +332,22 @@ class JingleConnectionPlugin extends ConnectionPlugin {
332 332
                                     /Chrom(e|ium)\/([0-9]+)\./);
333 333
 
334 334
                             if (match && parseInt(match[2], 10) < 28) {
335
-                                dict.url += `${username}@`;
335
+                                dict.urls += `${username}@`;
336 336
                             } else {
337 337
                                 // only works in M28
338 338
                                 dict.username = username;
339 339
                             }
340 340
                         }
341
-                        dict.url += el.attr('host');
341
+                        dict.urls += el.attr('host');
342 342
                         const port = el.attr('port');
343 343
 
344 344
                         if (port) {
345
-                            dict.url += `:${el.attr('port')}`;
345
+                            dict.urls += `:${el.attr('port')}`;
346 346
                         }
347 347
                         const transport = el.attr('transport');
348 348
 
349 349
                         if (transport && transport !== 'udp') {
350
-                            dict.url += `?transport=${transport}`;
350
+                            dict.urls += `?transport=${transport}`;
351 351
                         }
352 352
 
353 353
                         dict.credential = el.attr('password')
@@ -364,7 +364,7 @@ class JingleConnectionPlugin extends ConnectionPlugin {
364 364
                     // we want to filter and leave only tcp/turns candidates
365 365
                     // which make sense for the jvb connections
366 366
                     this.jvbIceConfig.iceServers
367
-                        = iceservers.filter(s => s.url.startsWith('turns'));
367
+                        = iceservers.filter(s => s.urls.startsWith('turns'));
368 368
                 }
369 369
 
370 370
                 if (options.p2p && options.p2p.useStunTurn) {

Loading…
Cancel
Save