|
@@ -118,34 +118,6 @@ SDP.prototype.containsSSRC = function(ssrc) {
|
118
|
118
|
return result;
|
119
|
119
|
};
|
120
|
120
|
|
121
|
|
-// remove iSAC and CN from SDP
|
122
|
|
-SDP.prototype.mangle = function() {
|
123
|
|
- let i, j, lines, mline, newdesc, rtpmap;
|
124
|
|
-
|
125
|
|
- for (i = 0; i < this.media.length; i++) {
|
126
|
|
- lines = this.media[i].split('\r\n');
|
127
|
|
- lines.pop(); // remove empty last element
|
128
|
|
- mline = SDPUtil.parseMLine(lines.shift());
|
129
|
|
- if (mline.media !== 'audio') {
|
130
|
|
- continue; // eslint-disable-line no-continue
|
131
|
|
- }
|
132
|
|
- newdesc = '';
|
133
|
|
- mline.fmt.length = 0;
|
134
|
|
- for (j = 0; j < lines.length; j++) {
|
135
|
|
- if (lines[j].substr(0, 9) === 'a=rtpmap:') {
|
136
|
|
- rtpmap = SDPUtil.parseRTPMap(lines[j]);
|
137
|
|
- if (rtpmap.name === 'CN' || rtpmap.name === 'ISAC') {
|
138
|
|
- continue; // eslint-disable-line no-continue
|
139
|
|
- }
|
140
|
|
- mline.fmt.push(rtpmap.id);
|
141
|
|
- }
|
142
|
|
- newdesc += `${lines[j]}\r\n`;
|
143
|
|
- }
|
144
|
|
- this.media[i] = `${SDPUtil.buildMLine(mline)}\r\n${newdesc}`;
|
145
|
|
- }
|
146
|
|
- this.raw = this.session + this.media.join('');
|
147
|
|
-};
|
148
|
|
-
|
149
|
121
|
// add content's to a jingle element
|
150
|
122
|
SDP.prototype.toJingle = function(elem, thecreator) {
|
151
|
123
|
let i, j, k, lines, mline, rtpmap, ssrc, tmp;
|