I’m probably missing something really obvious.
I’ve included <MediaPlayer/MediaPlayer.h> and have this code:
NSURL *videoURL = [NSURL fileURLWithPath:pathToFile];
MPMoviePlayerViewController *mediaPlayer = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];
[self presentMoviePlayerViewControllerAnimated:mediaPlayer];
mediaPlayer.view.backgroundColor = [UIColor blackColor];
[mediaPlayer release];
But the video won’t play. I copied the code from another place where the video works perfectly.
pathToFile is correct becuase the variable is used in previous lines to move the video from the resources folder to the documents directory.
Any ideas why it might not be working?
Thanks
You can use following code except to presentMoviePlayerViewControllerAnimated
this works fine for me.