@@ -1947,17 +1947,47 @@ shaka.media.DrmEngine = class {
19471947 support . set ( keySystem , null ) ;
19481948 }
19491949
1950+ const checkKeySystem = ( keySystem ) => {
1951+ // Our Polyfill will reject anything apart com.apple.fps key systems.
1952+ // It seems the Safari modern EME API will allow to request a
1953+ // MediaKeySystemAccess for the ClearKey CDM, create and update a key
1954+ // session but playback will never start
1955+ // Safari bug: https://bugs.webkit.org/show_bug.cgi?id=231006
1956+ if ( shaka . util . DrmUtils . isClearKeySystem ( keySystem ) &&
1957+ shaka . util . Platform . isSafari ( ) ) {
1958+ return false ;
1959+ }
1960+ // FairPlay is a proprietary DRM from Apple and will never work on
1961+ // Windows.
1962+ if ( shaka . util . DrmUtils . isFairPlayKeySystem ( keySystem ) &&
1963+ shaka . util . Platform . isWindows ( ) ) {
1964+ return false ;
1965+ }
1966+ // PlayReady is a proprietary DRM from Microsoft and will never work on
1967+ // Apple platforms
1968+ if ( shaka . util . DrmUtils . isPlayReadyKeySystem ( keySystem ) &&
1969+ ( shaka . util . Platform . isMac ( ) || shaka . util . Platform . isApple ( ) ) ) {
1970+ return false ;
1971+ }
1972+ // Mozilla has no intention of supporting PlayReady according to
1973+ // comments posted on Bugzilla.
1974+ if ( shaka . util . DrmUtils . isPlayReadyKeySystem ( keySystem ) &&
1975+ shaka . util . Platform . isFirefox ( ) ) {
1976+ return false ;
1977+ }
1978+ // We are sure that WisePlay is not supported on Windows or macOS.
1979+ if ( shaka . util . DrmUtils . isWisePlayKeySystem ( keySystem ) &&
1980+ ( shaka . util . Platform . isWindows ( ) || shaka . util . Platform . isMac ( ) ) ) {
1981+ return false ;
1982+ }
1983+ return true ;
1984+ } ;
1985+
19501986 // Test each key system and encryption scheme.
19511987 const tests = [ ] ;
19521988 for ( const encryptionScheme of testEncryptionSchemes ) {
19531989 for ( const keySystem of testKeySystems ) {
1954- // Our Polyfill will reject anything apart com.apple.fps key systems.
1955- // It seems the Safari modern EME API will allow to request a
1956- // MediaKeySystemAccess for the ClearKey CDM, create and update a key
1957- // session but playback will never start
1958- // Safari bug: https://bugs.webkit.org/show_bug.cgi?id=231006
1959- if ( keySystem === 'org.w3.clearkey' &&
1960- shaka . util . Platform . isSafari ( ) ) {
1990+ if ( ! checkKeySystem ( keySystem ) ) {
19611991 continue ;
19621992 }
19631993 tests . push ( testSystemEme ( keySystem , encryptionScheme , '' , '' ) ) ;
@@ -1967,6 +1997,9 @@ shaka.media.DrmEngine = class {
19671997
19681998 for ( const keySystem of testKeySystems ) {
19691999 for ( const robustness of ( testRobustness [ keySystem ] || [ ] ) ) {
2000+ if ( ! checkKeySystem ( keySystem ) ) {
2001+ continue ;
2002+ }
19702003 tests . push ( testSystemEme ( keySystem , null , robustness , '' ) ) ;
19712004 tests . push ( testSystemEme ( keySystem , null , '' , robustness ) ) ;
19722005 tests . push ( testSystemMcap ( keySystem , null , robustness , '' ) ) ;
0 commit comments