Merge branch 'video-resize-issue' of git://github.com/isymchych/jitsi-meet into isymchych-video-resize-issue

This commit is contained in:
hristoterezov 2016-01-25 16:45:36 -06:00
commit 714e304e98
1 changed files with 16 additions and 20 deletions

View File

@ -429,12 +429,12 @@ var VideoLayout = {
* Resizes the large video container.
*/
resizeLargeVideoContainer (isSideBarVisible) {
let animate = false;
if (largeVideo) {
largeVideo.updateContainerSize(isSideBarVisible);
largeVideo.resize(false);
} else {
this.resizeVideoSpace(false, isSideBarVisible);
largeVideo.resize(animate);
}
this.resizeVideoSpace(animate, isSideBarVisible);
this.resizeThumbnails(false);
},
@ -893,26 +893,22 @@ var VideoLayout = {
* is resized.
*/
resizeVideoSpace (animate, isChatVisible, completeFunction) {
var availableHeight = window.innerHeight;
var availableWidth = UIUtil.getAvailableVideoWidth(isChatVisible);
let availableHeight = window.innerHeight;
let availableWidth = UIUtil.getAvailableVideoWidth(isChatVisible);
if (availableWidth < 0 || availableHeight < 0) return;
if (availableWidth < 0 || availableHeight < 0) {
return;
}
if(animate) {
$('#videospace').animate({
right: window.innerWidth - availableWidth,
width: availableWidth,
height: availableHeight
},
{
}, {
queue: false,
duration: 500,
duration: animate ? 500 : 1,
complete: completeFunction
});
} else {
$('#videospace').width(availableWidth).height(availableHeight);
}
},
getSmallVideo (id) {