MPMovieplayerController doesn't play next URL when in background

社会主义新天地 提交于 2019-12-02 05:26:36

问题


I am developing an iOS app in which I am streaming .mp3 files using MPMoviePlayerController. When playing of one file completes I take next url and play the file. All works great in foreground but when I move the app to background the current song plays well but when it finishes, the method which plays the next song doesn't get executed.

I checked similar questions on stackoverflow but the solutions doesn't seem to work for me.

Any pointer in the right direction will be very helpful.

Thanks in advance!

EDIT :On testing the app on different devices I found that the functionality is working on iOS 5.1 but not in iOS 4.3. So I creted a sample app which plays a local file on finishing the previous one and that app does its job correctly in all versions of iOS even when in background.Its now have become more confusing for me.


回答1:


I couldn't do it using MPMoviePlayerController.

Finally used AudioStreamer.

My app is working fine now.

Thanks Matt!



来源:https://stackoverflow.com/questions/10715250/mpmovieplayercontroller-doesnt-play-next-url-when-in-background

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