Skip to content

JiaoYingBo/VideoPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VideoPlayer

###视频播放器 此视频播放器是基于AVPlayer封装的,支持播放、暂停、拖动快进快退、缓冲进度、全屏播放。

###使用方法 播放器初始化:

self.playerView = [PlayerView viewWithFrame:CGRectMake(0, 0, 320, 200)];
self.playerView.delegate = self;
self.playerView.urlString = @"http://xxxvideo.mp4";
[self.view addSubview:self.playerView]; 

要切换视频源,只需要修改urlString

- (IBAction)video2:(id)sender {
    self.playerView.urlString = @"http://xxxvideo.mp4";
}

####播放界面如下:

###注意 如果用Xcode7运行报错:The document "(null)" requires Xcode 8.0 or later. 右键报错的StoryBoardXib文件__-->Open As-->Source Code__,删除 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> 这一行即可。

About

视频播放器

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published