iPhone - 使用 MPMoviePlayerViewController 流式传输音频
我正在使用 MPMoviePlayerViewController 从 URL“http://ios-audio.q-music.be/audio.m3u8”流式传输音频。 它玩得很好。 但是当我单击“主页”按钮时,该应用程序进入后台并停止流式传输。 当我再次启动应用程序时,它会再次开始流式传输。
当应用程序进入后台时,如何使我的应用程序使用 MPMoviePlayerController 流式传输音频。 或者我必须使用其他框架吗?
I'm using MPMoviePlayerViewController to stream an audio from the URL "http://ios-audio.q-music.be/audio.m3u8".
Its playing well.
But when I click "Home" button, the app goes into background and stops streaming.
When I start the app again, it starts streaming again.
How can I make my app stream the audio using MPMoviePlayerController when the app goes to background.
Or do I've to use other frameworks?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我使用 https://github.com/mattgallagher/AudioStreamer 来传输音频,它将在后台工作。
Well I use https://github.com/mattgallagher/AudioStreamer for streaming audio, It will work in background.
http://digitaldj.net/2010/08/25/ios4- background-audio-revisited/ 指向 Matt Gallagher 的原始 AudioStreamer 代码的分支 http://github.com/DigitalDJ/AudioStreamer,我可以验证它是否支持背景音频。也就是说,原来的 AudioStreamer 今年已经更新了,所以我想它现在也已经实现了后台支持。
当然,使用 MPMoviePlayerController 来做背景音频会很有趣,因为它可能为在音频流应用程序中直接支持 AirPlay 提供了机会。
http://digitaldj.net/2010/08/25/ios4-background-audio-revisited/ points to a fork of Matt Gallagher's original AudioStreamer code at http://github.com/DigitalDJ/AudioStreamer, which I can verify does support background audio. That said the original AudioStreamer has been updated this year so I'd imagine it also has implemented background support by now.
Certainly using MPMoviePlayerController to do background audio would be interesting since it presumably opens up the opportunity to support AirPlay directly in an audio streamer application.