iPhone - 使用 MPMoviePlayerViewController 流式传输音频

发布于 2024-11-28 00:20:38 字数 233 浏览 7 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蘑菇王子 2024-12-05 00:20:38

好吧,我使用 https://github.com/mattgallagher/AudioStreamer 来传输音频,它将在后台工作。

Well I use https://github.com/mattgallagher/AudioStreamer for streaming audio, It will work in background.

丿*梦醉红颜 2024-12-05 00:20:38

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文