瀏覽代碼

Merge pull request #367 from bgrozev/cleanup

cleanup: Renames a function, adds documentation.
dev1
Дамян Минков 8 年之前
父節點
當前提交
fc8773833d
共有 2 個文件被更改,包括 7 次插入3 次删除
  1. 1
    1
      JitsiConference.js
  2. 6
    2
      modules/RTC/RTC.js

+ 1
- 1
JitsiConference.js 查看文件

@@ -897,7 +897,7 @@ function (jingleSession, jingleOffer, now) {
897 897
         GlobalOnErrorHandler.callErrorHandler(error);
898 898
     }
899 899
 
900
-    this.rtc.onIncommingCall(jingleSession);
900
+    this.rtc.initializeDataChannels(jingleSession.peerconnection);
901 901
     // Add local Tracks to the ChatRoom
902 902
     this.rtc.localTracks.forEach(function(localTrack) {
903 903
         var ssrcInfo = null;

+ 6
- 2
modules/RTC/RTC.js 查看文件

@@ -93,9 +93,13 @@ export default class RTC extends Listenable {
93 93
         });
94 94
     }
95 95
 
96
-    onIncommingCall (event) {
96
+    /**
97
+     * Initializes the data channels of this instance.
98
+     * @param peerconnection the associated PeerConnection.
99
+     */
100
+    initializeDataChannels (peerconnection) {
97 101
         if(this.options.config.openSctp) {
98
-            this.dataChannels = new DataChannels(event.peerconnection,
102
+            this.dataChannels = new DataChannels(peerconnection,
99 103
                 this.eventEmitter);
100 104
             this._dataChannelOpenListener = () => {
101 105
                 // mark that dataChannel is opened

Loading…
取消
儲存