diff --git a/README.md b/README.md index 7808093..af8c3b6 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,13 @@ Tiny MSE video and audio DRM detection library. The package exports the following asynchronous methods: -> isPlayreadySupported +> isPlayreadyLegacySupported > > isPlayreadyChromecastSupported > -> isPlayreadyRecommendedSupported +> isPlayreadySupported +> +> isPlayreadyHardwareSupported > > isWidevineSupported > diff --git a/src/index.ts b/src/index.ts index 3f047b5..4d1967c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,22 +36,30 @@ const isMediaKeySupported = async (keySystem: TKeySystem): Promise => { } }; -export const isPlayreadySupported = async (): Promise => { +export const isPlayreadyLegacySupported = async (): Promise => { if (!navigator.requestMediaKeySystemAccess) return false; return isMediaKeySupported({ ks: "com.microsoft.playready" }); }; -export const isPlayreadyChromecastSupported = async (): Promise => { +export const isPlayreadySupported = async (): Promise => { if (!navigator.requestMediaKeySystemAccess) return false; - return isMediaKeySupported({ ks: "com.chromecast.playready" }); + return isMediaKeySupported({ ks: "com.microsoft.playready.recommendation" }); +}; + +export const isPlayreadyHardwareSupported = async (): Promise => { + if (!navigator.requestMediaKeySystemAccess) return false; + + return isMediaKeySupported({ + ks: "com.microsoft.playready.recommendation.3000", + }); }; -export const isPlayreadyRecommendedSupported = async (): Promise => { +export const isPlayreadyChromecastSupported = async (): Promise => { if (!navigator.requestMediaKeySystemAccess) return false; - return isMediaKeySupported({ ks: "com.microsoft.playready.recommended" }); + return isMediaKeySupported({ ks: "com.chromecast.playready" }); }; export const isWidevineSupported = async (): Promise => {