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
Merges changes with latest master.
yanas5c956de99eb4
diff --cc interface_config.jsindex e67b9ef9af,6e23372650..8a276b1fc1--- a/interface_config.js+++ b/interface_config.js@@@ -68,7 -47,8 +64,9 @@@ var interfaceConfig = { // eslint-disabDISABLE_DOMINANT_SPEAKER_INDICATOR: false,// disables the ringing sound when the RingOverlay is shown.DISABLE_RINGING: false,- AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)",- AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)",+ AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.4)",+ AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.2)",- POLICY_LOGO: null++ POLICY_LOGO: null,+ LOCAL_THUMBNAIL_RATIO: 16/9, //16:9- REMOTE_THUMBNAIL_RATIO: 1, //1:1++ REMOTE_THUMBNAIL_RATIO: 1 //1:1};diff --cc modules/UI/videolayout/FilmStrip.jsindex d33f5a8544,fb1ba7c30b..1f2fd8e6cd--- a/modules/UI/videolayout/FilmStrip.js+++ b/modules/UI/videolayout/FilmStrip.js@@@ -275,51 -148,69 +236,77 @@@ const FilmStrip =},/**- * Takes the available size for thumbnail and calculates- * final size of thumbnails- * @param availableWidth- * @param availableHeight- * @returns {{localVideo, remoteVideo}}+ * Calculate the thumbnail size in order to fit all the thumnails in passed+ * dimensions.+ * NOTE: Here we assume that the remote and local thumbnails are with the+ * same height.+ * @param {int} availableWidth the maximum width for all thumbnails+ * @param {int} availableHeight the maximum height for all thumbnails*/calculateThumbnailSizeFromAvailable(availableWidth, availableHeight) {- let { localRatio, remoteRatio } = this.normalizeThumbnailRatio();- let { remoteThumbs } = this.getThumbs(true);- let remoteProportion = remoteRatio.widthRatio * remoteThumbs.length;- let widthProportion = remoteProportion + localRatio.widthRatio;-- let heightUnit = availableHeight / localRatio.heightRatio;- let widthUnit = availableWidth / widthProportion;+ /**+ * Let:+ * lW - width of the local thumbnail+ * rW - width of the remote thumbnail+ * h - the height of the thumbnails+ * remoteRatio - width:height for the remote thumbnail+ * localRatio - width:height for the local thumbnail+ * numberRemoteThumbs - number of remote thumbnails (we have only one+ * local thumbnail)+ *+ * Since the height for local thumbnail = height for remote thumbnail+ * and we know the ratio (width:height) for the local and for the+ * remote thumbnail we can find rW/lW:+ * rW / remoteRatio = lW / localRatio then -+ * remoteLocalWidthRatio = rW / lW = remoteRatio / localRatio+ * and rW = lW * remoteRatio / localRatio = lW * remoteLocalWidthRatio+ * And the total width for the thumbnails is:+ * totalWidth = rW * numberRemoteThumbs + lW+ * = lW * remoteLocalWidthRatio * numberRemoteThumbs + lW =+ * lW * (remoteLocalWidthRatio * numberRemoteThumbs + 1)+ * and the h = lW/localRatio+ *+ * In order to fit all the thumbails in the area defined by+ * availableWidth * availableHeight we should check one of the+ * following options:+ * 1) if availableHeight == h - totalWidth should be less than+ * availableWidth+ * 2) if availableWidth == totalWidth - h should be less than+ * availableHeight+ *+ * 1) or 2) will be true and we are going to use it to calculate all+ * sizes.+ *+ * if 1) is true that means that+ * availableHeight/h > availableWidth/totalWidth otherwise 2) is true+ */- if (heightUnit < widthUnit) {- widthUnit = heightUnit;- }- else- heightUnit = widthUnit;-- let localVideo = {- thumbWidth: widthUnit * localRatio.widthRatio,- thumbHeight: heightUnit * localRatio.heightRatio- };- let remoteVideo = {- thumbWidth: widthUnit * remoteRatio.widthRatio,- thumbHeight: widthUnit * remoteRatio.heightRatio- };-- return {- localVideo,- remoteVideo- };+ const numberRemoteThumbs = this.getThumbs(true).remoteThumbs.length;+ const remoteLocalWidthRatio = interfaceConfig.REMOTE_THUMBNAIL_RATIO /+ interfaceConfig.LOCAL_THUMBNAIL_RATIO;+ const lW = Math.min(availableWidth /+ (remoteLocalWidthRatio * numberRemoteThumbs + 1), availableHeight *+ interfaceConfig.LOCAL_THUMBNAIL_RATIO);+ const h = lW / interfaceConfig.LOCAL_THUMBNAIL_RATIO;+ return { localVideo:{+ thumbWidth: lW,+ thumbHeight: h+ }, remoteVideo: {+ thumbWidth: lW * remoteLocalWidthRatio,+ thumbHeight: h+ }+ };},- resizeThumbnails (local, remote,+ /**+ * Resizes thumbnails+ * @param local+ * @param remote+ * @param animate+ * @param forceUpdate+ * @returns {Promise}+ */+ resizeThumbnails(local, remote,animate = false, forceUpdate = false) {return new Promise(resolve => {