瀏覽代碼

sdp: remove mangle() function

not used elsewhere. Also the common term for this is munging
these days.
dev1
Philipp Hancke 5 年之前
父節點
當前提交
0ef62459ef
共有 1 個檔案被更改,包括 0 行新增28 行删除
  1. 0
    28
      modules/xmpp/SDP.js

+ 0
- 28
modules/xmpp/SDP.js 查看文件

@@ -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;

Loading…
取消
儲存