Closed
Bug 1304250
Opened 8 years ago
Closed 8 years ago
[EME] Implement MediaKeySession.onmessage
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: cpearce, Unassigned)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
This Web Platform test is failing because we don't implement MediaKeySession.onmessage:
https://w3c-test.org/encrypted-media/idlharness.html
Should be an easy fix.
Reporter | ||
Comment 1•8 years ago
|
||
Comment hidden (mozreview-request) |
Comment 3•8 years ago
|
||
mozreview-review |
Comment on attachment 8793150 [details]
Bug 1304250 - Implement MediaKeySession.onmessage.
https://reviewboard.mozilla.org/r/79942/#review78764
comments fixed, r+
::: dom/media/eme/MediaKeySession.cpp:509
(Diff revision 1)
> +MediaKeySession::GetOnmessage()
> +{
> + EventListenerManager *elm = GetExistingListenerManager();
> + return elm ? elm->GetEventHandler(nsGkAtoms::onmessage, EmptyString())
> + : nullptr;
> +}
You could just have
return GetEventHandler(nsGkAtoms::onmessage, EmptyString());
::: dom/media/eme/MediaKeySession.cpp:512
(Diff revision 1)
> + return elm ? elm->GetEventHandler(nsGkAtoms::onmessage, EmptyString())
> + : nullptr;
> +}
> +
> +void
> +MediaKeySession::SetOnmessage(EventHandlerNonNull* handler)
aHandler or aCallback
::: dom/media/eme/MediaKeySession.cpp:518
(Diff revision 1)
> +{
> + EventListenerManager *elm = GetOrCreateListenerManager();
> + if (elm) {
> + elm->SetEventHandler(nsGkAtoms::onmessage, EmptyString(), handler);
> + }
> +}
You could just have
SetEventHandler(nsGkAtoms::onmessage, EmptyString(), aCallback);
::: dom/media/test/test_eme_playback.html:157
(Diff revision 1)
> is(session.numKeystatuseschangeEvents, session.numOnkeystatuseschangeEvents,
> TimeStamp(token) + " should get as many keystatuseschange as onkeystatuseschange");
> +
> + ok(session.numMessageEvents > 0, TimeStamp(token) + " should get message events");
> + is(session.numMessageEvents, session.numOnMessageEvents,
> + TimeStamp(token) + " should get as many message as onmessage events");
well, technically the events are 'message' events, never with on-prefix. So
"Should have as many event listener calls as event handler calls."
Attachment #8793150 -
Flags: review?(bugs) → review+
Reporter | ||
Comment 4•8 years ago
|
||
Reporter | ||
Comment 5•8 years ago
|
||
Reporter | ||
Comment 6•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/575aef952d535bf66d088cdb4e9745b0037fcea5
Bug 1304250 - Implement MediaKeySession.onmessage. r=smaug
Comment 7•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Comment 8•8 years ago
|
||
bugherder |
You need to log in
before you can comment on or make changes to this bug.
Description
•