console.log("[Scaler::calculateCrop] trying to set ar. args are: ar->",ar,"; playerDimensions->",playerDimensions.width,"×",playerDimensions.height,"| obj:",GlobalVars.playerDimensions);
console.log("[Scaler::calculateCrop] ar is ",ar,", file ar is",fileAr,", playerDimensions are ",GlobalVars.playerDimensions.width,"×",GlobalVars.playerDimensions.height,"| obj:",GlobalVars.playerDimensions);
varvideoDimensions={
width:0,
height:0,
actualWidth:0,// width of the video (excluding pillarbox) when <video> tag height is equal to width
actualHeight:0,// height of the video (excluding letterbox) when <video> tag height is equal to height
}
if(Debug.debug){
console.log("[Scaler::calculateCrop] Player dimensions?",GlobalVars.playerDimensions.width,"×",GlobalVars.playerDimensions.height,"| obj:",GlobalVars.playerDimensions);
}
if(fileAr<ar){
// imamo letterbox zgoraj in spodaj -> spremenimo velikost videa (a nikoli širše od ekrana)
// letterbox -> change video size (but never to wider than monitor width)
console.log("[Scaler::calculateCrop] Video dimensions: ",videoDimensions.width,"×",videoDimensions.height,"(obj:",videoDimensions,"); playerDimensions:",GlobalVars.playerDimensions.width,"×",GlobalVars.playerDimensions.height,"(obj:",GlobalVars.playerDimensions,")");