From 2aa91df82081ec89e45b7a289c2c49c660ff81f9 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Thu, 17 Dec 2020 01:48:45 +0100 Subject: [PATCH] Add additional data to debug popup --- src/ext/lib/video-transform/Resizer.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 040ea8d..9f58811 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -560,6 +560,10 @@ class Resizer { const wdiffAfterZoom = realVideoWidth * stretchFactors.xFactor - this.conf.player.dimensions.width; const hdiffAfterZoom = realVideoHeight * stretchFactors.yFactor - this.conf.player.dimensions.height; + debugObject['transformedSize'] = { + x: realVideoWidth * stretchFactors.xFactor, + y: realVideoHeight * stretchFactors.yFactor + } debugObject['sizeDifferenceToPlayer'] = { beforeZoom: { wdiff, @@ -591,11 +595,17 @@ class Resizer { } } - debugObject['videoTranslation'] = { + debugObject['videoTransform'] = { alignment: VideoAlignment.toString(this.videoAlignment), panningEnabled: !!this.pan, - x: translate.x, - y: translate.y, + translate: { + x: translate.x, + y: translate.y, + }, + scale: { + x: stretchFactors.xFactor, + y: stretchFactors.yFactor + } } this.conf.player.reportPlayerDimensionForDebugging();