formatting

This commit is contained in:
Tamius Han 2021-04-04 15:48:46 +02:00
parent 5d1ad6f935
commit fee73519e6

View File

@ -271,17 +271,16 @@ squeezeFactor: ${squeezeFactor}`, '\nvideo', this.conf.video);
* style attribute does). * style attribute does).
*/ */
chromeBugMitigation(stretchFactors) { chromeBugMitigation(stretchFactors) {
console.log("limit zoom?", BrowserDetect.anyChromium, this.conf.player?.dimensions, this.settings?.active?.mitigations?.zoomLimit?.enabled); console.log("limit zoom?", BrowserDetect.anyChromium, this.conf.player?.dimensions, this.settings?.active?.mitigations?.zoomLimit?.enabled, 'stack?', new Error().stack);
if ( if (
BrowserDetect.anyChromium BrowserDetect.anyChromium
&& (this.conf.player?.dimensions?.fullscreen || ! && (this.conf.player?.dimensions?.fullscreen || ! this.settings?.active?.mitigations?.zoomLimit?.fullscreenOnly)
this.settings?.active?.mitigations?.zoomLimit?.fullscreenOnly)
&& this.settings?.active?.mitigations?.zoomLimit?.enabled && this.settings?.active?.mitigations?.zoomLimit?.enabled
) { ) {
const playerAr = this.conf.player.dimensions.width / this.conf.player.dimensions.height; const playerAr = this.conf.player.dimensions.width / this.conf.player.dimensions.height;
const streamAr = this.conf.video.videoWidth / this.conf.video.videoHeight; const streamAr = this.conf.video.videoWidth / this.conf.video.videoHeight;
let maxSafeAr; let maxSafeAr: number;
let arLimitFactor = this.settings?.active?.mitigations?.zoomLimit?.limit ?? 0.997; let arLimitFactor = this.settings?.active?.mitigations?.zoomLimit?.limit ?? 0.997;
if (playerAr >= (streamAr * 1.1)) { if (playerAr >= (streamAr * 1.1)) {