I have implementing uITabbar application in whic开发者_开发问答h 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.
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];
精彩评论