|
|
@@ -253,7 +253,8 @@ Strophe.addConnectionPlugin('jingle', {
|
|
253
|
253
|
$(res).find('>services>service').each(function (idx, el) {
|
|
254
|
254
|
el = $(el);
|
|
255
|
255
|
var dict = {};
|
|
256
|
|
- switch (el.attr('type')) {
|
|
|
256
|
+ var type = el.attr('type');
|
|
|
257
|
+ switch (type) {
|
|
257
|
258
|
case 'stun':
|
|
258
|
259
|
dict.url = 'stun:' + el.attr('host');
|
|
259
|
260
|
if (el.attr('port')) {
|
|
|
@@ -262,7 +263,8 @@ Strophe.addConnectionPlugin('jingle', {
|
|
262
|
263
|
iceservers.push(dict);
|
|
263
|
264
|
break;
|
|
264
|
265
|
case 'turn':
|
|
265
|
|
- dict.url = 'turn:';
|
|
|
266
|
+ case 'turns':
|
|
|
267
|
+ dict.url = type + ':';
|
|
266
|
268
|
if (el.attr('username')) { // https://code.google.com/p/webrtc/issues/detail?id=1508
|
|
267
|
269
|
if (navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./) && parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10) < 28) {
|
|
268
|
270
|
dict.url += el.attr('username') + '@';
|