iPhone: Phonegap: Audio Playing in Background

耗尽温柔 提交于 2019-12-06 05:03:17

问题


I'm using this Code to stream an MP3 audio file in background mode in Phonegap. But the Problem is: With this Code there is no way to get the current position and all the other phonegap functions with this Code. I tried the native quicktime/childbrowser method to play the file. This works great and shows timeline etc. BUT there is no way to hide the quicktime player and browse in the app and there is also no way to save the position and set the position in the audio files. Any Ideas to solve the issue?


回答1:


One other option (if you are not scared of code in development) is a plugin for streaming audio (including fixed length files like mp3's) for PhoneGap on iOS.

https://github.com/devgeeks/phonegap-plugins/tree/AudioStreamer/iPhone/AudioStream

It's currently in development and may have bugs, but it is fairly feature rich.

I also have an example iPhone project that uses it:

https://github.com/devgeeks/ExampleAudioStreamer

If you give it a try and find any bugs let me know. I am pretty quick to squash them as I am trying to get it ready to fold in to the main PhoneGap plugins repo.



来源:https://stackoverflow.com/questions/7959275/iphone-phonegap-audio-playing-in-background

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