QCPlayerView Class Reference
Inherits from | UIView |
---|---|
Declared in | QCPlayerView.h |
delegate
播放器视图的代理属性
@property (nonatomic, weak) id<QCPlayerviewDelegate> delegate
See Also
Declared In
QCPlayerView.h
locked
锁定或解锁该播放器视图 如果已被锁定,则任何界面的点击操作都无效,需要先解锁
@property (assign, nonatomic) BOOL locked
Declared In
QCPlayerView.h
playerLayerView
当前的播放器视图里的视频视图
@property (nonatomic, weak) UIView *playerLayerView
Declared In
QCPlayerView.h
– setMediaController:
可定制的播放器控制视图层 用户可自定义自己的播放器控制视图,但需要继承QCMediaControlView,并实现相应的代理 如果没有设置,默认使用青云自定义的控制器QCCustomMediaControlView 如果用户只想显示视频视图,不需要任何的控制器,可以传空
- (void)setMediaController:(QCMediaControlView *)mediaController
See Also
QCMediaControlView, QCCustomMediaControlView
Declared In
QCPlayerView.h
– playWithModel:
可以根据用户情况,配置一个视频原子对象进行播放
- (void)playWithModel:(QCPlayerModel *)model
See Also
Declared In
QCPlayerView.h
– getPlayer
获取当前播放器视图使用的纯播放器 可以通过该方法获取到纯播放器后对播放器进行控制操作
- (QCPlayer *)getPlayer
Declared In
QCPlayerView.h
– setPlayerLayerView:
自定义设置播放器视图的视频视图
- (void)setPlayerLayerView:(UIView *)playerLayerView
Parameters
playerLayerView |
纯视频视图 |
---|
Declared In
QCPlayerView.h
+ videoPlayerWithView:playerModel:delegate:
直接创建带控制界面的视频播放视图类
+ (instancetype)videoPlayerWithView:(UIView *)view playerModel:(QCPlayerModel *)playerModel delegate:(id<QCPlayerviewDelegate>)delegate
Parameters
view |
纯视频视图view,可由用户定义位置后传入 |
---|---|
playerModel |
视频原子对象 |
delegate |
播放器视图代理 |
See Also
Declared In
QCPlayerView.h
– initWithFrame:playerModel:playerConfig:
初始化一个视频播放器视图类,可定义该视图的尺寸
- (instancetype)initWithFrame:(CGRect)frame playerModel:(QCPlayerModel *)playerModel playerConfig:(QCPlayerConfig *)playerConfig
Parameters
frame |
自定义视频播放器的尺寸 |
---|---|
playerModel |
视频原子对象 |
playerConfig |
视频播放器初始化配置参数,如果传空,会使用默认配置 |
See Also
Declared In
QCPlayerView.h
– shrinkOrFullScreen:
切换全屏或保持原尺寸
- (void)shrinkOrFullScreen:(BOOL)isFull
Parameters
isFull |
是否切换为全屏 |
---|
Declared In
QCPlayerView.h
– setPlayerConfig:
设置视频播放器配置参数
- (void)setPlayerConfig:(QCPlayerConfig *)playerConfig
Parameters
playerConfig |
视频播放器初始化配置参数,如未设置,使用默认配置 |
---|
See Also
Declared In
QCPlayerView.h