AVAudioPlayer stops playing on screen lock even though the category is AVAudioSessionCategoryPlayback

半城伤御伤魂 提交于 2019-11-30 08:46:25

Screenlock has changed in iOS5, it now sends your app to the background, so if you want your audio to continue you must add "audio" as a UIBackGroundModes to your Info.plist file.

The closest thing I can find to documentation of this are a few Apple devforum posts (login required).

I'm not very used with audio, but did you look about interuptions ? I've read something that said (in my memories) that the audio could be stopped when en interruption happens, and it's your job to make it play again.

But it's just something coming from my memory. Does that help ?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!