This appears to be a bug in SoundManager. The soundManager.createSound
method runs a _setup_html5
method. If you've set autoPlay
, that _setup_html5
method calls a load
function, which loads the sound.
However, in the load
function, it checks to see if your browser supports HTML5. If it does, it again calls _setup_html5
, which calls load
the second time.
Do you follow?
Here's a sampling of the code:
this._setup_html5 = function(oOptions) {
//...
if (instanceOptions.autoLoad || instanceOptions.autoPlay) {
s.load();
}
//...
}
this.load = function(oOptions) {
//...
if (html5OK(instanceOptions)) {
oSound = s._setup_html5(instanceOptions);
//...
}
//...
}