I've implemented SoundManager 2 on my webpage which all works fantastically well in every browser I've thrown at it so far.
When I test on desktop, there is very little lag between clicking the div and hearing the sound played. However, on Android there is always a lag of about a second the first time the sound is played. After that, there is hardly any lag at all.
Is it possible to reduce or remove the first time played lag on Android?
Here is the code I'm using
$(document).ready(function() {
soundManager.setup({
url: 'www.mysite.com/swf/',
preferFlash: false,
onready: function() {
soundManager.setup({
defaultOptions: {
autoLoad: true,
autoPlay: false
}
});
soundManager.createSound({
id: 'mysound',
url: 'www.mysite.com/sounds/mysound.mp3',
volume: 50
});
}
});
$(document).on("click",".wrapper",function(e){
soundManager.play('mysound');
}
}
I've tried manually loading the sound like this
var preload = soundManager.createSound({
id: 'mysound',
url: 'www.mysite.com/sounds/mysound.mp3',
volume: 50
});
preload.load();
But that made no difference!
Anybody had this working without a lag on Android?