I would like my video t0 start full screen, I’m calling the following method
[ mp setFullscreen: yes];
It seems like it is nt doing anything, if I comment it out the video player runs the same. When the player does run, there is a icon on the right hand side with 2 arrows, seems like pressing it puts it in full screen.
Am I doing something g wrong??
(void)viewDidLoad {
// save it in a fix file name for testing documets\ted.mp4
NSURL *url = [[NSBundle mainBundle]
URLForResource:@"FredCouplesDriv"
withExtension:@"mov"];
mp=[[MPMoviePlayerController alloc] initWithContentURL: url];
[mp.view setFrame: self.view.bounds];
[self.view addSubview: mp.view];
// Set movie player layout
[mp setControlStyle:MPMovieControlStyleEmbedded];
// set full screen
[mp setFullscreen:YES];
// May help to reduce latency
[mp prepareToPlay];
[mp play];
[mp setFullscreen:YES];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
[self.view bringSubviewToFront: mStop ];
}
Move
[mp setFullscreen:YES];toviewDidAppearand you’ll be fine