Closed
Bug 1304247
Opened 8 years ago
Closed 8 years ago
[EME] Implement HTMLMediaElement.onwaitingforkeys
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: cpearce, Assigned: cpearce)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
This Web Platform test is failing because we don't implement HTMLMediaElement.onwaitingforkeys:
https://w3c-test.org/encrypted-media/idlharness.html
Should be an easy fix.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
The specification is here:
https://w3c.github.io/encrypted-media/#dom-htmlmediaelement-onwaitingforkey
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8793132 [details]
Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys.
https://reviewboard.mozilla.org/r/79910/#review78770
::: dom/html/HTMLMediaElement.cpp:6244
(Diff revision 1)
> + return elm ? elm->GetEventHandler(nsGkAtoms::onwaitingforkey, EmptyString())
> + : nullptr;
> +}
> +
> +void
> +HTMLMediaElement::SetOnwaitingforkey(EventHandlerNonNull* handler)
arguments should be in form aFoo, not foo
::: dom/html/HTMLMediaElement.cpp:6251
(Diff revision 1)
> + EventListenerManager *elm = GetOrCreateListenerManager();
> + if (elm) {
> + elm->SetEventHandler(nsGkAtoms::onwaitingforkey, EmptyString(), handler);
> + }
> +}
> +
Also here Get/SetEventHandler
::: dom/media/test/test_eme_waitingforkey.html:89
(Diff revision 1)
> ok(true, TimeStamp(token) + " got ended event");
> // We expect only one waitingForKey as we delay until all sessions are ready.
> // I.e. one waitingForKey should be fired, after which, we process all sessions,
> // so it should not be possible to be blocked by a key after that point.
> ok(gotWaitingForKey == 1, "Expected number 1 wait, got: " + gotWaitingForKey);
> + ok(gotOnwaitingforkey == gotWaitingForKey, "Expected as many onwaitingforkey as waitingforkey events, got: " + gotOnwaitingforkey);
nit, the same event, but listener vs. handler
Attachment #8793132 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•8 years ago
|
||
(In reply to Olli Pettay [:smaug] (TPAC) from comment #3)
> Comment on attachment 8793132 [details]
> Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys.
>
> ::: dom/html/HTMLMediaElement.cpp:6251
> (Diff revision 1)
> > + EventListenerManager *elm = GetOrCreateListenerManager();
> > + if (elm) {
> > + elm->SetEventHandler(nsGkAtoms::onwaitingforkey, EmptyString(), handler);
> > + }
> > +}
> > +
>
> Also here Get/SetEventHandler
This worked fine for the MediaKeySession cases, but in the HTMLMediaElement.onwaitingforkeys case I had to explicitly prefix the {Get,Set}EventHandler calls with EventTarget::, as Element::SetEventHandler(nsIAtom* aEventName, const nsAString& aValue, bool aDefer) was being called by default, and that wasn't working.
Assignee | ||
Comment 5•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4b1df60211582858e656fecdc7356b7f4154bfcb
Bug 1304247 - Implement HTMLMediaElement.onwaitingforkeys. r=smaug
Comment 6•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment 7•8 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•