Skip to content

Keanyuan/QPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b47a696 · Aug 19, 2016

History

5 Commits
Aug 19, 2016
Aug 19, 2016
Aug 18, 2016
Aug 18, 2016
Aug 18, 2016
Aug 18, 2016
Aug 18, 2016

Repository files navigation

QPlayer

基于MPMoviePlayerController 视频播放器 可修改声音 亮度 (快进注释掉了) 支持大屏小屏播放

//核心代码

  • (void)playVideoWithURL:(NSURL *)url titleLabelTitlte:(NSString *)title{ if (!self.videoController) { self.videoController = [[QVideoPlayerViewController alloc] initWithFrame:self.imageView.bounds titleLabelTitlte:title]; __weak typeof(self)weakSelf = self; [weakSelf.videoController setDimissCompleteBlock:^{ [weakSelf.videoController dismiss]; weakSelf.videoController = nil; }]; [self.videoController setWillBackOrientationPortrait:^{ if (weakSelf.playerVeiwBackOrientationPortrait) { weakSelf.playerVeiwBackOrientationPortrait(); } }];

[self.videoController setWillChangeToFullscreenMode:^{ if (weakSelf.playerVeiwChangeToFullscreenMode) { weakSelf.playerVeiwChangeToFullscreenMode(); } }]; } self.videoController.contentURL = url;

}

//停止视频的播放

  • (void)reset { [self.videoController dismiss]; self.videoController = nil; }

About

MPMoviePlayerController

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published