iOS 4的背景HTTP实时流 [英] iOS 4 background HTTP Live Stream
问题描述
我想在后台播放音频HTTP实时流。但我怎么做呢?
I'd like to play an audio HTTP Live Stream in background. But how do I do that?
我试图与价值声音来的info.plist中添加键值(数组)UIBackgroundModes。现在,我尝试播放音频用的MPMoviePlayerController。但是,一旦应用进入后台,音频播放停止!我不知道任何其他API的发挥HTTP实时流在iPhone上。那么,有没有一种其他的还是我做错了什么?
我找遍了苹果文档,但找不到任何有用。没有太多关于该文档背景音乐:-(
I tried to add the key (an Array) "UIBackgroundModes" with value "audio" to the info.plist. Now I try to play audio with the MPMoviePlayerController. But as soon as the app goes into background, the audio Playback stops! I don't know of any other API to play a HTTP Live Stream on the iPhone. So is there an other or am I doing something wrong? I searched all over the apple documentation but couldn't find anything useful. There isn't much about background audio in the docs :-(
推荐答案
发现了一个soluton:
设置 useApplicationAudioSession
到 NO
上的MPMoviePlayerController做这项工作。但它仅适用于音频流只。视频流还是停下来。
Found a soluton:
setting useApplicationAudioSession
to NO
on the MPMoviePlayerController does the job. But it works only on audio only streams. Video streams still stop.
player.useApplicationAudioSession = NO;
这篇关于iOS 4的背景HTTP实时流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!