HTML audio Element how to replay?
The html5 audio element has a loop attribute set it to loop=loop
http://www.w3schools.com/html5/html5_audio.asp
please read this
http://www.position-absolute.com/articles/introduction-to-the-html5-audio-tag-javascript-manipulation/
and for replay event
you can set option, on replay click
audioElement.currentTime=0;
audioElement.play();
The suggestions above did not worked for me or where not applicable. I needed to replay sound when my code needed to do it.
The following code worked (at least chrome):
audioElement.setAttribute('src', audioSrc); audioElement.play();
in other words, setting the src attribute again, then play() did the job