开发者

Play audio in background

I want my app will play musi开发者_JS百科c when she is in the background too, there is any way to do it? i try to use apple documentation but it didn't work. it is possible that because i am now using the avplayer i cant play audio in background?

i play the music with

ExtAudioFileSeek(mExtAFRef, finalFrames);


I think playing audio in background is possible only for streaming audio. For normal audio we can only play when screen is locked.


You should look at documentation of using background tasks like:

http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html

and specially the:

http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/BackgroundExecution/BackgroundExecution.html#//apple_ref/doc/uid/TP40007072-CH5-SW14

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜