CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

ZYVideoPlayView 1.0.2

ZYVideoPlayView 1.0.2

Maintained by zhiyongzou.



  • By
  • zzyong

ZYVideoPlayView

ZYVideoPlayView is a new implementation based on AVPlayer. Support MP4 and m3u8

Example

//add videoPlayView where you want to add
ZYVideoPlayView *videoPlayView = [[ZYVideoPlayView alloc] init];
videoPlayView.frame = CGRectMake(0, 0, 320, 180);
videoPlayView.delegate = self;
videoPlayView.videoURL = [NSURL URLWithString:@"http://www.xxx.com/xxx/xxx.mp4"];
[self.view addSubview:videoPlayView];
//...

//you can get video status from these delegate methods

#pragma mark - ZYVideoPlayViewDelegate

- (void)zy_videoPlayViewReadyToPlay:(ZYVideoPlayView *)videoPlayView
{
    //you can paly video in this method
}

- (void)zy_videoPlayView:(ZYVideoPlayView *)videoPlayView didUpdateCurrentTime:(NSTimeInterval)currenttime
{
    //update video current time (slider..)
}

//other delegate methods...

@end

Usage

1. Manual

  1. Add ZYVideoPlayView.h and ZYVideoPlayView.m to your project.
  2. #import "ZYVideoPlayView.h" where you want to add

2. CocoaPods

Add this to your podfile and run pod install to install:

pod 'ZYVideoPlayView'

Demo Preview