Play sound in a loop


#1

I have this peace of code that works fine but dont do the loop in ionic angular im new in this can anyone help me please.

var a = new Audio();
if (a.canPlayType(“audio/ogg”)){
a.src = “sound/backs.ogg”;
loop = true;
a.play();

}