Hi, I have one question about audio: when I use this keyword - this.sound.add(key), it works perfectly, but then I try to use new Phaser.Sound.HTML5AudioSound(scene.sound, key), declared audio plays but isPlaying property remains the same even when the sound completes,
also, it doesn’t trigger a complete event to change isPlaying property manually.
Sound Manager automatically adds them to list and does other stuff on it.
do you have specific reason to create Sound object other than Phaser’s native way?
I think BaseSound class is not used directly, so it’s better to extend either WebAudioSound or HTML5AudioSound.
Downside of this approach is that it pops out of Phaser’s environment and you have to create each sound “manually”.
because of the way it’s implemented in library, we can’t simply swap out Sound class in Sound Manager.
Therefore I’m thinking it’s best to extend SoundManager class, override .add method - create instance of the sound object you’ve created instead of regular one.
replace default SoundManager class with new manager before creating Phaser.Game instance.
also you can update global declarations if you’re using TS.