You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I called SoundJS.play with wrong parameters, such as an unknown id, so that the SoundInstance was not fully created. Still the function HTMLAudioPlugin.cleanUp was called which in turn called SoundJS.playFinished. Since instance was never pushed to the array, indexOfis -1 and splice removes the first array element.
Below is my fix, unfortunately I'm not yet familiar enough with GitHub to create a Pull Request.
Looking for your feedback and thanks for this great library!
s.playFinished=function(instance){SoundChannel.remove(instance);varindex=this.instances.indexOf(instance);if(index!=-1)this.instances.splice(index,1);// Note: Keep in instance hash.}
The text was updated successfully, but these errors were encountered:
I called
SoundJS.play
with wrong parameters, such as an unknown id, so that the SoundInstance was not fully created. Still the functionHTMLAudioPlugin.cleanUp
was called which in turn calledSoundJS.playFinished
. Sinceinstance
was never pushed to the array,indexOf
is -1 andsplice
removes the first array element.Below is my fix, unfortunately I'm not yet familiar enough with GitHub to create a Pull Request.
Looking for your feedback and thanks for this great library!
The text was updated successfully, but these errors were encountered: