-
Notifications
You must be signed in to change notification settings - Fork 72
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
fix: use in-spec EME for versions of Safari which support it #142
Conversation
src/eme.js
Outdated
if (getContentId) { | ||
sessionData.getContentId = getContentId; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the initData
shouldn't change, we may be better off getting the contentId
early and potentially saving that to the session data instead of passing the function around and saving it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem like maybe we should save it, but I'm not sure if I want to bother untangling it right now.
@brandonocasey did you have thoughts on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will work on it, I think it might be easy enough to do.
src/eme.js
Outdated
@@ -463,7 +451,7 @@ export const standard5July2016 = ({ | |||
); | |||
|
|||
getLicenseFn = promisifyGetLicense(keySystem, getLicense, eventBus); | |||
getContentIdFn = getContentId; | |||
contentId = getContentId ? getContentId(initData) : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll also have to do it above in addPendingSessions
. It might be worth trying to do it in standardizeKeySystemOptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it makes sense at that point, We now do it in the just before addSession
src/fairplay.js
Outdated
@@ -128,7 +128,7 @@ export const defaultGetCertificate = (fairplayOptions) => { | |||
}; | |||
}; | |||
|
|||
export const defaultGetContentId = (emeOptions, initData) => { | |||
export const defaultGetContentId = (initData) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically getContentId
is an exposed API (from the README), and emeOptions
should be passed in case someone passes a custom getContentId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, we can't change this method signature or it'll be a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified latest changes locally.
Closes #87