Additional anti-recursing measures

This commit is contained in:
Tamius Han 2021-01-31 23:55:50 +01:00
parent ea186d0aeb
commit 02b4b44780

View File

@ -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;
}