CXPlayer
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor whiteColor];
UIView *showPlayerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
showPlayerView.backgroundColor = [UIColor blackColor];
[self.view addSubview:showPlayerView];
[self.playerManager playWithUrl:@"http://vfx.mtime.cn/Video/2019/05/07/mp4/190507094456874251.mp4" inView:showPlayerView];
[self.playerManager seekToTimePlay:14];
}
- (CXPlayerManager *)playerManager {
if (!_playerManager) {
_playerManager = [[CXPlayerManager alloc] init];
_playerManager.disMissBlock = self.disMissBlock;
_playerManager.shareBlock = self.shareBlock;
_playerManager.playerStatusBlock = self.playerStatusBlock;
}
return _playerManager;
}
安装
CXPlayer 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile
pod 'CXPlayer'
作者
caixiang305621856, [email protected]
许可证
CXPlayer 在 MIT 许可证下提供。有关更多信息,请参阅 LICENSE 文件。