Setting unlocked property to true when audio context resumes

This commit is contained in:
Pavle Goloskokovic 2018-01-17 18:14:28 +01:00
parent bf0c868bf3
commit c6c3f1da79

View file

@ -93,6 +93,7 @@ var WebAudioSoundManager = new Class({
_this.context.resume().then(function () {
document.body.removeEventListener('touchstart', unlock);
document.body.removeEventListener('touchend', unlock);
_this.unlocked = true;
});
};
document.body.addEventListener('touchstart', unlock, false);