Latest 1.0.2
Homepage https://github.com/zhiyongzou/ZYVideoPlayView
License MIT
Platforms ios 7.0, requires ARC
Authors

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

ZYVideoPlayView

Latest podspec

{
    "name": "ZYVideoPlayView",
    "version": "1.0.2",
    "summary": "ZYVideoPlayView is a new implementation based on AVPlayer. Support MP4 and m3u8",
    "homepage": "https://github.com/zhiyongzou/ZYVideoPlayView",
    "license": "MIT",
    "authors": {
        "zzyong": ""
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/zhiyongzou/ZYVideoPlayView.git",
        "tag": "1.0.2"
    },
    "ios": {
        "source_files": "ZYVideoPlayView/*.{h,m}",
        "frameworks": "AVFoundation"
    },
    "requires_arc": true
}

Pin It on Pinterest

Share This