浏览代码

Adds check for room when removing track from conference

master
hristoterezov 10 年前
父节点
当前提交
472de3dd74
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. 5
    0
      JitsiConference.js
  2. 5
    0
      lib-jitsi-meet.js

+ 5
- 0
JitsiConference.js 查看文件

@@ -223,6 +223,11 @@ JitsiConference.prototype._fireMuteChangeEvent = function (track) {
223 223
  * @param track the JitsiLocalTrack object.
224 224
  */
225 225
 JitsiConference.prototype.removeTrack = function (track) {
226
+    if(!this.room){
227
+        if(this.rtc)
228
+            this.rtc.removeLocalStream(track);
229
+        return;
230
+    }
226 231
     this.room.removeStream(track.getOriginalStream(), function(){
227 232
         this.rtc.removeLocalStream(track);
228 233
         this.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, track);

+ 5
- 0
lib-jitsi-meet.js 查看文件

@@ -225,6 +225,11 @@ JitsiConference.prototype._fireMuteChangeEvent = function (track) {
225 225
  * @param track the JitsiLocalTrack object.
226 226
  */
227 227
 JitsiConference.prototype.removeTrack = function (track) {
228
+    if(!this.room){
229
+        if(this.rtc)
230
+            this.rtc.removeLocalStream(track);
231
+        return;
232
+    }
228 233
     this.room.removeStream(track.getOriginalStream(), function(){
229 234
         this.rtc.removeLocalStream(track);
230 235
         this.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, track);

正在加载...
取消
保存