Replaced touchstart with touchend event when unlocking Web Audio

This commit is contained in:
Pavle Goloskokovic 2017-11-30 13:37:31 +01:00
parent 5f3156e2b8
commit f692aad1b1

View file

@ -67,10 +67,10 @@ var WebAudioSoundManager = new Class({
var _this = this; var _this = this;
if (this.context.state === 'suspended') { if (this.context.state === 'suspended') {
var unlock_1 = function () { var unlock_1 = function () {
document.body.removeEventListener('touchstart', unlock_1); document.body.removeEventListener('touchend', unlock_1);
_this.context.resume(); _this.context.resume();
}; };
document.body.addEventListener('touchstart', unlock_1, false); document.body.addEventListener('touchend', unlock_1, false);
} }
}, },
onBlur: function () { onBlur: function () {