Skip to content

Commit

Permalink
fix: Clear some caches when install/uninstall PatchedMediaKeysApple (#…
Browse files Browse the repository at this point in the history
…8198)

Related to #8190
  • Loading branch information
avelad authored Mar 3, 2025
1 parent 2d0995f commit 61d44c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/polyfill/patchedmediakeys_apple.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ goog.require('shaka.util.FakeEvent');
goog.require('shaka.util.FakeEventTarget');
goog.require('shaka.util.MediaReadyState');
goog.require('shaka.util.PublicPromise');
goog.require('shaka.util.StreamUtils');
goog.require('shaka.util.StringUtils');


Expand Down Expand Up @@ -96,6 +97,9 @@ shaka.polyfill.PatchedMediaKeysApple = class {
PatchedMediaKeysApple.requestMediaKeySystemAccess;

window.shakaMediaKeysPolyfill = PatchedMediaKeysApple.apiName_;

shaka.util.StreamUtils.clearDecodingConfigCache();
shaka.drm.DrmUtils.clearMediaKeySystemAccessMap();
}

/**
Expand Down Expand Up @@ -135,6 +139,9 @@ shaka.polyfill.PatchedMediaKeysApple = class {
PatchedMediaKeysApple.originalHTMLMediaElementPrototypeMediaKeys = null;

window.shakaMediaKeysPolyfill = '';

shaka.util.StreamUtils.clearDecodingConfigCache();
shaka.drm.DrmUtils.clearMediaKeySystemAccessMap();
}

/**
Expand Down

0 comments on commit 61d44c9

Please sign in to comment.