Git Product home page Git Product logo

hbvideoplayer's Introduction

LYVideoPlayer

基于AVPlayer封装视频播放器(具有边下边播、离线缓存、自定义滑块、进度条、手势快进快退、手势加减音量等功能)

###实现的效果:

播放器播放效果.gif

自定义滑块2.png

自定义滑块3.png

###使用方法

1.记得在你的pch文件里导入LVVideoPlayer的头文件LYPlayerHeader.h

2.播放器的实例化,即如下两步就可现实视频的播放

    self.videoPlayer = [[LYVideoPlayer alloc] init];
    [self.videoPlayer playWithUrl:self.videoUrl showView:self.view];

如需获得返回按钮和全屏播放按钮的回调,则需遵循协议,并设置代理

    self.videoPlayer.delegate = self;

3.滑块的自定义 - 在实例化LYSlider的时候传入设置相应属性的值就可自定义自己想要的效果

    [_videoSlider setThumbImage:normalImage forState:UIControlStateNormal];//可设置滑块默认状态下的图片
    [_videoSlider setThumbImage:highlightImage forState:UIControlStateHighlighted];//可设置滑块高亮状态下的图片
    _videoSlider.trackHeight = 1.5;//设置轨道的高度
    _videoSlider.thumbVisibleSize = 12;//设置滑块(可见的)大小
```

hbvideoplayer's People

Contributors

smilekh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.