Ver código fonte

fix: Use RTCIceServer.ulrs instead of RTCIceServer.url

master
Jaya Allamsetty 5 anos atrás
pai
commit
1431de720a
1 arquivos alterados com 8 adições e 8 exclusões
  1. 8
    8
      modules/xmpp/strophe.jingle.js

+ 8
- 8
modules/xmpp/strophe.jingle.js Ver arquivo

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

Carregando…
Cancelar
Salvar