瀏覽代碼

fix(large-video): clear remote video stream on track removal

VideoLayout schedules a large video update by passing in
the video stream on the small video instance. When a stream
is removed, the UI is removed from the small video instance
but a reference to the stream is left. So when VideoLayout
schedules the large video update after a stream removal,
the old stream from the small video instance is re-used,
even though it has been removed.

This change also brings balance with RemoteVideo method
"addRemoteStreamElement" which sets the stream on the
small video instance, so now "removeRemoteStreamElement
unsets it.
master
Leonard Kim 6 年之前
父節點
當前提交
b655c8d54a
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5
    0
      modules/UI/videolayout/RemoteVideo.js

+ 5
- 0
modules/UI/videolayout/RemoteVideo.js 查看文件

@@ -357,6 +357,11 @@ RemoteVideo.prototype.removeRemoteStreamElement = function(stream) {
357 357
     logger.info(`${isVideo ? 'Video' : 'Audio'
358 358
     } removed ${this.id}`, select);
359 359
 
360
+
361
+    if (stream === this.videoStream) {
362
+        this.videoStream = null;
363
+    }
364
+
360 365
     this.updateView();
361 366
 };
362 367
 

Loading…
取消
儲存