瀏覽代碼

Only includes an rtcp-mux element inside 'transport'.

j8
Boris Grozev 11 年之前
父節點
當前提交
ddc44dc75f
共有 1 個文件被更改,包括 7 次插入17 次删除
  1. 7
    17
      libs/colibri/colibri.focus.js

+ 7
- 17
libs/colibri/colibri.focus.js 查看文件

@@ -303,9 +303,6 @@ ColibriFocus.prototype._makeConference = function () {
303 303
 
304 304
             elem.c(elemName, elemAttrs);
305 305
             elem.attrs({ endpoint: peer.substr(1 + peer.lastIndexOf('/')) });
306
-            if ('channel' === elemName && config.useRtcpMux) {
307
-                elem.c('rtcp-mux').up();
308
-            }
309 306
             elem.up(); // end of channel/sctpconnection
310 307
         }
311 308
         elem.up(); // end of content
@@ -781,9 +778,6 @@ ColibriFocus.prototype.addNewParticipant = function (peer) {
781 778
 
782 779
         elem.c('content', { name: name });
783 780
         elem.c(elemName, elemAttrs);
784
-        if ('channel' === elemName && config.useRtcpMux) {
785
-            elem.c('rtcp-mux').up();
786
-        }
787 781
         elem.up(); // end of channel/sctpconnection
788 782
         elem.up(); // end of content
789 783
     });
@@ -831,9 +825,6 @@ ColibriFocus.prototype.updateChannel = function (remoteSDP, participant) {
831 825
                 endpoint: $(this.channels[participant][channel]).attr('endpoint'),
832 826
                 expire: self.channelExpire
833 827
             });
834
-            if (config.useRtcpMux) {
835
-                change.c('rtcp-mux').up();
836
-            }
837 828
 
838 829
             var rtpmap = SDPUtil.find_lines(remoteSDP.media[channel], 'a=rtpmap:');
839 830
             rtpmap.forEach(function (val) {
@@ -1044,10 +1035,6 @@ ColibriFocus.prototype.addIceCandidate = function (session, elem) {
1044 1035
                 endpoint: $(self.channels[participant][channel]).attr('endpoint'),
1045 1036
                 expire: self.channelExpire
1046 1037
             });
1047
-
1048
-            if (config.useRtcpMux) {
1049
-                change.c('rtcp-mux').up();
1050
-            }
1051 1038
         }
1052 1039
         else
1053 1040
         {
@@ -1062,6 +1049,10 @@ ColibriFocus.prototype.addIceCandidate = function (session, elem) {
1062 1049
                 pwd: $(this).attr('pwd'),
1063 1050
                 xmlns: $(this).attr('xmlns')
1064 1051
             });
1052
+            if (config.useRtcpMux
1053
+                  && 'channel' === change.node.parentNode.nodeName) {
1054
+                change.c('rtcp-mux').up();
1055
+            }
1065 1056
 
1066 1057
             $(this).find('>candidate').each(function () {
1067 1058
                 /* not yet
@@ -1131,10 +1122,6 @@ ColibriFocus.prototype.sendIceCandidates = function (candidates) {
1131 1122
                     endpoint: $(this.mychannel[cands[0].sdpMLineIndex]).attr('endpoint'),
1132 1123
                     expire: self.channelExpire
1133 1124
                 });
1134
-                if (config.useRtcpMux) {
1135
-                    mycands.c('rtcp-mux').up();
1136
-                }
1137
-
1138 1125
             }
1139 1126
             else
1140 1127
             {
@@ -1145,6 +1132,9 @@ ColibriFocus.prototype.sendIceCandidates = function (candidates) {
1145 1132
                 });
1146 1133
             }
1147 1134
             mycands.c('transport', {xmlns: 'urn:xmpp:jingle:transports:ice-udp:1'});
1135
+            if (config.useRtcpMux && name !== 'data') {
1136
+                mycands.c('rtcp-mux').up();
1137
+            }
1148 1138
             for (var i = 0; i < cands.length; i++) {
1149 1139
                 mycands.c('candidate', SDPUtil.candidateToJingle(cands[i].candidate)).up();
1150 1140
             }

Loading…
取消
儲存