We have submitted a Github issue to Expo (a popular React Native framework) regarding their audio functionality on iOS (expo-av): [login to view URL] They have recognized it is an issue but they don't have time to solve it currently. We need someone with the relevant skillset to debug this issue so we can submit it to Expo for review, so we can solve the issue. All the relevant info regarding the bug is in the Github issue, but here's a summary:
PLEASE NOTE: This bug ONLY reveals itself on a real iPhone with a standalone app, it will not be evident on an iOS simulator (for reasons unknown) or in the expoGo app (because expoGo doesn't support background audio)
We have an app that plays one audio track after another automatically. This is designed to also work when our app is in the background/phone is locked etc.
Everything works as planned when the app is in the foreground. When a track is clicked, it plays, and when the track reaches the end, the next track is automatically played using [login to view URL]()
If an audio track is played, and then the app is moved to the background, the audio track plays as expected. However, once the track in question reaches its end, the next track DOES NOT play until the app is opened again.
Our hypothesis as to why this was not working was that [login to view URL]() wasn't being executed in background mode for some reason, however, after testing, we've realized that [login to view URL]() IS being triggered, but it's just not working until the app is opened again, meaning this is a bug.
We have created a bare-bones project to demonstrate this issue and have left the relevant code in the Github issue. Any help will be much appreciated!