Implemented onFocus method for HTML5AudioSoundManager class

This commit is contained in:
Pavle Goloskokovic 2018-01-08 19:29:01 +01:00
parent 06bc5d62fc
commit 4d768c1c6a

View file

@ -19,6 +19,12 @@ var HTML5AudioSoundManager = new Class({
sound.pause(); sound.pause();
} }
}); });
},
onFocus: function () {
this.onBlurPausedSounds.forEach(function (sound) {
sound.resume();
});
this.onBlurPausedSounds.length = 0;
} }
}); });
module.exports = HTML5AudioSoundManager; module.exports = HTML5AudioSoundManager;