Skip to content

Commit 1b94d7e

Browse files
Trying to unlock Web Audio on both touchstart and touchend events
1 parent 26956d3 commit 1b94d7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSoundManager.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ var WebAudioSoundManager = new Class({
6767
var _this = this;
6868
if (this.context.state === 'suspended') {
6969
var unlock_1 = function () {
70+
document.body.removeEventListener('touchstart', unlock_1);
7071
document.body.removeEventListener('touchend', unlock_1);
7172
_this.context.resume();
7273
};
74+
document.body.addEventListener('touchstart', unlock_1, false);
7375
document.body.addEventListener('touchend', unlock_1, false);
7476
}
7577
},

0 commit comments

Comments
 (0)