问题
I wrote a small language learning app for my own use which plays audio recordings with howlerjs. The audio is played in a loop, when the end is reached, it just restarts until the user intervenes.
To the Problem: When I turn off my phone (standby) the audio file still plays - like it should - but is not restarted ones the end is reached.
Is there a JavaScript trick I can use to restart it even when my phone is off? Or can I change a setting in Chrome/Firefox to stop Chrome/Firefox from preventing a restart?
回答1:
I didn't see, that howlerjs has a loop attribute, one can set to true. I always restarted the audio again via code, when it was finished. Thanks to Kaiido it works now.
来源:https://stackoverflow.com/questions/58748053/repeat-audio-on-chrome-firefox-mobile-when-phone-is-off