From b6dec385dc53587edf8cc3e3cdff237a2ee6edb1 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Sat, 3 Jan 2026 23:30:45 +0100 Subject: [PATCH] Fix bug with zoom not working if AR hasn't been set yet --- src/ext/lib/video-transform/Resizer.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ext/lib/video-transform/Resizer.ts b/src/ext/lib/video-transform/Resizer.ts index a006041..7cbcbf7 100644 --- a/src/ext/lib/video-transform/Resizer.ts +++ b/src/ext/lib/video-transform/Resizer.ts @@ -73,7 +73,11 @@ class Resizer { if (this._lastAr?.type !== x.type || this._lastAr?.ratio !== x.ratio) { this.eventBus.send('uw-config-broadcast', {type: 'ar', config: x}); } - this._lastAr = x; + if (x) { + this._lastAr = x; + } else { + this._lastAr = {type: AspectRatioType.Initial}; + } } get lastAr() { return this._lastAr; @@ -489,8 +493,9 @@ class Resizer { toFixedAr() { // converting to fixed AR means we also turn off autoAR + this.setAr({ - ratio: this.lastAr.ratio, + ratio: this.lastAr.ratio ?? this.getFileAr(), type: AspectRatioType.Fixed }); }