iPhone:Phonegap:音频播放背景 [英] iPhone: Phonegap: Audio Playing in Background

查看:104
本文介绍了iPhone:Phonegap:音频播放背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用此代码在Phonegap中以背景模式流式传输MP3音频文件。但问题是:有了这个代码,没有办法获得当前位置和所有其他phonegap函数与此代码。
我尝试本地quicktime / childbrowser方法来播放文件。这工作很好,显示时间轴等。但没有办法隐藏quicktime播放器和在应用程序中浏览,也没有办法保存位置和设置在音频文件中的位置。任何想法来解决这个问题?

解决方案

另一个选择(如果你不害怕开发中的代码)



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



我也有一个使用它的iPhone项目示例:



https://github.com/devgeeks/ExampleAudioStreamer p>

如果你试一试,发现任何错误让我知道。我很快就压扁他们,因为我想让它准备折叠到主要的PhoneGap插件库。


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?

解决方案

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.

这篇关于iPhone:Phonegap:音频播放背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆