Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Makes video screen fit configurable.
Yana Stamcheva8a678286f7a8
diff --git a/interface_config.js b/interface_config.jsindex 4de946ad19..afe7578def 100644--- a/interface_config.js+++ b/interface_config.js@@ -20,6 +20,7 @@ var interfaceConfig = {'recording', 'security', 'invite', 'chat', 'prezi', 'etherpad','fullscreen', 'sip', 'dialpad', 'settings', 'hangup', 'filmstrip','contacts'],+ VIDEO_LAYOUT_FIT: 'both', // height, width, both/*** Whether to only show the filmstrip (and hide the toolbar).*/diff --git a/modules/UI/videolayout/LargeVideo.js b/modules/UI/videolayout/LargeVideo.jsindex 7ae38f1780..78feb1252a 100644--- a/modules/UI/videolayout/LargeVideo.js+++ b/modules/UI/videolayout/LargeVideo.js@@ -189,6 +189,7 @@ function getCameraVideoSize(videoWidth,videoHeight,videoSpaceWidth,videoSpaceHeight) {+if (!videoWidth)videoWidth = currentVideoWidth;if (!videoHeight)@@ -196,18 +197,32 @@ function getCameraVideoSize(videoWidth,var aspectRatio = videoWidth / videoHeight;- var availableWidth = Math.max(videoWidth, videoSpaceWidth);- var availableHeight = Math.max(videoHeight, videoSpaceHeight);+ var availableWidth = videoWidth;+ var availableHeight = videoHeight;- if (availableWidth / aspectRatio < videoSpaceHeight) {+ if (interfaceConfig.VIDEO_LAYOUT_FIT == 'height') {availableHeight = videoSpaceHeight;- availableWidth = availableHeight * aspectRatio;+ availableWidth = availableHeight*aspectRatio;}-- if (availableHeight * aspectRatio < videoSpaceWidth) {+ else if (interfaceConfig.VIDEO_LAYOUT_FIT == 'width') {availableWidth = videoSpaceWidth;- availableHeight = availableWidth / aspectRatio;+ availableHeight = availableWidth/aspectRatio;}+ else if (interfaceConfig.VIDEO_LAYOUT_FIT == 'both') {+ availableWidth = Math.max(videoWidth, videoSpaceWidth);+ availableHeight = Math.max(videoHeight, videoSpaceHeight);++ if (availableWidth / aspectRatio < videoSpaceHeight) {+ availableHeight = videoSpaceHeight;+ availableWidth = availableHeight * aspectRatio;+ }++ if (availableHeight * aspectRatio < videoSpaceWidth) {+ availableWidth = videoSpaceWidth;+ availableHeight = availableWidth / aspectRatio;+ }+ }+return [availableWidth, availableHeight];}