[whatwg] When to stop <video> elements from playing

Ian Hickson wrote:
>> First of all, that'll mean that calling .play() on a 
>> in-non-active-document element will silently fail. It'd probably be 
>> better to throw an exception.
> If it throws an exception, how do you switch it to the "play" mode? You 
> might well want to do this, e.g. if it is possible the document in 
> question will once against become an active document.
>> It's also something that's easier to miss for an implementor. Might be a 
>> good idea to put it in the steps for play() and change the 
>> removed-from-document paragraph to say:
>> When a media element is removed from a Document, or the .ownerDocument 
>> stops being an active document, the user agent must act as if the 
>> pause() method had been invoked.
> But that makes it possible to have the problem you mentioned, with 
> elements that never stop playing.

What I meant was to make play() throw if .ownerDocument isn't active, 
and make elements pause() when the .owernDocument goes inactive. In that 
case it shouldn't be possible to never stop playing.

I agree that it might be desirable to put the <video> in play-mode 
without actually starting to play it, so the current text looks fine.

/ Jonas

Received on Monday, 29 October 2007 18:58:00 UTC