Reputation: 5920
How can I play a video in fullscreen, preventing the controls to appear when touching video (pause, play, etc)? Instead, when video is touched, I want to close it. Can this be done?
Thanks in advance
Upvotes: 1
Views: 1838
Reputation: 61
MPMoviePlayerViewController *playerViewController=[[MPMoviePlayerViewController alloc]initWithContentURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"xyz" ofType:@"mp4"]]];
[self presentModalViewController:playerViewController animated:YES];
MpMoviePlayerController *player = [playerViewController moviePlayer];
player.controlStyle=MPMovieControlStyleNone; //hide the controls
[player play];
Upvotes: 5