iOS/Android background audio streaming

时光总嘲笑我的痴心妄想 提交于 2019-12-13 03:44:25

问题


I am considering using phonegap to target both ios and android. But before I start I need to know for sure if, and how, I can have background audio streaming. I would have a url to a fixed length mp3 somewhere on the web, and I need to play this whether the app is open or in the background, and be able to keep track of when the mp3 ends. Any notes, personal experience in this regard, links, etc. would be great. Thanks


回答1:


I do not know the answer for Android, but for iOS it is possible to enable background audio with a phonegap application. However, you'll need to modify the phonegap source in able to get this working, and also add a name/value pair to the info.plist file of your project. For full details, see this post.



来源:https://stackoverflow.com/questions/11939792/ios-android-background-audio-streaming

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