diff --git a/src/ext/lib/video-data/PlayerData.js b/src/ext/lib/video-data/PlayerData.js index cc5239f..5527bc4 100644 --- a/src/ext/lib/video-data/PlayerData.js +++ b/src/ext/lib/video-data/PlayerData.js @@ -394,7 +394,7 @@ class PlayerData { this.getPlayer(); } - checkPlayerSizeChange(){ + checkPlayerSizeChange() { // this 'if' is just here for debugging — real code starts later. It's safe to collapse and // ignore the contents of this if (unless we need to change how logging works) if (this.logger.canLog('debug')){ diff --git a/src/ext/lib/video-transform/Resizer.js b/src/ext/lib/video-transform/Resizer.js index 2f10867..7dcf149 100644 --- a/src/ext/lib/video-transform/Resizer.js +++ b/src/ext/lib/video-transform/Resizer.js @@ -303,10 +303,8 @@ class Resizer { this.zoom.applyZoom(stretchFactors); - //TODO: correct these two var translate = this.computeOffsets(stretchFactors); this.applyCss(stretchFactors, translate); - } @@ -581,8 +579,11 @@ class Resizer { `Video seems to be both wider and taller (or shorter and narrower) than player element at the same time. This is super duper not supposed to happen.\n\n`, `Player element needs to be checked.` ) - this.player.checkPlayerSizeChange(); + if (this.conf.player.checkPlayerSizeChange()) { + this.conf.player.onPlayerDimensionsChanged(); + } } + return translate; }