Javascript audio loop repeat every 15 seconds

97 Views Asked by At

As above, I have a function that repeats a sound but has no pause in between. I would like the audio to open every 15 seconds.

 function handleLoad(event) {
    createjs.Sound.play("pain");
     var myInstance = createjs.Sound.play("pain", {interrupt: createjs.Sound.INTERRUPT_ANY, loop:-1});
 }

handleLoad();


Thank you.

I tried to use setTimeOut but i guess i wrote it wrong.

 var myInstance = setTimeout(createjs.Sound.play("pain", {interrupt: createjs.Sound.INTERRUPT_ANY, loop:-1}),15000);
0

There are 0 best solutions below