Open fbotalla opened 2 years ago
Same issue here. Even when going to the control center on iOS, the video stops playing and onPlaybackStatusUpdate
's status isPlaying
becomes false
.
Potentially you're missing this from your app.json (or app.config.js)
{
"expo": {
...
"ios": {
...
"infoPlist": {
...
"UIBackgroundModes": [
"audio"
]
}
}
}
}
Source: https://docs.expo.dev/versions/latest/sdk/audio/#playing-or-recording-audio-in-background-ios
Potentially you're missing this from your app.json (or app.config.js)
{ "expo": { ... "ios": { ... "infoPlist": { ... "UIBackgroundModes": [ "audio" ] } } } }
Source: https://docs.expo.dev/versions/latest/sdk/audio/#playing-or-recording-audio-in-background-ios
Well in my case the video pauses also (even when going into the Control Center on iOS), do you think it's linked to this?
Ah I missed that you mentioned video, I'm not sure if background video play is possible with expo-av
. Only recently looked at getting audio files to work in the background and this was one of the things we had missing in our project
As an aside, we're already looking at an alternative package for audio due to a potential limitation: expo-av
doesn't seem to expose/connect-to any native OS controls (e.g. control centre, lock screen) to show and control the currently playing media, which is a deal breaker for us
The playlist does not keep playing in the background even after changing the Audio Mode.
I cloned the project, changed that value and that's all I did.
Is there anything extra that needs to be done in this example to have it work in the background?
Thank you!