通过m3u8流式传输到iphone [英] Streaming to iphone via m3u8
问题描述
我一直在阅读有关通过m3u8在iphone上流媒体的内容,但我不确定我是否遗漏了某些内容。
I've been reading around about streaming on the iphone via m3u8 but I'm not sure if I'm missing something.
MPMoviePlayerController已有详细记载只会在OS 3.1中播放全屏,因此iPhone用户会一直看着视频(在我的情况下听音频)并且无法在应用程序中导航。我没有找到一种通过m3u8流式传输的方法,例如,使用Matt Gallagher的代码和一个mp3 ...
It is well documented that MPMoviePlayerController will only play full-screen in OS 3.1, so iPhone users are stuck watching the video (listening to audio, in my case) and can't navigate in the application. I haven't found a way to stream via m3u8 like you can, for example, using Matt Gallagher's code and an mp3...
关于如何包含a的任何想法m3u8播放器将播放嵌入式?
any ideas on how to include a m3u8 player that will play embedded?
谢谢!
推荐答案
嗯如果您将播放音频,您可以使用AVPlayer(http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html),或者,如果您想要预先缓冲,您可以使用AVQueuePlayer(http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVQueuePlayer_Class/Reference/Reference.html) - 它们都可以使用HTTP实时流媒体协议,但您应该将其分段使用apple提供的工具跟踪:
http://developer.apple.com / resources / http-streaming /
Well if you'll play audio you could use AVPlayer (http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html) or, if you want pre-buffering as well, you could use AVQueuePlayer (http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVQueuePlayer_Class/Reference/Reference.html) - they both work with the HTTP live streaming protocol but you should fragment your tracks by using the tools provided by apple: http://developer.apple.com/resources/http-streaming/
他们还有一个验证器,告诉你流是否正常。问题是AVPlayer可以从iOS 4.0和AVQueuePlayer 4.1中获得。
They also have a validator which tells you if the streams are ok. The problem is that AVPlayer is available from iOS 4.0 and AVQueuePlayer from 4.1.
这篇关于通过m3u8流式传输到iphone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!