[whatwg] HTML Audio Element removal from DOM

Michael A. Puls II shadow2531 at gmail.com
Tue Jan 17 23:20:43 PST 2012


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



More information about the whatwg mailing list