diff --git a/lib/polyfill/encryption_scheme.js b/lib/polyfill/encryption_scheme.js index 60b8f38d30..f9826693a0 100644 --- a/lib/polyfill/encryption_scheme.js +++ b/lib/polyfill/encryption_scheme.js @@ -7,6 +7,7 @@ goog.provide('shaka.polyfill.EncryptionScheme'); goog.require('shaka.polyfill'); +goog.require('shaka.util.Platform'); /** * @summary A polyfill to add support for EncryptionScheme queries in EME. @@ -23,6 +24,14 @@ shaka.polyfill.EncryptionScheme = class { * @export */ static install() { + // Skip polyfill for PlayStation 4 and SkyQ devices due to known crashes + // caused by unsupported encryptionScheme handling. These platforms do not + // require the polyfill, and forcing encryptionScheme processing can result + // in playback crashes. + if (shaka.util.Platform.isPS4() || shaka.util.Platform.isSkyQ()) { + return; + } + EncryptionSchemePolyfills.install(); } }; diff --git a/lib/util/platform.js b/lib/util/platform.js index 0024e7baa7..4ebce7d4aa 100644 --- a/lib/util/platform.js +++ b/lib/util/platform.js @@ -346,6 +346,13 @@ shaka.util.Platform = class { return shaka.util.Platform.userAgentContains_('SOPOpenBrowser'); } + /** + * Check if the current platform is SkyQ STB. + */ + static isSkyQ() { + return shaka.util.Platform.userAgentContains_('Sky_STB'); + } + /** * Check if the current platform is Amazon Fire TV. * https://developer.amazon.com/docs/fire-tv/identify-amazon-fire-tv-devices.html