Setting last audio tag event listener to set touchUnlocked when it is ready for playback

This commit is contained in:
Pavle Goloskokovic 2018-01-17 17:31:56 +01:00
parent 644a28cb3c
commit 5916d9f423

View file

@ -100,6 +100,11 @@ var HTML5AudioSoundManager = new Class({
}
return true;
});
var lastTag = allTags[allTags.length - 1];
lastTag.oncanplaythrough = function () {
lastTag.oncanplaythrough = null;
_this.touchUnlocked = true;
};
allTags.forEach(function (tag) {
tag.load();
});