Skip to content

Commit 658e8c0

Browse files
implemented onBlur and onFocus methods for WebAudioSoundManager
1 parent ab9a9c9 commit 658e8c0

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

v3/src/sound/webaudio/WebAudioSoundManager.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ var WebAudioSoundManager = new Class({
7878
};
7979
document.body.addEventListener('touchstart', unlock_1, false);
8080
}
81+
},
82+
onBlur: function () {
83+
this.context.suspend();
84+
},
85+
onFocus: function () {
86+
this.context.resume();
8187
}
8288
});
8389
/**

0 commit comments

Comments
 (0)