I previously had HTML5 audio playlists working in iOS, even when the screen was locked. This was achieved using the solution suggested here: swapping out the the src when the ended event was triggered.
Can HTML5 in the browser play continuous audio on iOS lock screen?
Now on iOS15 this seems to have stopped working and so playlists reach the end of the first track and the next one never starts.
Has anyone experienced this too? Anyone know a solution? This makes my website basically broken for people who want to listen to audio playlists while the phone is locked.
Met same problem.
It seems like safari on iOS 15 locked audio element when src changes, which won't happen on iOS 14 and before.
You can try to use howler.js
to partially solve this problem. This library creates 5 or more audio elements when user interacts, but it will still encounter the same problem when pre-created audio elements is depleted in the background.