|
|
@@ -208,12 +208,6 @@ SDP.prototype.toJingle = function (elem, thecreator) {
|
|
208
|
208
|
elem.up();
|
|
209
|
209
|
}
|
|
210
|
210
|
}
|
|
211
|
|
- // old bundle plan, to be removed
|
|
212
|
|
- var bundle = [];
|
|
213
|
|
- if (SDPUtil.find_line(this.session, 'a=group:BUNDLE')) {
|
|
214
|
|
- bundle = SDPUtil.find_line(this.session, 'a=group:BUNDLE ').split(' ');
|
|
215
|
|
- bundle.shift();
|
|
216
|
|
- }
|
|
217
|
211
|
for (i = 0; i < this.media.length; i++) {
|
|
218
|
212
|
mline = SDPUtil.parse_mline(this.media[i].split('\r\n')[0]);
|
|
219
|
213
|
if (!(mline.media === 'audio' ||
|
|
|
@@ -233,12 +227,6 @@ SDP.prototype.toJingle = function (elem, thecreator) {
|
|
233
|
227
|
// prefer identifier from a=mid if present
|
|
234
|
228
|
var mid = SDPUtil.parse_mid(SDPUtil.find_line(this.media[i], 'a=mid:'));
|
|
235
|
229
|
elem.attrs({ name: mid });
|
|
236
|
|
-
|
|
237
|
|
- // old BUNDLE plan, to be removed
|
|
238
|
|
- if (bundle.indexOf(mid) !== -1) {
|
|
239
|
|
- elem.c('bundle', {xmlns: 'http://estos.de/ns/bundle'}).up();
|
|
240
|
|
- bundle.splice(bundle.indexOf(mid), 1);
|
|
241
|
|
- }
|
|
242
|
230
|
}
|
|
243
|
231
|
|
|
244
|
232
|
if (SDPUtil.find_line(this.media[i], 'a=rtpmap:').length)
|
|
|
@@ -492,28 +480,6 @@ SDP.prototype.fromJingle = function (jingle) {
|
|
492
|
480
|
self.raw += 'a=group:' + (group.getAttribute('semantics') || group.getAttribute('type')) + ' ' + contents.join(' ') + '\r\n';
|
|
493
|
481
|
}
|
|
494
|
482
|
});
|
|
495
|
|
- } else if ($(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').length) {
|
|
496
|
|
- // temporary namespace, not to be used. to be removed soon.
|
|
497
|
|
- $(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').each(function (idx, group) {
|
|
498
|
|
- var contents = $(group).find('>content').map(function (idx, content) {
|
|
499
|
|
- return content.getAttribute('name');
|
|
500
|
|
- }).get();
|
|
501
|
|
- if (group.getAttribute('type') !== null && contents.length > 0) {
|
|
502
|
|
- self.raw += 'a=group:' + group.getAttribute('type') + ' ' + contents.join(' ') + '\r\n';
|
|
503
|
|
- }
|
|
504
|
|
- });
|
|
505
|
|
- } else {
|
|
506
|
|
- // for backward compability, to be removed soon
|
|
507
|
|
- // assume all contents are in the same bundle group, can be improved upon later
|
|
508
|
|
- var bundle = $(jingle).find('>content').filter(function (idx, content) {
|
|
509
|
|
- //elem.c('bundle', {xmlns:'http://estos.de/ns/bundle'});
|
|
510
|
|
- return $(content).find('>bundle').length > 0;
|
|
511
|
|
- }).map(function (idx, content) {
|
|
512
|
|
- return content.getAttribute('name');
|
|
513
|
|
- }).get();
|
|
514
|
|
- if (bundle.length) {
|
|
515
|
|
- this.raw += 'a=group:BUNDLE ' + bundle.join(' ') + '\r\n';
|
|
516
|
|
- }
|
|
517
|
483
|
}
|
|
518
|
484
|
|
|
519
|
485
|
this.session = this.raw;
|