  window.onload=function(){
  var audio = document.getElementsByTagName('audio')[0],
    span = document.getElementById('timeInfo');
 
function formatTime(s, m, h) {
    s = Math.floor( s );    
    m = Math.floor( s / 60 );
    h = Math.floor( m / 60 );
    m = Math.floor( m % 60 );
    s = Math.floor( s % 60 );
    s = s >= 10 ? s : '0' + s;
    m = m >= 10 ? m : '0' + m;
    h = h >= 10 ? h : '0' + h;
    return h + ':' + m + ':' + s;
}
 
setInterval(function() {
    span.textContent = formatTime(audio.duration);
}, 100);
 
  }
