I am trying to load three sounds sprites into my app's Webview (needless to say this works well in Chrome/Firefox etc). The app is in PIXI.
var sound = new Howl({
src: ['sound.mp3'],
sprite: {
audio: [0,350],
brush: [350, 16150],
notep: [16500, 691]
}
});
I play the sounds like this:
sound.play('brush');
Instead of hearing the 3 sounds, the whole file is played once. Then if I play the first or the second sound I hear the whole sound file (all 3 sounds). The third one is played correctly after the whole file is played once. Does it have to do with Android's assets? I just use this code in Android Studio, nothing else:
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/index.html");
Anyway, is there any working code, any very simple example I may use for this task? I have lost 2 days for just playing with these three sounds. If there is any other workaround I would be happy to try...
Many thanks