浏览代码

Taking into account the fact that FF nightlies include the local SSRCs in the local SDP.

master
George Politis 11 年前
父节点
当前提交
66f7ddd6b2
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 9
    3
      libs/strophe/strophe.jingle.adapter.js

+ 9
- 3
libs/strophe/strophe.jingle.adapter.js 查看文件

@@ -529,7 +529,10 @@ function setupRTC() {
529 529
                 },
530 530
                 pc_constraints: {},
531 531
                 getLocalSSRC: function (session, callback) {
532
-                    session.peerconnection.getStats(function (s) {
532
+                    // NOTE(gp) latest FF nightlies seem to provide the local
533
+                    // SSRCs in their SDP so there's no longer necessary to
534
+                    // take it from the peer connection stats.
535
+                    /*session.peerconnection.getStats(function (s) {
533 536
                             var ssrcs = {};
534 537
                             s.forEach(function (item) {
535 538
                                 if (item.type == "outboundrtp" && !item.isRemote)
@@ -545,7 +548,8 @@ function setupRTC() {
545 548
                         },
546 549
                         function () {
547 550
                             callback(null);
548
-                        });
551
+                        });*/
552
+                    callback(null);
549 553
                 },
550 554
                 getStreamID: function (stream) {
551 555
                     var tracks = stream.getVideoTracks();
@@ -584,7 +588,9 @@ function setupRTC() {
584 588
                 callback(null);
585 589
             },
586 590
             getStreamID: function (stream) {
587
-                return stream.id;
591
+                // streams from FF endpoints have the characters '{' and '}'
592
+                // that make jQuery choke.
593
+                return stream.id.replace(/[\{,\}]/g,"");
588 594
             },
589 595
             getVideoSrc: function (element) {
590 596
                 return element.getAttribute("src");

正在加载...
取消
保存