Clearing all events listeners if error occurs

This commit is contained in:
Pavle Goloskokovic 2018-01-08 17:31:53 +01:00
parent 95a348d634
commit 2c8097f130

View file

@ -32,6 +32,13 @@ var HTML5AudioFile = new Class({
onError: function (event)
{
for (var i = 0; i < this.data.length; i++)
{
var audio = this.data[i];
audio.oncanplaythrough = null;
audio.onerror = null;
}
this.callback(this, false);
},