Skip to content

Commit d678cb7

Browse files
committed
fix: check for legacy Fairplay support when switching out of handleEncryptedEvent
1 parent 8ff4276 commit d678cb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export function handleEncryptedEvent(player, event, options, sessions, eventBus,
5959
// Legacy fairplay is the keysystem 'com.apple.fps.1_0'.
6060
// If we are using this keysystem we want to use WebkitMediaKeys.
6161
// This can be initialized manually with initLegacyFairplay().
62-
if (options.keySystems[LEGACY_FAIRPLAY_KEY_SYSTEM]) {
62+
if (options.keySystems[LEGACY_FAIRPLAY_KEY_SYSTEM] && window.WebKitMediaKeys) {
6363
videojs.log.debug('eme', `Ignoring \'encrypted\' event, using legacy fairplay keySystem ${LEGACY_FAIRPLAY_KEY_SYSTEM}`);
6464
return Promise.resolve();
6565
}

0 commit comments

Comments
 (0)