From e7d43c566f7129c69cb241a272d32e88b655be16 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 27 Oct 2021 20:10:55 +0200 Subject: [PATCH] Fix aspect ratio not getting applied correctly --- src/ext/lib/video-transform/Resizer.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ext/lib/video-transform/Resizer.ts b/src/ext/lib/video-transform/Resizer.ts index a3c2c8e..60f6603 100644 --- a/src/ext/lib/video-transform/Resizer.ts +++ b/src/ext/lib/video-transform/Resizer.ts @@ -88,9 +88,12 @@ class Resizer { this.stretcher = new Stretcher(this.conf); this.zoom = new Zoom(this.conf); - this.videoAlignment.x = this.settings.getDefaultVideoAlignment(window.location.hostname); // this is initial video alignment - this.destroyed = false; + this.videoAlignment = { + x: this.settings.getDefaultVideoAlignment(window.location.hostname), + y: VideoAlignmentType.Center + }; // this is initial video alignment + this.destroyed = false; if (this.settings.active.pan) { this.canPan = this.settings.active.miscSettings.mousePan.enabled; @@ -99,8 +102,6 @@ class Resizer { } this.userCssClassName = videoData.userCssClassName; - - } initEventBus() { @@ -596,8 +597,6 @@ class Resizer { }; - - if (this.pan.relativeOffsetX || this.pan.relativeOffsetY) { // don't offset when video is smaller than player if(wdiffAfterZoom >= 0 || hdiffAfterZoom >= 0) {