mirror of
https://github.com/photonstorm/phaser
synced 2024-12-17 16:43:30 +00:00
Setting last audio tag event listener to set touchUnlocked when it is ready for playback
This commit is contained in:
parent
644a28cb3c
commit
5916d9f423
1 changed files with 5 additions and 0 deletions
|
@ -100,6 +100,11 @@ var HTML5AudioSoundManager = new Class({
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
var lastTag = allTags[allTags.length - 1];
|
||||||
|
lastTag.oncanplaythrough = function () {
|
||||||
|
lastTag.oncanplaythrough = null;
|
||||||
|
_this.touchUnlocked = true;
|
||||||
|
};
|
||||||
allTags.forEach(function (tag) {
|
allTags.forEach(function (tag) {
|
||||||
tag.load();
|
tag.load();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue