xxxxxxxxxx
You have the loop property:
audioElement.loop=true;
But some browsers do not support well the loop property, you can add an event listener like this:
audioElement.addEventListener('ended', function() {
this.currentTime = 0;
this.play();
}, false);
xxxxxxxxxx
audioElement.addEventListener('ended', function() {
this.currentTime = 0;
this.play();
}, false);