瀏覽代碼

chrome canary and firefox dont include a=

master
Philipp Hancke 11 年之前
父節點
當前提交
3f6c048426
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      libs/strophe/strophe.jingle.sdp.util.js

+ 3
- 1
libs/strophe/strophe.jingle.sdp.util.js 查看文件

@@ -283,7 +283,9 @@ SDPUtil = {
283 283
     candidateToJingle: function (line) {
284 284
         // a=candidate:2979166662 1 udp 2113937151 192.168.2.100 57698 typ host generation 0
285 285
         //      <candidate component=... foundation=... generation=... id=... ip=... network=... port=... priority=... protocol=... type=.../>
286
-        if (line.substring(0, 12) != 'a=candidate:') {
286
+        if (line.indexOf('candidate:') == 0) {
287
+            line = 'a=' + line;
288
+        } else if (line.substring(0, 12) != 'a=candidate:') {
287 289
             console.log('parseCandidate called with a line that is not a candidate line');
288 290
             console.log(line);
289 291
             return null;

Loading…
取消
儲存