mirror of
https://github.com/photonstorm/phaser
synced 2025-02-18 06:58:30 +00:00
Added onFocus method to be used when sound resumes when game gains focus
This commit is contained in:
parent
381799b040
commit
ff885e2ead
1 changed files with 5 additions and 0 deletions
|
@ -182,6 +182,11 @@ var HTML5AudioSound = new Class({
|
|||
}
|
||||
this.stopAndReleaseAudioTag();
|
||||
},
|
||||
onFocus: function () {
|
||||
this.isPlaying = true;
|
||||
this.isPaused = false;
|
||||
this.pickAndPlayAudioTag();
|
||||
},
|
||||
update: function (time, delta) {
|
||||
// TODO include play method call delay
|
||||
if (this.isPlaying) {
|
||||
|
|
Loading…
Add table
Reference in a new issue