From d1ea29beeb02cad9870d0e47bab3b1aa652fb460 Mon Sep 17 00:00:00 2001 From: virtuacoplenny Date: Mon, 5 Jun 2017 16:47:26 -0700 Subject: [PATCH] fix(large-video): ensure switch to local video when all others leave (#1607) * fix(large-video): ensure switch to local video when all others leave This handles the case where User A and B are in a call and B has no audio or video. Then B leaves. User A would see User B left on large video. Instead, User A should see self view on large. * squash: always update large video if it is empty * squash: add largeVideo check for filmstrip only mode --- modules/UI/videolayout/VideoLayout.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index 29409e286..e6038e186 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -263,7 +263,9 @@ var VideoLayout = { * otherwise elects new video, in this order. */ updateAfterThumbRemoved (id) { - if (!this.isCurrentlyOnLarge(id)) { + // Always trigger an update if large video is empty. + if (!largeVideo + || (this.getLargeVideoID() && !this.isCurrentlyOnLarge(id))) { return; }