QCPlayer Class Reference
Inherits from | NSObject |
---|---|
Declared in | QCPlayer.h |
playerLayerView
渲染播放视频每一帧的视频显示view,只读
@property (nonatomic, strong, readonly) UIView *playerLayerView
Declared In
QCPlayer.h
delegate
纯播放器的代理
@property (nonatomic, weak) id<QCPlayerDelegate> delegate
See Also
Declared In
QCPlayer.h
duration
当前纯播放器播放的视频的总时长,单位:毫秒
@property (nonatomic, assign, readonly) double duration
Declared In
QCPlayer.h
currentTime
当前纯播放器正在播放的视频的播放时间,单位:毫秒
@property (nonatomic, assign, readonly) double currentTime
Declared In
QCPlayer.h
state
获取纯播放器当前的状态
@property (nonatomic, assign, readonly) QCPlayerState state
Declared In
QCPlayer.h
– playWithModel:
使用基本播放原子配置当前的纯播放器
- (void)playWithModel:(QCPlayerModel *)model
Parameters
model视频 |
播放原子模型 |
---|
See Also
Declared In
QCPlayer.h
– setVolume:
设置视频播放的音量
- (void)setVolume:(NSInteger)volume
Parameters
volume |
需要设置的音量值,值为0-100 |
---|
Declared In
QCPlayer.h
– setBrightness:
设置视频亮度
- (void)setBrightness:(float)percentage
Parameters
percentage |
视频亮度的百分比,值为0-1 |
---|
Declared In
QCPlayer.h
– enableHWCodec:
是否开启视频硬件加速 默认值 NO
- (void)enableHWCodec:(BOOL)enable
Parameters
enable |
是否开启硬件加速 |
---|
Declared In
QCPlayer.h
– seekToTime:completionHandler:
从定位的位置点开始播放视频,可以设置回调函数当定位完成后进行相应的操作
- (void)seekToTime:(NSInteger)dragedSeconds completionHandler:(void ( ^ ) ( ))completionHandler
Parameters
dragedSeconds |
需要定位的位置点 |
---|---|
completionHandler |
定位完成后会触发该回调 |
Declared In
QCPlayer.h
– changeVolume:
更改当前视频的音量
- (void)changeVolume:(CGFloat)value
Parameters
value |
音量值 |
---|
Declared In
QCPlayer.h
– changeHeader:
自定义视频请求地址的请求头
- (void)changeHeader:(NSString *)value
Parameters
value |
自定义请求头 |
---|
Declared In
QCPlayer.h
– switchResolutionPlayerWithIndex:
根据索引切换相应的分辨率进行播放 多分辨率时该方法可用 如果索引超过设置的多分辨率数组长度,无效果
- (void)switchResolutionPlayerWithIndex:(NSInteger)index
Parameters
index |
想要切换进行播放的分辨率索引 |
---|
Declared In
QCPlayer.h
– getCurrentResolutionPlayerIndex
当前正在播放的分辨率索引
- (NSInteger)getCurrentResolutionPlayerIndex
Declared In
QCPlayer.h