W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2007

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

From: Jonas Sicking <jonas@sicking.cc>
Date: Mon, 29 Oct 2007 18:58:00 -0700
Message-ID: <47268FA8.4040100@sicking.cc>
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

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:37 UTC