[Bug 12559] <video> Make paused true at playback end


Ian 'Hixie' Hickson <ian@hixie.ch> changed:

           What    |Removed                     |Added
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #12 from Ian 'Hixie' Hickson <ian@hixie.ch> 2011-09-22 22:28:51 UTC ---
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the tracker issue; or you may create a tracker issue
yourself, if you are able to do so. For more details, see this document:

Status: Partially Accepted
Change Description: see diff given below

Ok I did this but it ended up being a bit different than what I'd described

* I made the changing of the 'ended' attribute synchronous with the firing of
the asynchronous 'ended' event, so it can no longer happen in the middle of a
script running.

* A standalone media element, when it reaches its end going forwards, if it
isn't looping, now pauses automatically. The sequence of events is .ended
becomes true, timeupdate fires, .paused becomes true and pause fires, and
finally ended fires.

* A slaved media element never pauses when it reaches its end, because
otherwise it would desync with its controller. The controller, however, does
the same 'pause' dance as a standalone media element; when the last slave ends,
that media element's .ended becomes true, timeupdate fires on it, ended fires
on it, then the media controller pauses and pause fires, then ended fires.

* I haven't done anything to make slaved media elements automatically pause
when they are unslaved, so it's still possible to have a media element that is
ended and not paused. This is necessary because otherwise when you move an
element from one slave to another while it's ended, you'd always have to
unpause it again, which would be crazy.

* Because all this is async rather than happening when the playback actually
ends, we have to deal with hostile scripts changing the state out from under
us. See the spec for the precise details, but basically the pausing only
happens if nothing has screwed around with the media element in the meantime
(hopefully I didn't miss any important cases... testing this is going to be

(In reply to comment #11)
> > > 
> > > controller.paused
> > >     Returns true if playback is paused; false otherwise. When this attribute is
> > > true, any media element slaved to this controller will be stopped.
> > 
> > Please ignore the non-normative text. It's only useful for people who just want
> > a quick introduction and don't need to know the details. You don't qualify for
> > that. :-)
> Still needs to be accurate since we don't want to confuse those after a quick
> answer either.

It's accurate, as far as I can tell. It just tells you what happens, not what
to implement.

> > > Does "any" in this sentence mean "all"?
> > 
> > They would both mean the same thing in that context, no?
> I am not a native English speaker, but my reading of "any out of a group" is
> that it means a single one out of the group - which one doesn't matter. I'd
> prefer we use the word "every" in this sentence instead if that's what is
> meant.

If we used "all" or "every" we'd have to also say "if any" to handle the case
where there are none.

"Any" is the right word here. It doesn't mean "one", it means "whichever of
these that exist".

> > For the last comment in comment 6 I meant when playing backwards.
> I see. I'd say it should also go into paused state. Since grouped elements
> started at the same time, that shouldn't cause the same kinds of problems as
> the different length.

I haven't made anything pause when going backwards. It also doesn't fire the
ended event or indeed set .ended to true, either on the media element or the

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Thursday, 22 September 2011 22:28:59 UTC