Open aareeph opened 4 years ago
I have the same problem. Does anyone know a solution?
@Dmitry-Rudenko for this reason alone I had to remove the Howler library from my project and used native HTML5 Audio tag
@aareeph I too. So far this is the only solution.
Unfortunately I have the same problem:
On an Andorid device, a Fairphone 3+ I use the looping feature with the explicit use of the HTML5 "fallback". Looping works fine as long as the screen is on.
After screen timeout (screen goes dark), it continues to play until the end, but does not loop anymore.
This differs from the behviour, when I use an HTML5 audio element directly. This would loop forever, which is what I need in my scenario.
@goldfire Could you look at this?
Does this differ from the WebAudioAPI? Would the flag "autoSuspend" to false help here (although, per the does, is intented for WebAudio API only? Could you expose the HTML5 audio element, so that we could use the loop feature directly from there?
I have looked into the code, and howler does not use the HTML5 audio element's loop feature. Instead it maintains an internal loop flag and re-issues a play command at the track's end. See
Now this might be useful is some cases, probably with sprites, but has the above mentioned drawback.
A solution might be, to directly use the loop feature IF
This would help me and the OP out. For howler, this might be a far-fetched edge case, and addressing it would be a bit to much involved?
Interestingly, today, It worked on both Firefox and the Brave browser (which is Chromium based), on the same FP3+ device as mentioned earlier. However, with Chrome, it did not work, still.
The loop still is executed right after once the screen is unlocked again.
Hi, I am trying to play an audio on loop and it's working fine everywhere except when the Android Chrome browser goes to background or mobile screen is locked. Audio doesn't restart but as soon as browser window comes to foreground the looping sound continues to play.
Anyone else experiencing the same behavior?
Thanks!