Reputation: 1703
I use avqueueplayer to play some very short audios. Once an item is completed, it shall pause for 2 second and then play the next item.
The problem is if the player is paused and at the same time, I press home button, it will not play the next item unless I re-enter the app.
The background play works fine if I press home button, and the player is not in paused status. How Should I sovle this problem? Thank you.
Upvotes: 0
Views: 143
Reputation: 9877
The audio will not be interrupted if it is continuous. But you need to declare your app's RemoteControlEvents
for audio to be played in the background if it is, as you explained, paused or stopped.
[[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
Upvotes: 1