JSFiddle - React, Tailwind, and code Playground
by jbalsas
HTML
<audio src="http://tonycuffe.com/mp3/tailtoddle_lo.mp3" id="player"></audio>
<button id="play">Play</button>
<button id="pause">Pause</button>
<progress id="seekbar" value="0" max="1" style="width:400px;"></progress>
JavaScript
$('#play').on('click', function() {
document.getElementById('player').play();
});
$('#pause').on('click', function() {
document.getElementById('player').pause();
});
$('#player').on('timeupdate', function() {
$('#seekbar').attr("value", this.currentTime / this.duration);
});