Using the Sound and SoundChannel classes I can load and play a sound asset in my HTML5 project. If allowed to play till the end, the sound stops automatically since 0 loops are specified. But this.channel.stop() has no effect, neither does this.sound.close(). Setting both of those to null also has no effect. Removing the screen that initiated the sound doesn’t remove the sound.
I based my code on the PlayingSound example. But the PlayingSound example actually doesn’t work. Clicking on the background doesn’t pause the sound as it supposed to. It only fades the sound out. Clicking the background not only fades the sound back in but also adds another copy of the same sound and the two sounds are out of sync.
Looks like this is the same old problem: HTML5 SoundChannel.stop not working
Latest howler.js didn’t help.
I have this problem in Firefox with .ogg sounds.
I’m using lime 7.0.0, OpenFl 8.4.1 and Have 3.4.7.
I tried using the latest howler.min.js. I replaced the one that was in the /usr/local/lib/haxe/lib/lime/7,0,0 folder. Still didn’t work. I had two earlier versions of howler.min.js and tried putting each in the 7.0.0 folder and still no luck.
I also have folders for 6.2.0, 6.3.0, 6.3.1 and 6.4.0. I also have folders for OpenFl 7.1.0, 8.0.0, 8.0.2, and 8.2.2 in addition to 8…4.1. Are those older folders used at all?