如何在iphone中使用"HTTP Live Streaming"播放视频?

War*_*ior 7 iphone media-player live-streaming

我是iphone开发的新手,我正在解析XML URL并在表格中显示其内容,当我点击一行时,它使用电影播放器​​播放其相应的解析管URL.我正在使用媒体播放器框架.这是我的代码

NSURL *movieURL = [NSURL URLWithString:requiredTubeUrl];

if (movieURL)
{
if ([movieURL scheme])  
{
    MoviePlayerController *myMovie = [[MoviePlayerController alloc]init];

    [myMovie initAndPlayMovie:movieURL];

}

}
Run Code Online (Sandbox Code Playgroud)

这工作正常,但我想使用"HTTP Live Streaming"播放视频.我该怎么做?任何教程和示例代码都会对我更有帮助.谢谢.

jam*_*ack 1

Apple 提供了概述以及一些带有流的示例页面。您向 MPMoviePlayer 实例提供播放列表文件 (.M3U8) URL。如果您的服务器设置正确,.M3U8 文件 URL 就足够了。

http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-DontLinkElementID_29