Reputation: 971
I have implementing uITabbar application in which i want to play video file.Video file is playing but not seen.And simulator is Landscapmode bu MPMoviePlayer in Potrait mode.How to solve this problem.
Upvotes: 1
Views: 1000
Reputation: 2592
Try to play the mp4 format.Because MPMoviePlayer Controller does not support many formats like avi.Here is the code which i implement.Hope it will help you and download any mp4 video file to play.
NSString *soundFilePath = [[NSBundle mainBundle]pathForResource:@"SoundFileName" ofType:@"mp4"];
//NSURL *fileURL = [[NSURL alloc] initFileURLWithPath: soundFilePath];
NSURL *fileURL=[[NSURL fileURLWithPath:soundFilePath]retain];
player = [[MPMoviePlayerController alloc] initWithContentURL:fileURL];
[fileURL release];
[player play];
Upvotes: 1