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

And the user probably will not visit the page ever again, just as a page
with bgsound.  But that is up to the designer & developer of course.

Sorry for wasting your time, I just could not resist.



-----Original Message-----
From: whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces at lists.whatwg.org] On Behalf Of Robert O'Callahan
Sent: Saturday, October 20, 2007 1:32 AM
To: Jonas Sicking
Cc: Maciej Stachowiak; whatwg
Subject: Re: [whatwg] When to stop <video> elements from playing


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
-- tearing down the owner document always stops the element playing (so
navigating away from the page always stops sound)

myAudio = new Audio("foo.wav");
myAudio.onload = function () { 
  myAudio = null;
will work, and will play until the sound ends or the user leaves the page.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20071020/c6307a06/attachment.htm>

Received on Friday, 19 October 2007 23:17:22 UTC