mirror of
https://github.com/photonstorm/phaser
synced 2024-11-10 07:04:31 +00:00
If you set a WebAudioSound
to loop and set SoundManager.pauseOnBlur = false
, then if you start the sound and tab away from Phaser, the sound wouldn't then loop on return to the game, if the loop _expired_ while the tab was out of focus. This was due to checking the audio source node target against the wrong internal property. Fix #6702
This commit is contained in:
parent
513e8b5429
commit
ee426c9ae4
1 changed files with 3 additions and 1 deletions
|
@ -415,7 +415,9 @@ var WebAudioSound = new Class({
|
|||
|
||||
source.onended = function (ev)
|
||||
{
|
||||
if (ev.target === _this.source)
|
||||
var target = ev.target;
|
||||
|
||||
if (target === _this.source || target === _this.loopSource)
|
||||
{
|
||||
// sound ended
|
||||
if (_this.currentConfig.loop)
|
||||
|
|
Loading…
Reference in a new issue