IOS 视频播放--
[cpp] view plaincopyprint?在.h文件导入库文件
在.h文件导入库文件[cpp]
#import <MediaPlayer/MPMoviePlayerViewController.h>
#import <MediaPlayer/MPMoviePlayerViewController.h>
[cpp] view plaincopyprint?在.m实现文件中
在.m实现文件中[cpp]
NSString *path=[[NSBundle mainBundle] pathForResource:@"name" ofType:@"mp4"];
NSURL *URL = [[NSURL alloc] initFileURLWithPath:path];
MPMoviePlayerViewController *_moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:URL];
[[self GetViewController:self.view] presentMoviePlayerViewControllerAnimated:_moviePlayerController];
[_moviePlayerController.moviePlayer play];
NSString *path=[[NSBundle mainBundle] pathForResource:@"name" ofType:@"mp4"];
NSURL *URL = [[NSURL alloc] initFileURLWithPath:path];
MPMoviePlayerViewController *_moviePlayerController = [[MPMoviePlayerViewController alloc] initWithContentURL:URL];
[[self GetViewController:self.view] presentMoviePlayerViewControllerAnimated:_moviePlayerController];
[_moviePlayerController.moviePlayer play];
补充:移动开发 , IOS ,