Prevent audio from stopping on switching tabs

Hi!
I just want audio to keep playing even after losing a focus on the screen(switching tabs, developer tools, etc.). Saw an example on labs.phaser, but haven’t figured it out.
Any ideas?

Put it somewhere in your scene code:

this.sound.pauseOnBlur = false;

Docs: https://photonstorm.github.io/phaser3-docs/Phaser.Sound.BaseSoundManager.html#pauseOnBlur

6 Likes