|
|
@@ -210,12 +210,6 @@ SDP.prototype.toJingle = function (elem, thecreator) {
|
|
210
|
210
|
elem.up();
|
|
211
|
211
|
}
|
|
212
|
212
|
}
|
|
213
|
|
- // old bundle plan, to be removed
|
|
214
|
|
- var bundle = [];
|
|
215
|
|
- if (SDPUtil.find_line(this.session, 'a=group:BUNDLE')) {
|
|
216
|
|
- bundle = SDPUtil.find_line(this.session, 'a=group:BUNDLE ').split(' ');
|
|
217
|
|
- bundle.shift();
|
|
218
|
|
- }
|
|
219
|
213
|
for (i = 0; i < this.media.length; i++) {
|
|
220
|
214
|
mline = SDPUtil.parse_mline(this.media[i].split('\r\n')[0]);
|
|
221
|
215
|
if (!(mline.media === 'audio' ||
|
|
|
@@ -235,12 +229,6 @@ SDP.prototype.toJingle = function (elem, thecreator) {
|
|
235
|
229
|
// prefer identifier from a=mid if present
|
|
236
|
230
|
var mid = SDPUtil.parse_mid(SDPUtil.find_line(this.media[i], 'a=mid:'));
|
|
237
|
231
|
elem.attrs({ name: mid });
|
|
238
|
|
-
|
|
239
|
|
- // old BUNDLE plan, to be removed
|
|
240
|
|
- if (bundle.indexOf(mid) !== -1) {
|
|
241
|
|
- elem.c('bundle', {xmlns: 'http://estos.de/ns/bundle'}).up();
|
|
242
|
|
- bundle.splice(bundle.indexOf(mid), 1);
|
|
243
|
|
- }
|
|
244
|
232
|
}
|
|
245
|
233
|
|
|
246
|
234
|
if (SDPUtil.find_line(this.media[i], 'a=rtpmap:').length)
|
|
|
@@ -299,12 +287,6 @@ SDP.prototype.toJingle = function (elem, thecreator) {
|
|
299
|
287
|
});
|
|
300
|
288
|
elem.up();
|
|
301
|
289
|
|
|
302
|
|
- // old proprietary mapping, to be removed at some point
|
|
303
|
|
- tmp = SDPUtil.parse_ssrc(this.media[i]);
|
|
304
|
|
- tmp.xmlns = 'http://estos.de/ns/ssrc';
|
|
305
|
|
- tmp.ssrc = ssrc;
|
|
306
|
|
- elem.c('ssrc', tmp).up(); // ssrc is part of description
|
|
307
|
|
-
|
|
308
|
290
|
// XEP-0339 handle ssrc-group attributes
|
|
309
|
291
|
var ssrc_group_lines = SDPUtil.find_lines(this.media[i], 'a=ssrc-group:');
|
|
310
|
292
|
ssrc_group_lines.forEach(function(line) {
|
|
|
@@ -494,28 +476,6 @@ SDP.prototype.fromJingle = function (jingle) {
|
|
494
|
476
|
self.raw += 'a=group:' + (group.getAttribute('semantics') || group.getAttribute('type')) + ' ' + contents.join(' ') + '\r\n';
|
|
495
|
477
|
}
|
|
496
|
478
|
});
|
|
497
|
|
- } else if ($(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').length) {
|
|
498
|
|
- // temporary namespace, not to be used. to be removed soon.
|
|
499
|
|
- $(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').each(function (idx, group) {
|
|
500
|
|
- var contents = $(group).find('>content').map(function (idx, content) {
|
|
501
|
|
- return content.getAttribute('name');
|
|
502
|
|
- }).get();
|
|
503
|
|
- if (group.getAttribute('type') !== null && contents.length > 0) {
|
|
504
|
|
- self.raw += 'a=group:' + group.getAttribute('type') + ' ' + contents.join(' ') + '\r\n';
|
|
505
|
|
- }
|
|
506
|
|
- });
|
|
507
|
|
- } else {
|
|
508
|
|
- // for backward compability, to be removed soon
|
|
509
|
|
- // assume all contents are in the same bundle group, can be improved upon later
|
|
510
|
|
- var bundle = $(jingle).find('>content').filter(function (idx, content) {
|
|
511
|
|
- //elem.c('bundle', {xmlns:'http://estos.de/ns/bundle'});
|
|
512
|
|
- return $(content).find('>bundle').length > 0;
|
|
513
|
|
- }).map(function (idx, content) {
|
|
514
|
|
- return content.getAttribute('name');
|
|
515
|
|
- }).get();
|
|
516
|
|
- if (bundle.length) {
|
|
517
|
|
- this.raw += 'a=group:BUNDLE ' + bundle.join(' ') + '\r\n';
|
|
518
|
|
- }
|
|
519
|
479
|
}
|
|
520
|
480
|
|
|
521
|
481
|
this.session = this.raw;
|
|
|
@@ -680,15 +640,5 @@ SDP.prototype.jingle2media = function (content) {
|
|
680
|
640
|
});
|
|
681
|
641
|
});
|
|
682
|
642
|
|
|
683
|
|
- if (tmp.length === 0) {
|
|
684
|
|
- // fallback to proprietary mapping of a=ssrc lines
|
|
685
|
|
- tmp = content.find('description>ssrc[xmlns="http://estos.de/ns/ssrc"]');
|
|
686
|
|
- if (tmp.length) {
|
|
687
|
|
- media += 'a=ssrc:' + ssrc + ' cname:' + tmp.attr('cname') + '\r\n';
|
|
688
|
|
- media += 'a=ssrc:' + ssrc + ' msid:' + tmp.attr('msid') + '\r\n';
|
|
689
|
|
- media += 'a=ssrc:' + ssrc + ' mslabel:' + tmp.attr('mslabel') + '\r\n';
|
|
690
|
|
- media += 'a=ssrc:' + ssrc + ' label:' + tmp.attr('label') + '\r\n';
|
|
691
|
|
- }
|
|
692
|
|
- }
|
|
693
|
643
|
return media;
|
|
694
|
644
|
};
|