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

Robert O'Callahan wrote:
> After some discussion on IRC, I think Jonas, Hixie and I agreed that 
> we're OK with the following approach:
> -- sound is produced for display:none elements and elements not in the DOM
> -- removing an element from the DOM automatically calls stop() on that 
> element

Actually, shouldn't that be pause()? Might be good to retain the 
position in case you want to insert the element elsewhere and resume it.

> -- tearing down the owner document always stops the element playing (so 
> navigating away from the page always stops sound)

This shouldn't be "tearing down", but rather "leaving", right? A 
document can stay alive long after the user has navigated away from it 
since other frames can be holding it alive.

This also brings up the point of what should happen for <video> elements 
living in documents created through XMLHttpRequest. Currently firefox 
doesn't do any network loads, not even for images, from such documents. 
I would argue that that should be the case here too.

/ Jonas

Received on Friday, 19 October 2007 17:36:51 UTC