My app is built on the audio-service and just-audio plugins, and works as follows:
- Creates a
ConcatenatingAudioSource
with the audio files I want to play; - Calls
player.setAudioSource()
to this ConcatenatingAudioSource; - When setAudioSource completes, calls “player.play()`;
- Listens to the playbackEventStream, and when
processingState
becomesProcessingState.completed
, (asynchronously) goes back to step 1.
Works fine on Android.
On iOS, this works fine when the app is in the foreground. When the app is in the background, though, Step 3 is never reached. I receive the AudioProcessingState.buffering
event, but never the AudioProcessingState.ready
event.
What’s the problem here?