[SOLVED] Audio unexpectedly replayed when switching a tab after the audio playback finished

PlayCanvas team,

I noticed an unexpected audio behavior while I was working on my project. This is not critical, so please check when you have time.

1. Open https://playcanvas.com/project/367166/overview/mmd-on-html5 with Chrome 2. Play all scene until the music ends and the characters become still after they bow. 3. Switch to another Chrome tab. Then switch back to the PlayCanvas tab. 4. Notice the music starts to play again from the beginning even the "this.entity.audiosource.play("music.ogg");" (audio.js line 10 which starts the musin in the program) is not called.


I thought this bug had been fixed.

We pause and resume all audio when we switch tabs. And there is a bug that occurs if you switch after the audio has finished playing.

Sorry about that. We need to take a look at this.

Hey @nakata0705,

I just pushed a fix for this so it shouldn’t happen anymore.


Thank you vaios. I confirmed the issue is now fixed!