Skip to content

Commit

Permalink
fix: Fix unload call after destroy (#7690)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored Nov 28, 2024
1 parent 1236c2d commit 18652b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,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();
}
Expand Down

0 comments on commit 18652b6

Please sign in to comment.