无需控制即可播放视频

时间:2013-04-03 11:42:24

标签: ios objective-c video media-player

如何全屏播放视频,阻止在触摸视频时显示控件(暂停,播放等)?相反,当触摸视频时,我想关闭它。 可以这样做吗?

提前致谢

1 个答案:

答案 0 :(得分:5)

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];