diff --git a/CHANGELOG.md b/CHANGELOG.md index 19fc17d..c15a6c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,12 +11,16 @@ ## v7.0 (planned major) * WebGL autodetection -## v6.0 (planned major) +## v6.0 (next major) * in-player GUI * Fix UI logger -## v5.x (next major) +## v5.x (current major) + +### v5.0.1 +* Turned off zoom limitations for Edge and Chrome. +* Added an option for users to manually re-enable (and configure) Chrome/Edge's zoom limiter. ### v5.0.0 diff --git a/package-lock.json b/package-lock.json index 299d8d0..18290b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ultrawidify", - "version": "5.0.0", + "version": "5.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2d61fc0..0c3c8f4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ultrawidify", - "version": "5.0.0", + "version": "5.0.1", "description": "Aspect ratio fixer for youtube and other sites, with automatic aspect ratio detection. Supports ultrawide and other ratios.", "author": "Tamius Han ", "scripts": { diff --git a/src/common/interfaces/SettingsInterface.ts b/src/common/interfaces/SettingsInterface.ts index 8a06351..0806aaa 100644 --- a/src/common/interfaces/SettingsInterface.ts +++ b/src/common/interfaces/SettingsInterface.ts @@ -181,6 +181,18 @@ interface SettingsInterface { pan?: any, version?: string, preventReload?: boolean, + + // ----------------------------------------- + // ::: MITIGATIONS ::: + // ----------------------------------------- + // Settings for browser bug workarounds. + mitigations?: { + zoomLimit?: { + enabled?: boolean, + fullscreenOnly: boolean, + limit?: number, + } + } // ----------------------------------------- // ::: ACTIONS ::: // ----------------------------------------- diff --git a/src/ext/lib/video-data/PlayerData.ts b/src/ext/lib/video-data/PlayerData.ts index 11e2fcb..e74f747 100644 --- a/src/ext/lib/video-data/PlayerData.ts +++ b/src/ext/lib/video-data/PlayerData.ts @@ -108,6 +108,7 @@ class PlayerData { } static isFullScreen(){ + console.info(window.innerHeight, window.screen.height, 'x', window.innerWidth, window.screen.width); return ( window.innerHeight == window.screen.height && window.innerWidth == window.screen.width); } diff --git a/src/ext/lib/video-transform/Stretcher.ts b/src/ext/lib/video-transform/Stretcher.ts index 388b285..a10328e 100644 --- a/src/ext/lib/video-transform/Stretcher.ts +++ b/src/ext/lib/video-transform/Stretcher.ts @@ -271,16 +271,23 @@ squeezeFactor: ${squeezeFactor}`, '\nvideo', this.conf.video); * style attribute does). */ chromeBugMitigation(stretchFactors) { - if (BrowserDetect.anyChromium && this.conf.player?.dimensions?.fullscreen) { + console.log("limit zoom?", BrowserDetect.anyChromium, this.conf.player?.dimensions, this.settings?.active?.mitigations?.zoomLimit?.enabled); + if ( + BrowserDetect.anyChromium + && (this.conf.player?.dimensions?.fullscreen || ! + this.settings?.active?.mitigations?.zoomLimit?.fullscreenOnly) + && this.settings?.active?.mitigations?.zoomLimit?.enabled + ) { const playerAr = this.conf.player.dimensions.width / this.conf.player.dimensions.height; const streamAr = this.conf.video.videoWidth / this.conf.video.videoHeight; let maxSafeAr; + let arLimitFactor = this.settings?.active?.mitigations?.zoomLimit?.limit ?? 0.997; if (playerAr >= (streamAr * 1.1)) { - maxSafeAr = (window.innerWidth * 0.997) / window.innerHeight; + maxSafeAr = (window.innerWidth * arLimitFactor) / window.innerHeight; } else if (playerAr < (streamAr * 0.95)) { - maxSafeAr = window.innerWidth / (window.innerHeight * 0.997); + maxSafeAr = window.innerWidth / (window.innerHeight * arLimitFactor); } else { // in some cases, we tolerate minor stretch to avoid tiny black bars return; diff --git a/src/manifest.json b/src/manifest.json index abeb11c..1ab22a1 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Ultrawidify", "description": "Removes black bars on ultrawide videos and offers advanced options to fix aspect ratio.", - "version": "5.0.0.1", + "version": "5.0.1", "applications": { "gecko": { "id": "{cf02b1a7-a01a-4e37-a609-516a283f1ed3}" diff --git a/src/popup/panels/SiteDetailsPanel.vue b/src/popup/panels/SiteDetailsPanel.vue index 0e5d5fd..3547ae8 100644 --- a/src/popup/panels/SiteDetailsPanel.vue +++ b/src/popup/panels/SiteDetailsPanel.vue @@ -1,5 +1,5 @@