MPMoviePlayerViewController是苹果提供的播放视频的控制器,可以直接从当前的控制器中推出即可。

 NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"Movie" ofType:@"m4v"];
NSURL *movieURL = [NSURL fileURLWithPath:moviePath];

MPMoviePlayerViewController *moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];


moviePlayerViewController.moviePlayer.controlStyle = MPMovieControlStyleFullscreen;

[self presentMoviePlayerViewControllerAnimated:moviePlayerViewController];



相关文章:

  • 2021-12-15
  • 2022-02-06
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-09-14
猜你喜欢
  • 2021-10-24
  • 2021-12-31
  • 2022-12-23
  • 2021-04-12
  • 2021-04-11
  • 2021-06-12
相关资源
相似解决方案