From aea85b04b6f603bd2c4550b31d8b48a14ff0ffab Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Mon, 19 Aug 2024 15:14:59 +0800 Subject: [PATCH] fix(ABR): Fix restrictToElementSize running while abr disabled (#7153) Fixes https://github.com/shaka-project/shaka-player/issues/7151 --- AUTHORS | 1 + CONTRIBUTORS | 1 + lib/abr/simple_abr_manager.js | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index aa44d0a088..c68b50c292 100644 --- a/AUTHORS +++ b/AUTHORS @@ -77,6 +77,7 @@ Pavel Zablockij Percy Tse Peter Nycander Philo Inc. <*@philo.com> +PikachuEXE Prakash Robert Colantuoni Robert Galluccio diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 9e60317e21..6a875a83c5 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -111,6 +111,7 @@ Paul Jordaan Pavel Zablockij Percy Tse Peter Nycander +PikachuEXE Prakash Duggaraju Robert Colantuoni Robert Galluccio diff --git a/lib/abr/simple_abr_manager.js b/lib/abr/simple_abr_manager.js index 9eb5b21b9a..229e2b006c 100644 --- a/lib/abr/simple_abr_manager.js +++ b/lib/abr/simple_abr_manager.js @@ -107,7 +107,7 @@ shaka.abr.SimpleAbrManager = class { /** @private {shaka.util.Timer} */ this.resizeObserverTimer_ = new shaka.util.Timer(() => { - if (this.config_.restrictToElementSize) { + if (this.enabled_ && this.config_.restrictToElementSize) { const chosenVariant = this.chooseVariant(); if (chosenVariant) { this.switch_(chosenVariant, this.config_.clearBufferSwitch,