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:
Richard Davey 2024-09-02 18:27:10 +01:00
parent 513e8b5429
commit ee426c9ae4

View file

@ -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)