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 committed Dec 4, 2024
1 parent aa6b28e commit 0121c0c
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 @@ -1496,7 +1496,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 0121c0c

Please sign in to comment.