@ -22,6 +22,7 @@ import { getCurrentLayout, LAYOUTS } from '../video-layout';
import {
ASPECT _RATIO _BREAKPOINT ,
DEFAULT _FILMSTRIP _WIDTH ,
DEFAULT _LOCAL _TILE _ASPECT _RATIO ,
DISPLAY _AVATAR ,
DISPLAY _VIDEO ,
FILMSTRIP _GRID _BREAKPOINT ,
@ -161,45 +162,26 @@ export function calculateThumbnailSizeForHorizontalView(clientHeight: number = 0
* Calculates the size for thumbnails when in vertical view layout .
*
* @ param { number } clientWidth - The height of the app window .
* @ returns { { local : { height , width } , remote : { height , width } } }
* /
export function calculateThumbnailSizeForVerticalView ( clientWidth : number = 0 ) {
const availableWidth = Math . min (
Math . max ( clientWidth - VERTICAL _VIEW _HORIZONTAL _MARGIN , 0 ) ,
interfaceConfig . FILM _STRIP _MAX _HEIGHT || DEFAULT _FILMSTRIP _WIDTH ) ;
return {
local : {
height : Math . floor ( availableWidth / interfaceConfig . LOCAL _THUMBNAIL _RATIO ) ,
width : availableWidth
} ,
remote : {
height : Math . floor ( availableWidth / interfaceConfig . REMOTE _THUMBNAIL _RATIO ) ,
width : availableWidth
}
} ;
}
/ * *
* Calculates the size for thumbnails when in vertical view layout
* and the filmstrip is resizable .
*
* @ param { number } clientWidth - The height of the app window .
* @ param { number } filmstripWidth - The width of the filmstrip .
* @ param { boolean } isResizable - Whether the filmstrip is resizable or not .
* @ returns { { local : { height , width } , remote : { height , width } } }
* /
export function calculateThumbnailSizeForResizableVerticalView ( clientWidth : number = 0 , filmstripWidth : number = 0 ) {
export function calculateThumbnailSizeForVerticalView ( clientWidth : number = 0 ,
filmstripWidth : number = 0 , isResizable = false ) {
const availableWidth = Math . min (
Math . max ( clientWidth - VERTICAL _VIEW _HORIZONTAL _MARGIN , 0 ) ,
filmstripWidth || DEFAULT _FILMSTRIP _WIDTH ) ;
( isResizable ? filmstripWidth : interfaceConfig . FILM _STRIP _MAX _HEIGHT ) || DEFAULT _FILMSTRIP _WIDTH ) ;
return {
local : {
height : DEFAULT _FILMSTRIP _WIDTH ,
height : Math . floor ( availableWidth
/ ( i n t e r f a c e C o n f i g . L O C A L _ T H U M B N A I L _ R A T I O | | D E F A U L T _ L O C A L _ T I L E _ A S P E C T _ R A T I O ) ) ,
width : availableWidth
} ,
remote : {
height : DEFAULT _FILMSTRIP _WIDTH ,
height : isResizable
? DEFAULT _FILMSTRIP _WIDTH
: Math . floor ( availableWidth / interfaceConfig . REMOTE _THUMBNAIL _RATIO ) ,
width : availableWidth
}
} ;