Closed developer-poplar closed 10 months ago
Do you observe the same behavior in the simulator? I tried to reproduce the problem with SimplePlayer-iOS in the simulator but didn't observe the issue.
Sorry, I can't simulate audio termination in the emulator at the moment,But I found something new. When playReturningError was called again after the termination, it worked, but with a long delay, about 60 seconds
After the re-test, if interrupted by an incoming call,is ok. This problem will occur only when the audio is interrupted by other apps,for instance Apple Music
Encountered the same issue with interruption. It stops being able to play after I switch to TikTok and come back to my app.
Encountered the same issue with interruption. It stops being able to play after I switch to TikTok and come back to my app.
I used a maybe not very good method to solve this problem, but it worked. I recorded the playback progress in real time in the child thread, flagged any external audio interruptions, and when I needed to play again, I reset SFBAudioPlayer and called seekToPosition to the recorded point in time
I believe this is caused by AVAudioEngine stopping automatically when the audio session is interrupted. This leaves the player in an inconsistent state internally. Observing AVAudioSessionInterruptionNotification
in the player and pausing/restarting appropriately seems to fix the issue.
On ios devices, playReturningError is invalid when the audio is interrupted by another app,I'm using SFBAudioPlayer