I'm confused about:
MPMoviePlayerViewController and MPMoviePlayerController
what is the best way to play a video locally in ios6?
this is my code
NSURL * url = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource: @ "17" OfType: @ "mov"]];
MoviePlayer = [[MPMoviePlayerViewController alloc]
initWithContentURL: url];
[self presentMoviePlayerViewControllerAnimated: MoviePlayer];
[moviePlayer.moviePlayer play];
[[NSNotificationCenter defaultCenter] addObserver: self selector: @ selector (moviePlayerPlaybackStateChanged :) name: MPMoviePlayerPlaybackStateDidChangeNotification object: nil];
}
-(void)moviePlayerPlaybackStateChanged:(NSNotification *)notification {
}
MPMoviePlayerViewController is for playing fullscreen video and is used mostly on the phone.
MPMoviePlayerController can be used for embedded video, ie not full screen on any of the iPads. You need to pull an empty view onto your scene in storyboard and give it the desired size. Then, in code, place the movieplayer in that subview. The first part of your code should be in viewDidLoad;
This part goes in viewWillAppear;
where videoSuper is the subview added in storyboard. Be sure to hook it up correctly;