From 4f478a4667a930c86b28c7fbfa1be0aa0cf88ec6 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 23 Sep 2020 00:23:24 +0200 Subject: [PATCH] Calculate "real" displayed side of video instead of relying on offsetWidth --- src/ext/lib/video-transform/Resizer.js | 76 ++++++++++++++++++++++++-- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 183e4b8..12e31d7 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -442,18 +442,85 @@ class Resizer { // mostly internal stuff + /** + * Returns the size of the video file _as displayed_ on the screen. + * Consider the following example: + * + * * player dimensions are 2560x1080 + * *