Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
var audio = new Audio("http://upload.wikimedia.org/wikipedia/commons/a/a9/Tromboon-sample.ogg"); 
audio.addEventListener("timeupdate", function() {
    var duration = document.getElementById('duration');
    var s = parseInt(audio.currentTime % 60);
    var m = parseInt((audio.currentTime / 60) % 60);
     duration.innerHTML = m + ':' + s ;
}, false); 
Output 300px

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers