<html>
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-2">
<meta name=Generator content="Microsoft Word 10 (filtered)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.StylWiadomociEmail17
{font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=PL link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>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.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Sorry for wasting your
time, I just could not resist.</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'>Chris</span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-US
style='font-size:10.0pt;font-family:Arial;color:navy'> </span></font></p>
<p class=MsoNormal style='margin-left:35.4pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> whatwg-bounces@lists.whatwg.org
[mailto:whatwg-bounces@lists.whatwg.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>Robert O'Callahan<br>
<b><span style='font-weight:bold'>Sent:</span></b> Saturday, October 20, 2007
1:32 AM<br>
<b><span style='font-weight:bold'>To:</span></b> Jonas Sicking<br>
<b><span style='font-weight:bold'>Cc:</span></b> Maciej Stachowiak; whatwg<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [whatwg] When to stop
<video> elements from playing</span></font></p>
<p class=MsoNormal style='margin-left:35.4pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>
<p class=MsoNormal style='margin-left:35.4pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>After some discussion on
IRC, I think Jonas, Hixie and I agreed that we're OK with the following
approach:<br>
-- sound is produced for display:none elements and elements not in the DOM<br>
-- removing an element from the DOM automatically calls stop() on that element <br>
-- tearing down the owner document always stops the element playing (so
navigating away from the page always stops sound)<br clear=all>
<br>
Therefore<br>
myAudio = new Audio("foo.wav");<br>
myAudio.onload = function () { <br>
this.play();<br>
myAudio = null;<br>
}<br>
will work, and will play until the sound ends or the user leaves the page.<br>
<br>
Rob<br>
</span></font></p>
</div>
</body>
</html>