Looped audio stops in Mozilla

Mozilla Firefox 105.0.3 (64 bit)

After the scene starts, the sound plays once and stops.

https://playcanvas.com/editor/scene/1483308

The ‘Loop’ parameter is set to ‘true’.

image

@SARJ I tried it on Chrome and it seems to run forever. When I tried in firefox I experience the same issue. I don’t know for sure what firefox is blocking and why.

Works in Chrome too. But our game will be tested in different browsers, including Mozilla. So everything needs to work.

Looks like it’s related to using start time and duration as without those, the sound loops fine.

For a short term workaround, please modify the audio so that you don’t need to use Start Time and Duration

Not using Start Time and Duration will lead me back to this issue

But as I understand it, I will have to set the Start Time to 0, and add a pause at the beginning of the sound file itself. This is the only solution to the problem.

Hi @SARJ !

The other option you might want to consider again from the other thread is converting your audio samples into gapless mp3’s:

https://www.compuphase.com/mp3/mp3loops.htm

You will probably have to make a minor adjustment to the length of your tracks (Not noticeable if it’s longer), but it would eliminate the need for pausing and allow you to loop the file easily. Luckily, it seems like there is an available utility to aid with this.