1.KRVideoPlayer框架 播放视频(适用于全屏播放)
在监听点击事件中
pod "KRVideoPlayer"
- (IBAction)playRemoteVideo:(id)sender
{// demo 中的示例代码
NSURL *videoURL = [NSURL URLWithString:@"http://krtv.qiniudn.com/150522nextapp"];
if (!self.videoController) {
CGFloat width = [UIScreen mainScreen].bounds.size.width;
CGFloat height = [UIScreen mainScreen].bounds.size.height;
self.videoController = [[KRVideoPlayerController alloc] initWithFrame:CGRectMake(0, 0, width, width*(9.0/16.0))];
__weak typeof(self)weakSelf = self;
[self.videoController setDimissCompleteBlock:^{
weakSelf.videoController = nil;
}];
[self.videoController showInWindow];
}
self.videoController.contentURL = videoURL;
}