1myAudio = new Audio('someSound.ogg');
2if (typeof myAudio.loop == 'boolean')
3{
4 myAudio.loop = true;
5}
6else
7{
8 myAudio.addEventListener('ended', function() {
9 this.currentTime = 0;
10 this.play();
11 }, false);
12}
13myAudio.play();