Rui
Rui

Reputation: 5920

Playback video without controls

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

Answers (1)

tariq Shaikh
tariq Shaikh

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

Related Questions