spstore / spvideoplayer Goto Github PK
View Code? Open in Web Editor NEW一款用Object-C语言编写的视频播放器框架
一款用Object-C语言编写的视频播放器框架
static UIView *buttonView = nil;这行代码有问题,
static声明的变量 直到程序退出才会回收内存,这就会导致一个bug,切换清晰度之后,重新进入播放器,切换清晰度,buttonView高亮状态的按钮有两个。
这里改成SPVideoPlayerControlView控制的全局变量会更好一些
创建是这样创建的
(SPVideoPlayerView *)playerView {
if (!_playerView) {
_playerView = [[SPVideoPlayerView alloc] init];
// 这一步非常重要,这一步相当于设置了控制层和视频模型,如果控制层传nil,则默认自带的的控制层
[_playerView configureControlView:nil videoItem:self.videoItem];
// 如果有多个视频需要播放,如电视剧有很多集,则用这个方法
//[_playerView configureControlView:nil videoItems:self.videoItems];
// 设置代理
_playerView.delegate = self;
// 打开下载功能(默认没有这个功能)
_playerView.hasDownload = NO;
// 打开预览图,默认是打开的
_playerView.requirePreviewView = NO;
}
return _playerView;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.