Play video in MPMoviePlayerController from url?

Am I trying to play video from Url using MPMovieplayer, which downloads it to the Quicktime player while I want the video to play only in my application (without background mode)? how can i achieve this will play video in UIWebview instead of MPMoviePlayer? Also, when does QuickTime Player download only the audio recording and the video is not displayed? I am using the following code

NSString *videoFilepath = @"http://www.migital.com/Hemant/1.3gp"; NSURL *videoURL = [NSURL URLWithString:videoFilepath ]; MPMoviePlayerViewController *movie = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:movie]; [self presentMoviePlayerViewControllerAnimated:movie]; 
+4
source share
2 answers

you need to add movie.view to your view

+5
source

web = [[UIWebView alloc] initWithFrame: CGRectMake (0, 0, 320, 480)];

 NSString *urlAddress = @"HTTP://"; NSURL *url = [NSURL URLWithString:urlAddress]; NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; [web loadRequest:requestObj]; 
-2
source

All Articles