From 6e7ed13370b640c8740c9294e72f86ceac8dfe91 Mon Sep 17 00:00:00 2001 From: yanas Date: Tue, 26 Jan 2016 17:18:10 -0600 Subject: [PATCH] Fixes missing local video thumbnail before entering a conference. --- modules/UI/UI.js | 2 +- modules/UI/toolbars/BottomToolbar.js | 5 +++-- modules/UI/videolayout/VideoLayout.js | 9 +++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 1740d05c0..4d13afa87 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -338,7 +338,7 @@ UI.start = function () { if (!interfaceConfig.filmStripOnly) { VideoLayout.initLargeVideo(PanelToggler.isVisible()); } - VideoLayout.resizeLargeVideoContainer(PanelToggler.isVisible()); + VideoLayout.resizeLargeVideoContainer(PanelToggler.isVisible(), true); ContactList.init(eventEmitter); diff --git a/modules/UI/toolbars/BottomToolbar.js b/modules/UI/toolbars/BottomToolbar.js index 96160db48..eff37614b 100644 --- a/modules/UI/toolbars/BottomToolbar.js +++ b/modules/UI/toolbars/BottomToolbar.js @@ -65,7 +65,8 @@ const BottomToolbar = { return this.filmStrip.width(); }, - resizeThumbnails (thumbWidth, thumbHeight, animate = false, show = false) { + resizeThumbnails (thumbWidth, thumbHeight, + animate = false, forceUpdate = false) { return new Promise(resolve => { this.filmStrip.animate({ // adds 2 px because of small video 1px border @@ -75,7 +76,7 @@ const BottomToolbar = { duration: animate ? 500 : 0 }); - this.getThumbs(!show).animate({ + this.getThumbs(!forceUpdate).animate({ height: thumbHeight, width: thumbWidth }, { diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js index a7124a64f..be4130dd3 100644 --- a/modules/UI/videolayout/VideoLayout.js +++ b/modules/UI/videolayout/VideoLayout.js @@ -429,25 +429,26 @@ var VideoLayout = { /** * Resizes the large video container. */ - resizeLargeVideoContainer (isSideBarVisible) { + resizeLargeVideoContainer (isSideBarVisible, forceUpdate) { let animate = false; if (largeVideo) { largeVideo.updateContainerSize(isSideBarVisible); largeVideo.resize(animate); } this.resizeVideoSpace(animate, isSideBarVisible); - this.resizeThumbnails(false); + this.resizeThumbnails(false, forceUpdate); }, /** * Resizes thumbnails. */ - resizeThumbnails (animate = false, show = false) { + resizeThumbnails (animate = false, forceUpdate = false) { let {thumbWidth, thumbHeight} = this.calculateThumbnailSize(); $('.userAvatar').css('left', (thumbWidth - thumbHeight) / 2); - BottomToolbar.resizeThumbnails(thumbWidth, thumbHeight, animate, show) + BottomToolbar.resizeThumbnails(thumbWidth, thumbHeight, + animate, forceUpdate) .then(function () { BottomToolbar.resizeToolbar(thumbWidth, thumbHeight); AudioLevels.updateCanvasSize(thumbWidth, thumbHeight);