如何使用“HTTP Live Streaming”播放视频在 iPhone 中?
我是 iPhone 开发新手,我正在解析 XML URL 并将其内容显示在表格中,当我单击一行时,使用电影播放器播放其相应的解析管 URL。我正在使用媒体播放器框架。这是我的代码
NSURL *movieURL = [NSURL URLWithString:requiredTubeUrl];
if (movieURL)
{
if ([movieURL scheme])
{
MoviePlayerController *myMovie = [[MoviePlayerController alloc]init];
[myMovie initAndPlayMovie:movieURL];
}
}
这工作正常,但我想使用“HTTP Live Streaming”播放视频。我该怎么做?任何教程和示例代码都会对我更有帮助。谢谢。
I am new to iphone development,I am parsing a XML URL and display its content in the table, when i click a row , its corresponding parsed tube URL is played using the movie player.I am using media player framework.Here is my code
NSURL *movieURL = [NSURL URLWithString:requiredTubeUrl];
if (movieURL)
{
if ([movieURL scheme])
{
MoviePlayerController *myMovie = [[MoviePlayerController alloc]init];
[myMovie initAndPlayMovie:movieURL];
}
}
This is working fine, but i want to play the video using "HTTP Live Streaming".How can i do that? Any tutorials and sample code would me more helpful.Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
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
Apple provides and overview and some sample pages with streams. You provide the playlist file (.M3U8) URL to your MPMoviePlayer instance. If your server is set up properly, the .M3U8 file URL should suffice.
http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/StreamingMediaGuide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008332-CH1-DontLinkElementID_29
在浏览器中实现,这在很大程度上适用于本机应用程序开发,因为它将 iPhone 用户引导至电影应用程序。很大程度上取决于您想要查看的正确流http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/
To implement in for the browser, which applies for a lot to native app development since it directs iphone users to movie app. A lot depends on the proper stream you're wanting to view http://www.ioncannon.net/programming/452/iphone-http-streaming-with-ffmpeg-and-an-open-source-segmenter/
使用 MPMoviePlayerController 从服务器进行流式传输。
Use MPMoviePlayerController for streaming from server.