W3C home > Mailing lists > Public > whatwg@whatwg.org > January 2012

[whatwg] HTML Audio Element removal from DOM

From: Michael A. Puls II <shadow2531@gmail.com>
Date: Wed, 18 Jan 2012 02:20:43 -0500
Message-ID: <op.v79qot0r1ejg13@vertiform346>
On Wed, 18 Jan 2012 00:58:11 -0500, Charles Pritchard <chuck at jumis.com>  
wrote:

> The issue I'm having with webkit is with running play() immediately  
> after removeChild. Are you hearing an audible pause when doing so in  
> Opera and FF? I believe there should be no audible pause even though  
> there is an event pause and a loop/queue cycle.

In that situation (shown below), I hear a very quick blip in both Opera  
and Chrome. In Firefox, I don't. In Firefox, it's completely seamless (as  
good as if it were never paused).

<!DOCTYPE html>
<html lang="en">
     <head>
         <meta charset="utf-8">
         <title></title>
         <script>
             window.addEventListener("DOMContentLoaded", function() {
                 var player = document.getElementsByTagName("audio")[0];
                 setTimeout(function() {
                     player = document.body.removeChild(player);
                     player.play();
                 }, 7000);
             }, false);
         </script>
     </head>
     <body>
         <audio controls autoplay src="test.oga"></audio>
     </body>
</html>

-- 
Michael
Received on Tuesday, 17 January 2012 23:20:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:10 UTC