From 22809651bea8085eff97b40dc9cdf80369127d64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Thu, 28 Nov 2024 15:24:54 +0100 Subject: [PATCH] fix: Fix unload call after destroy (#7690) --- lib/player.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/player.js b/lib/player.js index 2a862496fa..5a0b160728 100644 --- a/lib/player.js +++ b/lib/player.js @@ -1508,7 +1508,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { // after several playbacks, and they are not able anymore to properly // create MediaKeys objects. To prevent it, clear the cache after // each playback. - if (this.config_.streaming.clearDecodingCache) { + if (this.config_ && this.config_.streaming.clearDecodingCache) { shaka.util.StreamUtils.clearDecodingConfigCache(); shaka.util.DrmUtils.clearMediaKeySystemAccessMap(); }