To play a video from a url in iPhone sdk just write down following line of code:
Step 1: Create a MPMoviePlayerViewController object as *moviePlayerController.
Step 2: Create a Url and initialize your movieController with Url.
Step 3: and Now play your video .
MPMoviePlayerViewController *moviePlayerController;
NSURL *videoUrl=[NSURL URLWithString:urlofYourVideo];
moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:videoUrl];
[self presentMoviePlayerViewControllerAnimated:moviePlayerController];
[moviePlayerController.moviePlayer prepareToPlay];
moviePlayerController.moviePlayer.shouldAutoplay=YES;
[moviePlayerController.moviePlayer play];
0 Comment(s)