Giter Club home page Giter Club logo

anjoe / abbplayerkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sunshinealise/abbplayerkit

0.0 2.0 0.0 2.25 MB

实现功能 :播放视频 ,后台下载 (真机调试功能正常)1、使用ZFPlayer播放视频(可以在线和本地播放,基于AVPlayer,调节音量和屏幕亮度)2、使用WHCNetWorkKit 实现下载,后台下载(下载进度,下载百分比,文件大小,下载状态)Function: Play video, background downloading (device debugging function is normal) 1, using ZFPlayer play video (online and local playback) 2 Use WHCNetWorkKit Implementation, background downloading

License: MIT License

Objective-C 99.96% Ruby 0.04%

abbplayerkit's Introduction

ABBPlayerKit

playing and downloading

     实现功能 :播放视频 ,后台下载 (真机调试功能正常)1、使用ZFPlayer播放视频
    (可以在线和本地播放,基于AVPlayer,播放格式:支持XVID/DIVX编码AVI,WMV,RMVB,ASF,H264,MKV等格式,同时支持SMI, SRT字幕)
    2、使用WHCNetWorkKit 实现下载,后台下载(一直保持下载)
    Function: Play video, background downloading (device debugging function is normal)
    1, using ZFPlayer play video (online and local playback) 
    2 Use WHCNetWorkKit Implementation, background downloading

实现功能 :播放视频 后台下载

1、使用 ZFPlayer 播放视频(可以在线和本地播放)

2、使用WHCNetWorkKit 下载,后台下载

3、使用Realm 存储下载列表信息数据(功能待添加,可自己添加pod库,功能强大简介高效)

设置

CocoaPods 命令使用:

    $ cd /Users/wangzz/Desktop/CocoaPodsTest  
    $ touch Podfile  
    $ vim Podfile 

添加库

    pod 'Masonry'  (约束库)
    pod 'SDWebImage'  
    pod 'FDFullscreenPopGesture'
    pod 'WHCNetWorkKit' (下载库)
    //拖入ZFPlayer文件到项目中  (播放器)
    $ pod install --verbose --no-repo-update
    或者
    $ pod update --verbose --no-repo-update

项目设置

    1、项目(General) - Capabilities - Background Modes 开启(ON),Background fetch

    //添加_sqlite3.tbd 依赖(项目中导入了数据库操作库)

功能代码 (下载demo)

注意事项:

    1、播放音视频的demo设置全局断点All Exceptions 会导致(Xcode异常:0 __cxa_throw) libc++abi.dylib`__cxa_throw:0x10df1bc6b <+0>: pushq %rbp,........
    (但是不是崩溃,不连接xcode运行不会崩溃,连接xcode运行时就会停顿在这里),是因为添加了全局断点:All Exceptions,但是没有设置oc!

Exceptions

    2、播放界面不能横屏适配时,查看项目是否禁止横屏,否则需要强制设置该控制器横屏

    3、重新运行导致崩溃:

LaunchServicesError 解决办法: 第1种方法.点击当前的模拟器,点击IOS Simulator->Reset Content and Settings...->Reset,然后会重置模拟器,再编译代码可登录模拟器成功 第2种方法.点击Xcode->Product->Clean 第3种方法.将模拟器上的当前运行的app删除,再重新加载(长按模拟器的屏幕,点击当前报错的app 删除) 第4种方法.在info.plist文件中修改bundle的版本号 我遇到的问题是上述几种方法只能暂时解决,当我一修改代码时,又重新报错,然后我把我项目里的那个Resources(就是存储图片的那个包)给删除了,然后重新建分组,但是资源包的名字不叫Resources,然后重新clean,结果问题解决了,我想原因可能是我的Resources与Xcode里冲突了,然后Xcode不能打包app到模拟器上吧​ 一般来说,手动删除了模拟器沙盒里面的文件夹,可能会出现这样的问题,最快捷有效的方法是重新设置模拟器,而不是重启模拟器。。。

##运行效果

ZFPlayer播放展示图

Picture effect

Sound adjustment demonstration

Brightness adjustment demonstration

Progress adjustment demonstration

WHCNetWorkKit下载展示图

abbplayerkit's People

Contributors

techsay avatar teaold avatar litao-leven avatar

Watchers

James Cloos 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.