开发者

Play audio in background

开发者 https://www.devze.com 2023-03-24 23:20 出处:网络
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.

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

精彩评论

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