瀏覽代碼

Fixes issue - TRACK_REMOVED is not fired if only the local participant is alone in the conference

dev1
hristoterezov 9 年之前
父節點
當前提交
1af300751c
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. 3
    1
      JitsiConference.js
  2. 3
    1
      modules/xmpp/ChatRoom.js

+ 3
- 1
JitsiConference.js 查看文件

@@ -333,8 +333,10 @@ JitsiConference.prototype._fireMuteChangeEvent = function (track) {
333 333
  */
334 334
 JitsiConference.prototype.removeTrack = function (track) {
335 335
     if(!this.room){
336
-        if(this.rtc)
336
+        if(this.rtc) {
337 337
             this.rtc.removeLocalStream(track);
338
+            this.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, track);
339
+        }
338 340
         return;
339 341
     }
340 342
     this.room.removeStream(track.getOriginalStream(), function(){

+ 3
- 1
modules/xmpp/ChatRoom.js 查看文件

@@ -563,8 +563,10 @@ ChatRoom.prototype.setJingleSession = function(session){
563 563
 
564 564
 
565 565
 ChatRoom.prototype.removeStream = function (stream, callback) {
566
-    if(!this.session)
566
+    if(!this.session) {
567
+        callback();
567 568
         return;
569
+    }
568 570
     this.session.removeStream(stream, callback);
569 571
 };
570 572
 

Loading…
取消
儲存