Code Monkey home page Code Monkey logo

videoplayer's Introduction

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"/> 这一行即可。

videoplayer's People

Contributors

jiaoyingbo avatar

Stargazers

 avatar lieon avatar 一禅小和尚 avatar kims avatar Sebastian Barajas avatar  avatar 李友富 avatar  avatar

Watchers

wangxinkai avatar Valkyrie 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.