-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Some DRM providers require default KID in wrapped license requests #529
Conversation
…that a default KID is provided in the wrapped license request
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 left some feedback on your design. Are you using player.drmInfo() to get the new information into your filter?
@@ -31,3 +31,4 @@ SameGoal Inc. <*@samegoal.com> | |||
Sanborn Hilland <sanbornh@rogers.com> | |||
TalkTalk Plc <*@talktalkplc.com> | |||
uStudio Inc. <*@ustudio.com> | |||
Jonas Birmé <jonas.birme@eyevinn.se> |
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.
Please keep this list alphabetized.
@@ -48,3 +48,4 @@ Thomas Stephens <thomas@ustudio.com> | |||
Timothy Drews <tdrews@google.com> | |||
Vasanth Polipelli <vasanthap@google.com> | |||
Vignesh Venkatasubramanian <vigneshv@google.com> | |||
Jonas Birmé <jonas.birme@eyevinn.se> |
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.
Please keep this list alphabetized.
@@ -764,6 +778,10 @@ shaka.media.DrmEngine.prototype.processDrmInfos_ = | |||
} | |||
}); | |||
} | |||
|
|||
if (drmInfo.defaultKeyID) { |
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.
This is inconsistent with other places where you called it defaultKID, but as mentioned earlier, please rename to keyIds.
@@ -136,7 +136,8 @@ shakaExtern.InitDataOverride; | |||
* audioRobustness: string, | |||
* videoRobustness: string, | |||
* serverCertificate: Uint8Array, | |||
* initData: Array.<!shakaExtern.InitDataOverride> | |||
* initData: Array.<!shakaExtern.InitDataOverride>, | |||
* defaultKID: ?string |
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 can be (and best practice for content authoring dictates there should be) multiple key IDs in a single manifest. If you're going to go this route, this should be an array of strings (default empty list, not null), and it should be called keyIds.
Thank you for the feedback. I will correct these things |
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.
Just one more change, please. The rest looks good.
@@ -723,10 +740,11 @@ shaka.media.DrmEngine.prototype.createCurrentDrmInfo_ = function( | |||
* @param {!Array.<string>} licenseServers | |||
* @param {!Array.<!Uint8Array>} serverCerts | |||
* @param {!Array.<!shakaExtern.InitDataOverride>} initDatas | |||
* @param {!Array.<string>} defaultKeys |
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.
For consistency, let's give this the same name as the structure member: keyIds.
@@ -685,7 +697,11 @@ shaka.media.DrmEngine.prototype.createCurrentDrmInfo_ = function( | |||
/** @type {!Array.<!shakaExtern.InitDataOverride>} */ | |||
var initDatas = []; | |||
|
|||
this.processDrmInfos_(drmInfos, licenseServers, serverCerts, initDatas); | |||
/** @type {!Array.<!string>} */ |
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.
strings are non-nullable by default, so you can just say !Array.<string>
No probs, fixed that last thing now |
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.
Looks good. I'll run it through the build bot to test it.
Testing in progress... |
Failure:
|
Looks like you'll need to update the tests to match. You can run the tests for yourself with |
Chrome 53.0.2785 (Mac OS X 10.10.5): Executed 891 of 927 (skipped 36) SUCCESS (6 mins 11.643 secs / 7 mins 27.425 secs) |
Testing in progress... |
Failure:
|
Sorry, thought I did a lint check before pushing. Will fix |
Testing in progress... |
All tests passed! |
Suggested fix for #528