diff --git a/lib/polyfill/media_capabilities.js b/lib/polyfill/media_capabilities.js index 537cc982f6..c6a17423e0 100644 --- a/lib/polyfill/media_capabilities.js +++ b/lib/polyfill/media_capabilities.js @@ -39,6 +39,7 @@ shaka.polyfill.MediaCapabilities = class { // Browsers. if (!shaka.util.Platform.isChromecast() && !shaka.util.Platform.isApple() && + !shaka.util.Platform.isPS4() && !shaka.util.Platform.isPS5() && navigator.mediaCapabilities) { shaka.log.info( diff --git a/lib/util/platform.js b/lib/util/platform.js index 2f2003d5e4..33892816d4 100644 --- a/lib/util/platform.js +++ b/lib/util/platform.js @@ -188,7 +188,8 @@ shaka.util.Platform = class { static isApple() { return !!navigator.vendor && navigator.vendor.includes('Apple') && !shaka.util.Platform.isTizen() && - !shaka.util.Platform.isEOS(); + !shaka.util.Platform.isEOS() && + !shaka.util.Platform.isPS4(); } /** @@ -204,6 +205,13 @@ shaka.util.Platform = class { return shaka.util.Platform.userAgentContains_('PlayStation 5'); } + /** + * Check if the current platform is Playstation 4. + */ + static isPS4() { + return shaka.util.Platform.userAgentContains_('PlayStation 4'); + } + /** * Returns a major version number for Safari, or Safari-based iOS browsers. *