Closed
Bug 1057171
Opened 10 years ago
Closed 10 years ago
[EME] Implement MediaKeySession.getUsableKeyIds
Categories
(Core :: Audio/Video, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: cpearce, Assigned: cpearce)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
5.13 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → cpearce
Assignee | ||
Comment 1•10 years ago
|
||
Implement MediaKeySession.getUsableKeyIds().
Attachment #8478083 -
Flags: review?(bzbarsky)
Comment 2•10 years ago
|
||
Comment on attachment 8478083 [details] [diff] [review] Patch >+ if (!ToJSValue(cx, keyIds, &array)) { You shouldn't need this. This should work fine for the behavior your code has right now: promise->MaybeResolve(keyIds); (which will under the hood do the ToJSValue, reject if that fails, etc). Note that you also won't need cx in that case. >+ Promise<sequence<ArrayBuffer>> getUsableKeyIds(); That said, if you want the behavior this IDL describes, you need something different. keyIds is an nsTArray<nsTArray<uint8_t>>. Calling ToJSValue on it will produce an array of arrays of numbers, not an array of arraybuffers. So if you want the latter you need to do the conversion more carefully: first construct an nsTArray<TypedArrayCreator<ArrayBuffer>> whose elements are pointing to the elements of keyIds, then resolve the promise with _that_. And clearly this needs a test to make sure the right sort of thing is returned.
Attachment #8478083 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 3•10 years ago
|
||
I updated the patch to use nsTArray<TypedArrayCreator<ArrayBuffer>>. I have tested this with my example EME GMP, so I know this is working. But yes, we absolutely do need an automated test here. Edwin is working on our ClearKey CDM implementation which we will use for most EME testing in bug 1044742. ClearKey is specified to support this API, so we'll be testing it with that GMP.
Attachment #8478083 -
Attachment is obsolete: true
Attachment #8479454 -
Flags: review?(bzbarsky)
Comment 4•10 years ago
|
||
Comment on attachment 8479454 [details] [diff] [review] Patch v2 r=me. Looks great!
Attachment #8479454 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 5•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f73be78d1cca
https://hg.mozilla.org/mozilla-central/rev/f73be78d1cca
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•10 years ago
|
Keywords: dev-doc-needed
Assignee | ||
Comment 7•9 years ago
|
||
Mass update firefox-status to track EME uplift.
You need to log in
before you can comment on or make changes to this bug.
Description
•