From 554f9edf115dcb7be552b4a94027484cd28d2916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Fri, 1 Dec 2023 06:39:49 +0100 Subject: [PATCH] fix: Fix trackschanged event not fired after a license request is denied for some tracks (#5962) Fixes https://github.com/shaka-project/shaka-player/issues/4874 --- lib/player.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/player.js b/lib/player.js index d3169e47b7..8752ecb68d 100644 --- a/lib/player.js +++ b/lib/player.js @@ -6299,6 +6299,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { } // if (keyIds.size) if (tracksChanged) { + this.onTracksChanged_(); const variantsUpdated = this.updateAbrManagerVariants_(); if (!variantsUpdated) { return; @@ -6310,10 +6311,6 @@ shaka.Player = class extends shaka.util.FakeEventTarget { shaka.log.debug('Choosing new streams after key status changed'); this.chooseVariantAndSwitch_(); } - - if (tracksChanged) { - this.onTracksChanged_(); - } } /**