소스 검색

Adds a property to disable/enable talk while muted.

By default talk while muted detection is disabled.
dev1
damencho 9 년 전
부모
커밋
0f52b939b7
2개의 변경된 파일12개의 추가작업 그리고 9개의 파일을 삭제
  1. 11
    9
      JitsiConference.js
  2. 1
    0
      doc/API.md

+ 11
- 9
JitsiConference.js 파일 보기

116
     // listeners are removed from statistics module.
116
     // listeners are removed from statistics module.
117
     this.eventManager.setupStatisticsListeners();
117
     this.eventManager.setupStatisticsListeners();
118
 
118
 
119
-    this.talkMutedDetection = new TalkMutedDetection(function () {
120
-        this.eventEmitter.emit(JitsiConferenceEvents.TALK_WHILE_MUTED);
121
-    }.bind(this));
122
-    this.statistics.addAudioLevelListener(
123
-        this.talkMutedDetection.audioLevelListener
124
-            .bind(this.talkMutedDetection));
125
-    this.eventEmitter.on(
126
-        JitsiConferenceEvents.TRACK_MUTE_CHANGED,
127
-        this.talkMutedDetection.muteChanged.bind(this.talkMutedDetection));
119
+    if (this.options.config.enableTalkWhileMuted) {
120
+        this.talkMutedDetection = new TalkMutedDetection(function () {
121
+            this.eventEmitter.emit(JitsiConferenceEvents.TALK_WHILE_MUTED);
122
+        }.bind(this));
123
+        this.statistics.addAudioLevelListener(
124
+            this.talkMutedDetection.audioLevelListener
125
+                .bind(this.talkMutedDetection));
126
+        this.eventEmitter.on(
127
+            JitsiConferenceEvents.TRACK_MUTE_CHANGED,
128
+            this.talkMutedDetection.muteChanged.bind(this.talkMutedDetection));
129
+    }
128
 }
130
 }
129
 
131
 
130
 /**
132
 /**

+ 1
- 0
doc/API.md 파일 보기

219
         3. jirecon
219
         3. jirecon
220
         4. callStatsID - callstats credentials
220
         4. callStatsID - callstats credentials
221
         5. callStatsSecret - callstats credentials
221
         5. callStatsSecret - callstats credentials
222
+        6. enableTalkWhileMuted - boolean property. Enables/disables talk while muted detection, by default the value is false/disabled.
222
         **NOTE: if 4 and 5 are set the library is going to send events to callstats. Otherwise the callstats integration will be disabled.**
223
         **NOTE: if 4 and 5 are set the library is going to send events to callstats. Otherwise the callstats integration will be disabled.**
223
 
224
 
224
 5. addEventListener(event, listener) - Subscribes the passed listener to the event.
225
 5. addEventListener(event, listener) - Subscribes the passed listener to the event.

Loading…
취소
저장