Fix chrome condition test

This commit is contained in:
Tamius Han 2021-01-30 13:31:30 +01:00
parent 71cb357424
commit 0aa7beb525

View File

@ -270,8 +270,15 @@ squeezeFactor: ${squeezeFactor}`, '\nvideo', this.conf.video);
return;
}
stretchFactors.xFactor = Math.min(stretchFactors.xFactor, maxSafeAr);
stretchFactors.yFactor = Math.min(stretchFactors.yFactor, maxSafeAr);
const maxSafeStretchFactor = this.conf.resizer.stretcher.calculateCrop(maxSafeAr).xFactor;
console.info('Stretch factors before:', stretchFactors.xFactor, stretchFactors.yFactor, "max safe:", maxSafeStretchFactor, "max safe ar:", maxSafeAr);
stretchFactors.xFactor = Math.min(stretchFactors.xFactor, maxSafeStretchFactor);
stretchFactors.yFactor = Math.min(stretchFactors.yFactor, maxSafeStretchFactor);
console.info('Stretch factors after:', stretchFactors.xFactor, stretchFactors.yFactor);
}
}
}