From 7fb9aad0d0ddda325ea29fcc3acd1a38cc6e0492 Mon Sep 17 00:00:00 2001 From: Tamius Han Date: Wed, 21 Oct 2020 23:51:58 +0200 Subject: [PATCH] misc fixes --- src/ext/lib/video-data/VideoData.js | 4 +++- src/ext/lib/video-transform/Resizer.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ext/lib/video-data/VideoData.js b/src/ext/lib/video-data/VideoData.js index 9be729a..2fbf15f 100644 --- a/src/ext/lib/video-data/VideoData.js +++ b/src/ext/lib/video-data/VideoData.js @@ -56,6 +56,7 @@ class VideoData { this.restoreCrop(); this.videoDimensionsLoaded = true; + } } @@ -123,7 +124,7 @@ class VideoData { } restoreCrop() { - this.logger.log('info', 'debug', '[VideoData::restoreCrop] Attempting to reset/restore aspect ratio.') + this.logger.log('info', 'debug', '[VideoData::restoreCrop] Attempting to reset aspect ratio.') // if we have default crop set for this page, apply this. // otherwise, reset crop if (this.pageInfo.defaultCrop) { @@ -132,6 +133,7 @@ class VideoData { this.resizer.reset(); try { + this.stopArDetection(); this.startArDetection(); } catch (e) { this.logger.log('warn', 'debug', '[VideoData::restoreCrop] Autodetection not resumed. Reason:', e); diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 3b18327..5402288 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -385,7 +385,7 @@ class Resizer { } restore() { - this.logger.log('info', 'debug', "[Resizer::restore] attempting to restore aspect ratio", {'a_lastAr': this.lastAr} ); + this.logger.log('info', 'debug', "[Resizer::restore] attempting to restore aspect ratio", {'lastAr': this.lastAr} ); // this is true until we verify that css has actually been applied if(this.lastAr.type === AspectRatio.Initial){