iOS/Android背景音频流 [英] iOS/Android background audio streaming
问题描述
我正在考虑使用phonegap定位ios和android.但是在开始之前,我需要确定是否以及如何进行背景音频流传输. 我将在Web上的某个地方拥有一个固定长度的mp3网址,无论应用程序是打开还是在后台,我都需要播放此网址,并能够跟踪mp3何时结束. 任何注释,这方面的个人经验,链接等都很棒. 谢谢
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
推荐答案
我不知道Android的答案,但是对于iOS,可以使用phonegap应用程序启用背景音频.但是,您将需要修改phonegap源才能使其正常运行,并且还需要在项目的info.plist文件中添加一个名称/值对.有关详细信息,请参见此帖子.
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.
这篇关于iOS/Android背景音频流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!