视频播放器 ZFPlayer

码农软件 · 软件分类 · 视频(Video) · 2019-07-09 15:57:33

软件介绍

ZFPlayer是一款基于AVPlayer,支持横屏、竖屏(全屏播放还可锁定屏幕方向),上下滑动调节音量、屏幕亮度,左右滑动调节播放进度的视频播放器软件。

功能:

  • 支持横、竖屏切换,在全屏播放模式下还可以锁定屏幕方向

  • 支持本地视频、网络视频播放

  • 左侧1/2位置上下滑动调节屏幕亮度(模拟器调不了亮度,请在真机调试)

  • 右侧1/2位置上下滑动调节音量(模拟器调不了音量,请在真机调试)

  • 左右滑动调节播放进度

用法(支持IB和代码)

IB用法

直接拖UIView到IB上,宽高比为16:9,代码部分只需要实现

self.playerView.videoURL = self.videoURL;
// 返回按钮事件
__weak typeof(self) weakSelf = self;
self.playerView.goBackBlock = ^{
    [weakSelf.navigationController popViewControllerAnimated:YES];
};
代码实现(Masonry)用法
self.playerView = [ZFPlayerView setupZFPlayer];
[self.view addSubview:self.playerView];
[self.playerView mas_makeConstraints:^(MASConstraintMaker *make) {
    make.left.top.right.equalTo(self.view);
    make.height.equalTo(self.playerView.mas_width).multipliedBy(9.0f/16.0f);
}];
self.playerView.videoURL = self.videoURL;// 返回按钮事件__weak typeof(self) weakSelf = self;
self.playerView.goBackBlock = ^{
    [weakSelf.navigationController popViewControllerAnimated:YES];
};

图片效果演示

图片效果演示声音调节演示亮度调节演示


本文地址:https://www.codercto.com/soft/d/9764.html

Programming Amazon Web Services

Programming Amazon Web Services

James Murty / O'Reilly Media / 2008-3-25 / USD 49.99

Building on the success of its storefront and fulfillment services, Amazon now allows businesses to "rent" computing power, data storage and bandwidth on its vast network platform. This book demonstra......一起来看看 《Programming Amazon Web Services》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具