mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
Clearing all events listeners if error occurs
This commit is contained in:
parent
95a348d634
commit
2c8097f130
1 changed files with 7 additions and 0 deletions
|
@ -32,6 +32,13 @@ var HTML5AudioFile = new Class({
|
||||||
|
|
||||||
onError: function (event)
|
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);
|
this.callback(this, false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue