Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add com.microsoft.playready.recommendation as a recognised key system #171

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/eme.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ const standardizeKeySystemOptions = (keySystem, keySystemOptions) => {
}

const isFairplay = isFairplayKeySystem(keySystem);
const isPlayready = keySystem === 'com.microsoft.playready' || keySystem === 'com.microsoft.playready.recommendation';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include the recommendation.3000 variant as well?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in this state. It should be something like:

const isPlayready = [
    'com.microsoft.playready',
    'com.microsoft.playready.recommendation',
    'com.microsoft.playready.recommendation.3000'
    ].includes(keySystem)'

or a little bit less safe keySyste.startsWith('com.microsoft.playready') for .3000 to work. I wanted to add that up but I never got to that.


if (isFairplay && keySystemOptions.certificateUri && !keySystemOptions.getCertificate) {
keySystemOptions.getCertificate = defaultFairplayGetCertificate(keySystemOptions);
Expand All @@ -362,7 +363,7 @@ const standardizeKeySystemOptions = (keySystem, keySystemOptions) => {
}

if (keySystemOptions.url && !keySystemOptions.getLicense) {
if (keySystem === 'com.microsoft.playready') {
if (isPlayready) {
keySystemOptions.getLicense = defaultPlayreadyGetLicense(keySystemOptions);
} else if (isFairplay) {
keySystemOptions.getLicense = defaultFairplayGetLicense(keySystemOptions);
Expand Down