Skip to content

Commit

Permalink
fix: Install by default shaka.polyfill.PatchedMediaKeysApple when the…
Browse files Browse the repository at this point in the history
…re is no unprefixed EME support (#6053)
  • Loading branch information
avelad committed Jan 9, 2024
1 parent 4e2ca68 commit b1e5063
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/polyfill/patchedmediakeys_apple.js
Expand Up @@ -791,3 +791,9 @@ shaka.polyfill.PatchedMediaKeysApple.MediaKeyStatusMap = class {
goog.asserts.assert(false, 'Not used! Provided only for the compiler.');
}
};

if (!navigator.requestMediaKeySystemAccess ||
// eslint-disable-next-line no-restricted-syntax
!MediaKeySystemAccess.prototype.getConfiguration) {
shaka.polyfill.register(shaka.polyfill.PatchedMediaKeysApple.install);
}

2 comments on commit b1e5063

@Able1991
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this commit it stopped working with SSR(

import shaka from "shaka-player/dist/shaka-player.compiled.debug.js";

ReferenceError: navigator is not defined

@avelad
Copy link
Collaborator Author

@avelad avelad commented on b1e5063 Jan 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok! I'll revert it

Please sign in to comment.