iOS 多任务处理:当应用程序位于托盘中时让流播放
有谁知道在应用程序失去焦点(按下主页按钮时)后如何让音频流播放(从 AVPlayer 组件中的 webview 或)?在 iOS 4.2 中。我知道我必须阅读有关多任务处理的内容,但如果您能为该特定情况指出一些事情,那就太好了。与单击流链接并在 Safari 中打开它的行为完全相同。您必须关闭多任务托盘中的应用程序才能结束它。
就像您想在使用另一个应用程序时收听广播电台一样。
谢谢 !
Does anyone knows how I can let an audio stream play (from a webview ou in a AVPlayer component) after the app lose focus (when the home button is pushed) ? In iOS 4.2. I know I must read about multitasking but if you could just point out a few things for that particular case, that would be great. Exactly the same behavior as if you click a stream link and it's open in Safari. You have to shutdown the application in the multitask tray to end it.
Like if you want to listen to a radio station while working in another app.
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看有关 iOS 后台进程的文档,特别是播放后台音频的要求:
iOS 后台编程指南
相关的音频编程指南可能会指导您完成正确实现音频流所需的任何细节:音频会话编程指南
Check out the documentation on background processes on iOS, specifically the requirements for playing background audio:
iOS Background Programming Guide
The associated audio programming guide will probably guide you through any specifics needed to properly implement your audio stream: Audio Session Programming Guide