ios html zfplayer,CodeXCode

c78df6c28f55e1ebdd4e79232d215b2a.png

ZFPlayer.svg

ZFPlayer.svg?style=flat

ZFPlayer.svg?maxAge=2592000

ZFPlayer.svg?maxAge=2592000

ZFPlayer.svg?style=flat

weibo-@%E4%BB%BB%E5%AD%90%E4%B8%B0-yellow.svg?style=flat

Before this, you used ZFPlayer, are you worried about encapsulating avplayer instead of using or modifying the source code to support other players, the control layer is not easy to customize, and so on? In order to solve these problems, I have wrote this player template, for player SDK you can conform the ZFPlayerMediaPlayback protocol, for control view you can conform the ZFPlayerMediaControl protocol, can custom the player and control view.

332dab006deaa837170b987ea5f5875f.png

🔨 Requirements

iOS 7+

Xcode 8+

📲 Installation

ZFPlayer is available through CocoaPods. To install it,use player template simply add the following line to your Podfile:

pod 'ZFPlayer', '~> 4.0'

Use default controlView simply add the following line to your Podfile:

pod 'ZFPlayer/ControlView', '~> 4.0'

Use AVPlayer simply add the following line to your Podfile:

pod 'ZFPlayer/AVPlayer', '~> 4.0'

Use ijkplayer simply add the following line to your Podfile:

pod 'ZFPlayer/ijkplayer', '~> 4.0'

🐒 Usage

ZFPlayerController

Main classes,normal style initialization and list style initialization (tableView, collection,scrollView)

Normal style initialization

ZFPlayerController *player = [ZFPlayerController playerWithPlayerManager:playerManager containerView:containerView];

ZFPlayerController *player = [[ZFPlayerController alloc] initwithPlayerManager:playerManager containerView:containerView];

List style initialization

ZFPlayerController *player = [ZFPlayerController playerWithScrollView:tableView playerManager:playerManager containerViewTag:containerViewTag];

ZFPlayerController *player = [ZFPlayerController alloc] initWithScrollView:tableView playerManager:playerManager containerViewTag:containerViewTag];

ZFPlayerController *player = [ZFPlayerController playerWithScrollView:scrollView playerManager:playerManager containerView:containerView];

ZFPlayerController *player = [ZFPlayerController alloc] initWithScrollView:tableView playerManager:playerManager containerView:containerView];

ZFPlayerMediaPlayback

For the playerMnager,you must conform ZFPlayerMediaPlayback protocol,custom playermanager can supports any player SDK,such as AVPlayer,MPMoviePlayerController,ijkplayer,vlc,PLPlayerKit,KSYMediaPlayerand so on,you can reference the ZFAVPlayerManagerclass.

Class *playerManager = ...;

ZFPlayerMediaControl

This class is used to display the control layer, and you must conform the ZFPlayerMediaControl protocol, you can reference the ZFPlayerControlView class.

UIView *controlView = ...;

player.controlView = controlView;

📷 Screenshots

d998ae21e21a4cb1a535710e0da701db.png

👨🏻‍💻 Author

Weibo: @任子丰

QQ群: 123449304

❤️ Contributors

🙋🏻‍♂️🙋🏻‍♀️寻求志同道合的小伙伴

现寻求志同道合的小伙伴一起维护此框架,有兴趣的小伙伴可以发邮件给我,非常感谢!

如果一切OK,我将开放框架维护权限(github、pod等)

💰 打赏作者

如果ZFPlayer在开发中有帮助到你、如果你需要技术支持或者你需要定制功能,都可以拼命打赏我!

👮🏻 License

ZFPlayer is available under the MIT license. See the LICENSE file for more info.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值