|
|
|
@ -208,12 +208,6 @@ SDP.prototype.toJingle = function (elem, thecreator) { |
|
|
|
|
elem.up(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// old bundle plan, to be removed
|
|
|
|
|
var bundle = []; |
|
|
|
|
if (SDPUtil.find_line(this.session, 'a=group:BUNDLE')) { |
|
|
|
|
bundle = SDPUtil.find_line(this.session, 'a=group:BUNDLE ').split(' '); |
|
|
|
|
bundle.shift(); |
|
|
|
|
} |
|
|
|
|
for (i = 0; i < this.media.length; i++) { |
|
|
|
|
mline = SDPUtil.parse_mline(this.media[i].split('\r\n')[0]); |
|
|
|
|
if (!(mline.media === 'audio' || |
|
|
|
@ -233,12 +227,6 @@ SDP.prototype.toJingle = function (elem, thecreator) { |
|
|
|
|
// prefer identifier from a=mid if present
|
|
|
|
|
var mid = SDPUtil.parse_mid(SDPUtil.find_line(this.media[i], 'a=mid:')); |
|
|
|
|
elem.attrs({ name: mid }); |
|
|
|
|
|
|
|
|
|
// old BUNDLE plan, to be removed
|
|
|
|
|
if (bundle.indexOf(mid) !== -1) { |
|
|
|
|
elem.c('bundle', {xmlns: 'http://estos.de/ns/bundle'}).up(); |
|
|
|
|
bundle.splice(bundle.indexOf(mid), 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (SDPUtil.find_line(this.media[i], 'a=rtpmap:').length) |
|
|
|
@ -492,28 +480,6 @@ SDP.prototype.fromJingle = function (jingle) { |
|
|
|
|
self.raw += 'a=group:' + (group.getAttribute('semantics') || group.getAttribute('type')) + ' ' + contents.join(' ') + '\r\n'; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else if ($(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').length) { |
|
|
|
|
// temporary namespace, not to be used. to be removed soon.
|
|
|
|
|
$(jingle).find('>group[xmlns="urn:ietf:rfc:5888"]').each(function (idx, group) { |
|
|
|
|
var contents = $(group).find('>content').map(function (idx, content) { |
|
|
|
|
return content.getAttribute('name'); |
|
|
|
|
}).get(); |
|
|
|
|
if (group.getAttribute('type') !== null && contents.length > 0) { |
|
|
|
|
self.raw += 'a=group:' + group.getAttribute('type') + ' ' + contents.join(' ') + '\r\n'; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
// for backward compability, to be removed soon
|
|
|
|
|
// assume all contents are in the same bundle group, can be improved upon later
|
|
|
|
|
var bundle = $(jingle).find('>content').filter(function (idx, content) { |
|
|
|
|
//elem.c('bundle', {xmlns:'http://estos.de/ns/bundle'});
|
|
|
|
|
return $(content).find('>bundle').length > 0; |
|
|
|
|
}).map(function (idx, content) { |
|
|
|
|
return content.getAttribute('name'); |
|
|
|
|
}).get(); |
|
|
|
|
if (bundle.length) { |
|
|
|
|
this.raw += 'a=group:BUNDLE ' + bundle.join(' ') + '\r\n'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
this.session = this.raw; |
|
|
|
|