Quantcast
Channel: Intel AppUp™ Encapsulator Forum (Archived)
Viewing all articles
Browse latest Browse all 15

Repeat sound make app crashes

$
0
0

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


Viewing all articles
Browse latest Browse all 15

Latest Images

Trending Articles





Latest Images