W3C home > Mailing lists > Public > public-html@w3.org > January 2011

Re: Lifetime of new Audio()

From: Chris Double <cdouble@mozilla.com>
Date: Mon, 31 Jan 2011 17:37:23 +1300
Message-ID: <AANLkTikQ_ws09X72j9TDG-0B54WLExMahw0BHUKwc1u-@mail.gmail.com>
To: Adrian Bateman <adrianba@microsoft.com>
Cc: "HTML WG (public-html@w3.org)" <public-html@w3.org>
On Mon, Jan 31, 2011 at 2:52 PM, Adrian Bateman <adrianba@microsoft.com> wrote:
> Ignoring for now the timing issue of how quickly the play() actually has enough content to start playing, after the function returns there is no reference to the Audio object. Is the fact that the object is playing enough to pin it in memory? Otherwise the GC could collect the object and stop the playing. I scanned the media section of the spec but couldn't see where it defines this behaviour one way or the other.

This is mentioned in the media section immediately after talking about
'playback rate'

"Media elements that are potentially playing while not in a Document
must not play any video, but should play any audio component. Media
elements must not stop playing just because all references to them
have been removed; only once a media element to which no references
exist has reached a point where no further audio remains to be played
for that element (e.g. because the element is paused, or because the
end of the clip has been reached, or because its playbackRate is 0.0)
may the element be garbage collected."

Received on Monday, 31 January 2011 04:48:22 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:08 UTC