always return videoDimensions

This commit is contained in:
Tamius Han 2021-01-31 23:32:32 +01:00
parent 96a5b8da8f
commit ea186d0aeb
2 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,7 @@ class Scaler {
this.logger.log('info', 'scaler', "[Scaler::calculateCrop] ar is " ,ar.ratio, ", file ar is", streamAr, ", this.conf.player.dimensions are ", this.conf.player.dimensions.width, "×", this.conf.player.dimensions.height, "| obj:", this.conf.player.dimensions);
var videoDimensions = {
const videoDimensions = {
xFactor: 1,
yFactor: 1,
actualWidth: 0, // width of the video (excluding pillarbox) when <video> tag height is equal to width
@ -202,6 +202,8 @@ class Scaler {
videoDimensions.xFactor *= videoDimensions.arCorrectionFactor;
videoDimensions.yFactor *= videoDimensions.arCorrectionFactor;
}
return videoDimensions;
}
}

View File

@ -286,6 +286,8 @@ squeezeFactor: ${squeezeFactor}`, '\nvideo', this.conf.video);
stretchFactors.xFactor = Math.min(stretchFactors.xFactor, maxSafeStretchFactor);
stretchFactors.yFactor = Math.min(stretchFactors.yFactor, maxSafeStretchFactor);
return stretchFactors;
}
}
}