I want to Download and Streaming and Downloading the video simulteniouslly by App. There video are heavy so Converted into m4u8 format and using the VOD Live streaming cocep
FOllowing are the code to play the movie, Hope this is useful..
NSURL *fileURL = [NSURL URLWithString:@"<Video URL>"];
[self playMovie:fileURL];
-(IBAction)playMovie:(NSString *) theURL
{
NSURL *fileURL = [NSURL fileURLWithPath:theURL];
MPMoviePlayerController *moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlaybackComplete:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
[self.view addSubview:moviePlayerController.view];
moviePlayerController.useApplicationAudioSession = NO;
moviePlayerController.fullscreen = YES;
[moviePlayerController play];
}
- (void)moviePlaybackComplete:(NSNotification *)notification
{
MPMoviePlayerController *moviePlayerController = [notification object];
[[NSNotificationCenter defaultCenter] removeObserver:self
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayerController];
[moviePlayerController.view removeFromSuperview];
[moviePlayerController release];
}
To Make the Video capable of streaming
See More for Apple Live Streaming HTTP LIve Streaming