Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

resize #videospace on window resize

isymchychcff44286f5f3
diff --git a/modules/UI/videolayout/VideoLayout.js b/modules/UI/videolayout/VideoLayout.js
index cb59dd58f4..88152028a0 100644
--- a/modules/UI/videolayout/VideoLayout.js
+++ b/modules/UI/videolayout/VideoLayout.js
@@ -427,12 +427,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);
},
@@ -880,26 +880,22 @@ var VideoLayout = {
* is resized.
*/
resizeVideoSpace (animate, isChatVisible, completeFunction) {
- var availableHeight = window.innerHeight;
- var availableWidth = UIUtil.getAvailableVideoWidth(isChatVisible);
-
- if (availableWidth < 0 || availableHeight < 0) return;
-
- if(animate) {
- $('#videospace').animate({
- right: window.innerWidth - availableWidth,
- width: availableWidth,
- height: availableHeight
- },
- {
- queue: false,
- duration: 500,
- complete: completeFunction
- });
- } else {
- $('#videospace').width(availableWidth).height(availableHeight);
+ let availableHeight = window.innerHeight;
+ let availableWidth = UIUtil.getAvailableVideoWidth(isChatVisible);
+
+ if (availableWidth < 0 || availableHeight < 0) {
+ return;
}
+ $('#videospace').animate({
+ right: window.innerWidth - availableWidth,
+ width: availableWidth,
+ height: availableHeight
+ }, {
+ queue: false,
+ duration: animate ? 500 : 1,
+ complete: completeFunction
+ });
},
getSmallVideo (id) {