Repeat sound make app crashes

Repeat sound make app crashes

Hello people,

I'm making an app with HTML5 and I've a problem when I try to play sound. The app crashes when I trying to repeat the same sound.

The encapsulator 2.0 can play the same sound multiple times?

The first code I've used it this:

 when load object

  •  var sound = new Audio();
  •  sound.src = "my audio file .wav "

 when hit the object

  •  sound.currentTime = 0;
  •  sound.play();

But doesn't work, only play the sound 1 time.

Now I'm using this other code:

 when load object

  •  var sound = new Audio();

when hit the object

  •  sound.src = "my audio file .wav "
  •  sound.play();

Works sometimes but always causes the app crashes.

Anyone can help me?

Thanks

1 contribution / 0 nouveau(x)
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.