mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
The WebAudioSoundManager.onFocus
method will now test to see if the state of the AudioContext
is interrupted
, as happens on iOS when leaving the page, and then resumes the context. Fix #5390 #5156 #4790
This commit is contained in:
parent
187e855ac9
commit
e5f4548961
1 changed files with 4 additions and 2 deletions
|
@ -341,9 +341,11 @@ var WebAudioSoundManager = new Class({
|
|||
*/
|
||||
onFocus: function ()
|
||||
{
|
||||
if (!this.locked)
|
||||
var context = this.context;
|
||||
|
||||
if (context.state === 'suspended' || context.state === 'interrupted' || !this.locked)
|
||||
{
|
||||
this.context.resume();
|
||||
context.resume();
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue