From 5b5b2ce1746ea888e163dddb3d36125f03100102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Velad=20Galv=C3=A1n?= Date: Mon, 8 Jan 2024 19:07:59 +0100 Subject: [PATCH] fix: Install by default shaka.polyfill.PatchedMediaKeysApple when there is no unprefixed EME support (#6053) --- lib/polyfill/patchedmediakeys_apple.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/polyfill/patchedmediakeys_apple.js b/lib/polyfill/patchedmediakeys_apple.js index f0387a248f..11c262e7b5 100644 --- a/lib/polyfill/patchedmediakeys_apple.js +++ b/lib/polyfill/patchedmediakeys_apple.js @@ -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); +}