This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
https://html.spec.whatwg.org/#event-mediacontroller-emptied The following events fire on MediaController objects: ... emptied - All the slaved media elements newly have readyState set to HAVE_NOTHING or greater, or there are no longer any slaved media elements. ... Seems out of whack with the same named event on MediaElement objects: ... emptied - A media element whose networkState was previously not in the NETWORK_EMPTY state has just switched to that state (either because of a fatal error during load that's about to be reported, or because the load() method was invoked while the resource selection algorithm was already running). networkState is NETWORK_EMPTY; all the IDL attributes are in their initial states. ... Shouldn't emptied be about NETWORK_EMPTY? At least it should not include any readyState greater than HAVE_NOTHING.
Are you asking if the non-normative text you quote is accurate, or are you asking if the normative text corresponding to the non-normative text you quote should be changed? If the former, it seems accurate to me. If the latter, what proposed changes to the normative text did you have in mind?
The former - the latter is accurate FAIK. I think that at least one media element needs to newly have a readyState set to HAVE_NOTHING to raise this event. Instead, the current description implies to raise a emptied event also every time all slaved media elements newly have a readyState set to something greater than HAVE_NOTHING.
Can you walk me through your reading of the spec that leads you to conclude that the HAVE_* states are relevant to when a MediaController fires 'emptied'? Or are you the description of the event as a description of the proximate cause of the event firing? It's not a description of the cause of it firing, it's a description of the state of the world when it fires. "When the engine light comes on, the engine needs examining" doesn't mean "when the engine needs examining, the engine light comes on".
Here's what I think the MediaController's "emptied" event description at https://html.spec.whatwg.org/#event-mediacontroller-emptied should say: ... emptied - At least one of the slaved media elements newly has readyState set to HAVE_NOTHING, or there are no longer any slaved media elements. ... Alternatively, it could also be defined as: ... emptied - At least one of the slaved media elements whose networkState was previously not in the NETWORK_EMPTY state has just switched to that state, or there are no longer any slaved media elements. ... Here's my reading of the spec that confirms this: https://html.spec.whatwg.org/#most-recently-reported-readiness-state Let all slaved media elements have a readyState of "HAVE_METADATA". Call load() on one slaved media element (https://html.spec.whatwg.org/#dom-media-load), which raises an emptied event and sets the element's readyState to "HAVE_NOTHING". This in turn requires reporting the controller state for the media element's current media controller (https://html.spec.whatwg.org/#ready-states). Calculating the new readiness state of the MediaController (https://html.spec.whatwg.org/#report-the-controller-state) says to take "the lowest value of the readyState IDL attributes of all of its slaved media elements", which is 0. And further: "if the MediaController's most recently reported readiness state is greater than new readiness state then queue a task to fire a simple event at the MediaController object, whose name is the event name corresponding to the value of new readiness state given in the table below." Thus: a emptied event is raised at the MediaController.
Silvia, would you be interested in providing a PR at https://github.com/whatwg/html for this improvement?
Won't fix, see https://github.com/whatwg/html/issues/192