I have the following code to play a video when a button is pushed in my app
It played just fine until I upgraded my iPhone to iOS4. Now the audio will play, but not the video. Is there a reason for this?
Code:
- (IBAction)play {
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"mom" ofType:@"mp4"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *theMovie = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];
theMovie.scalingMode = MPMovieScalingModeAspectFill;
[theMovie play];
}