2.6 KiB
2.6 KiB
Phaser 3.60.0 Change Log
Return to the Change Log index.
Sound Manager New Features
BaseSoundManager.gameLostFocusis a new boolean property that is set totruewhen the game loses focus andfalsewhen it regains focus.BaseSoundManager.getAllPlayingis a new method that will return all currently playing sounds in the Sound Manager.
Sound Manager Updates
- If no Audio URLs match the given device a new warning is now displayed in the console (thanks @samme)
- The
BaseSoundManager.getAllmethod used to require akeyparameter, to return Sounds matching the key. This is now optional and if not given, all Sound instances are returned. - The
WebAudioSoundManagerwill now detect if the Audio Context enters a 'suspended' or 'interrupted' state as part of its update loop and if so it'll try to resume the context. This can happen if you change or disable the audio device, such as plugging in headphones with built-in audio drivers then disconnecting them, or swapping tabs on iOS. Fix #5353 (thanks @helloyoucan) - The
Device.Audiomodule has been rewritten to use a new internalCanPlayfunction that cuts down on the amount of code required greatly. Device.Audio.aacis a new boolean property that defines if the browser can play aac audio files or not, allowing them to be loaded via the Loader (thanks @Ariorh1337)Device.Audio.flacis a new boolean property that defines if the browser can play flac audio files or not, allowing them to be loaded via the Loader (thanks @Ariorh1337)- The
NoAudioSoundManagernow has all of the missing methods, such asremoveAllandgetto allow it to be a direct replacement for the HTML5 and WebAudio Sound Managers (thanks @orjandh @samme)
Sound Manager Bug Fixes
- Setting
SoundManager.pauseOnBlurtotruewould not stop the audio if a game lost focus on certain browsers (like Firefox and Chrome on Android 13). This is now enforced via the newgameLostFocusflag. Fix #6354 (thanks @klaritan @michalfialadev) - Destroying a
WebAudioSoundin the same game step as destroying the Game itself would cause an error when trying to disconnect already disconnected Web Audio nodes.WebAudioSoundwill now bail out of its destroy sequence if it's already pending removal. - Audio will now unlock properly again on iOS14 and above in Safari. Fix #5696 (thanks @laineus)
Return to the Change Log index.
📖 Read the Phaser 3 API Docs 💻 Browse 2000+ Code Examples 🤝 Join the awesome Phaser Discord