Some DRM providers require default KID in wrapped license requests#529
Some DRM providers require default KID in wrapped license requests#529joeyparrish merged 9 commits intoshaka-project:masterfrom
Conversation
…that a default KID is provided in the wrapped license request
joeyparrish
left a comment
There was a problem hiding this comment.
I left some feedback on your design. Are you using player.drmInfo() to get the new information into your filter?
AUTHORS
Outdated
| 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.
Please keep this list alphabetized.
CONTRIBUTORS
Outdated
| 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.
Please keep this list alphabetized.
lib/media/drm_engine.js
Outdated
| }); | ||
| } | ||
|
|
||
| if (drmInfo.defaultKeyID) { |
There was a problem hiding this comment.
This is inconsistent with other places where you called it defaultKID, but as mentioned earlier, please rename to keyIds.
externs/shaka/manifest.js
Outdated
| * serverCertificate: Uint8Array, | ||
| * initData: Array.<!shakaExtern.InitDataOverride> | ||
| * initData: Array.<!shakaExtern.InitDataOverride>, | ||
| * defaultKID: ?string |
There was a problem hiding this comment.
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 |
joeyparrish
left a comment
There was a problem hiding this comment.
Just one more change, please. The rest looks good.
lib/media/drm_engine.js
Outdated
| * @param {!Array.<string>} licenseServers | ||
| * @param {!Array.<!Uint8Array>} serverCerts | ||
| * @param {!Array.<!shakaExtern.InitDataOverride>} initDatas | ||
| * @param {!Array.<string>} defaultKeys |
There was a problem hiding this comment.
For consistency, let's give this the same name as the structure member: keyIds.
lib/media/drm_engine.js
Outdated
| var initDatas = []; | ||
|
|
||
| this.processDrmInfos_(drmInfos, licenseServers, serverCerts, initDatas); | ||
| /** @type {!Array.<!string>} */ |
There was a problem hiding this comment.
strings are non-nullable by default, so you can just say !Array.<string>
|
No probs, fixed that last thing now |
joeyparrish
left a comment
There was a problem hiding this comment.
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