We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f21646 commit 9ec1fb4Copy full SHA for 9ec1fb4
1 file changed
v3/src/sound/webaudio/WebAudioSoundManager.js
@@ -67,9 +67,10 @@ var WebAudioSoundManager = new Class({
67
var _this = this;
68
if (this.context.state === 'suspended') {
69
var unlock_1 = function () {
70
- document.body.removeEventListener('touchstart', unlock_1);
71
- document.body.removeEventListener('touchend', unlock_1);
72
- _this.context.resume();
+ _this.context.resume().then(function () {
+ document.body.removeEventListener('touchstart', unlock_1);
+ document.body.removeEventListener('touchend', unlock_1);
73
+ });
74
};
75
document.body.addEventListener('touchstart', unlock_1, false);
76
document.body.addEventListener('touchend', unlock_1, false);
0 commit comments