Fixes missing local video thumbnail before entering a conference.

This commit is contained in:
yanas 2016-01-26 17:18:10 -06:00
parent ae4f5c64d4
commit 6e7ed13370
3 changed files with 9 additions and 7 deletions

View File

@ -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);

View File

@ -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
}, {

View File

@ -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);