diff --git a/src/ext/lib/video-data/PlayerData.js b/src/ext/lib/video-data/PlayerData.js index b131d82..f0abd6d 100644 --- a/src/ext/lib/video-data/PlayerData.js +++ b/src/ext/lib/video-data/PlayerData.js @@ -85,11 +85,21 @@ class PlayerData { return ( window.innerHeight == window.screen.height && window.innerWidth == window.screen.width); } + // player size observer may not be strictly necessary here + _playerDimensionChangedInProgress = false; onPlayerDimensionsChanged(mutationList, observer, context) { + if (this._playerDimensionChangedInProgress) { + return; + } + + this._playerDimensionChangedInProgress = true; + if (this?.checkPlayerSizeChange()) { this.videoData.resizer.restore(); } + + this._playerDimensionChangedInProgress = false; }