Implement attribute waitingforkey on audio/video elements
Categories
(Core :: DOM: Events, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: fredw, Assigned: fredw)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files)
See https://phabricator.services.mozilla.com/D225944#inline-1255920
We could rely on a flag EventNameType_HTMLMedia to handle the media-specific event handler attributes: onencrypted, onwaitingforkey (the later is not handled yet in the method, but not sure how to test that).
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
|
||
See callers to nsXMLContentSerializer::IsJavaScript.
| Assignee | ||
Comment 2•1 year ago
|
||
Use a flag EventNameType_HTMLMedia to represent event specific to the
media element.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
https://hg.mozilla.org/mozilla-central/rev/a0fa1e56a396
https://hg.mozilla.org/mozilla-central/rev/4c149b703e82
Comment 7•1 year ago
|
||
:fredw do you want to nominate this for a release note? (Process info)
| Assignee | ||
Comment 8•1 year ago
|
||
I think this is only a small attribute, so probably not worth putting in the release note. I also didn't send an intent to ship or put it under a flag.
Probably we need to update MDN/BCD, though.
Comment 9•1 year ago
•
|
||
MDN docs work for this can be tracked in https://github.com/mdn/content/issues/36558
To be clear, what does this deliver? My "guess" is that previously the HTMLMediaElement events waitingforkeys and encrypted were implemented and can be handled using addEventListener(), but the onXxx handlers on the media elements were not implemented - is that correct?
[It is also possible what this means is that the IDL was present but without implementation - so the two events appears are exposed but don't do anyting]
In other words, in browser compatibility data the earlier implementations of the events probably need to be modified to partial implementations and the full implementation only starts in FF133. Right?
| Assignee | ||
Comment 10•1 year ago
|
||
The IDL attributes were present for a while, this is covered by the following test:
https://searchfox.org/mozilla-central/rev/a4b08999304d15c1e3d30ad279a86924e1a54ade/testing/web-platform/tests/encrypted-media/idlharness.https.html (which uses https://searchfox.org/mozilla-central/rev/a4b08999304d15c1e3d30ad279a86924e1a54ade/testing/web-platform/tests/interfaces/encrypted-media.idl#100)
Support for the content attribute have been implemented in this bug, this is covered by the test I added:
https://searchfox.org/mozilla-central/rev/f8488adfb9c3e25a80ba6a21e04950d58165e956/testing/web-platform/tests/encrypted-media/media-element-event-handler-attributes.html
I actually didn't check whether the implementations of the two IDL attributes, but I assume they were already working since they have some tests:
https://searchfox.org/mozilla-central/search?q=onencrypted%7Conwaitingforkey&path=dom%2Fmedia%2Ftest%2F&case=false®exp=true
https://searchfox.org/mozilla-central/search?q=waitForEventAndRunStep%28%27waitingforkey&path=testing%2Fweb-platform%2Ftests%2Fencrypted-media&case=false®exp=false
https://searchfox.org/mozilla-central/search?q=waitForEventAndRunStep%28%27encrypted&path=testing%2Fweb-platform%2Ftests%2Fencrypted-media&case=false®exp=false
Comment 11•1 year ago
|
||
Sorry Fred, you'd think I'd know the terminology, but I haven't use the term "content attribute" vs "idl attribute" before. I infer it means an attribute you can apply to the tag itself in html, and that you mean that this fix means that you now support onwaitinggforkeys handlers applied to audio and video elements?
| Assignee | ||
Comment 12•1 year ago
•
|
||
Right, I meant a test like this was added in 2016:
https://searchfox.org/mozilla-central/rev/b477cd37e845005dac8881427fa06a2771d993db/dom/media/test/test_eme_waitingforkey.html#32 (idl attribute)
while I added a test like this in my patch:
https://searchfox.org/mozilla-central/rev/b477cd37e845005dac8881427fa06a2771d993db/testing/web-platform/tests/encrypted-media/media-element-event-handler-attributes.html#10 (content attribute).
Comment 13•1 year ago
•
|
||
Thanks! Should all be done now (compat data, mdn release note, and doc for the event (which includes event handler)
Updated•1 year ago
|
Description
•