mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Added check for touch events when trying to unlock web audio on iOS devices
This commit is contained in:
parent
01e5274c76
commit
2d2bf4c0e3
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ var WebAudioSoundManager = new Class({
|
|||
*/
|
||||
unlock: function () {
|
||||
var _this = this;
|
||||
if (this.context.state === 'suspended') {
|
||||
if (this.context.state === 'suspended' && 'ontouchstart' in window) {
|
||||
var unlock_1 = function () {
|
||||
_this.context.resume().then(function () {
|
||||
document.body.removeEventListener('touchstart', unlock_1);
|
||||
|
|
Loading…
Reference in a new issue