Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How play the video using “HTTP Live Streaming” in iphone?

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.

like image 660
Warrior Avatar asked Apr 27 '10 09:04

Warrior


1 Answers

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

like image 192
james_womack Avatar answered Sep 19 '22 07:09

james_womack