浏览代码

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

正在加载...
取消
保存