PLVVodPlayerViewController Class Reference

Inherits from UIViewController
Declared in PLVVodPlayerViewController.h

Overview

主视频播放器

  maskView

覆盖图层

@property (nonatomic, strong) UIView *maskView

Declared In

PLVVodPlayerViewController.h

  video

video 模型

@property (nonatomic, strong) PLVVodVideo *video

Declared In

PLVVodPlayerViewController.h

  quality

当前清晰度

@property (nonatomic, assign, readonly) PLVVodQuality quality

Declared In

PLVVodPlayerViewController.h

  viewerWatchDuration

用户播放时间

@property (nonatomic, assign, readonly) NSTimeInterval viewerWatchDuration

Declared In

PLVVodPlayerViewController.h

  viewerStayDuration

用户停留时间

@property (nonatomic, assign, readonly) NSTimeInterval viewerStayDuration

Declared In

PLVVodPlayerViewController.h

  viewlogExtraParams

其他 viewlog 参数,param1~param5 和 key1~key3 参数值需要 UrlSafeBase64 编码

@property (nonatomic, strong) NSDictionary<NSString*id> *viewlogExtraParams

Declared In

PLVVodPlayerViewController.h

  localPrior

本地视频优先播放,默认为 YES

@property (nonatomic, assign) BOOL localPrior

Declared In

PLVVodPlayerViewController.h

  localPlayback

是否为本地播放

@property (nonatomic, assign) BOOL localPlayback

Declared In

PLVVodPlayerViewController.h

  enableBackgroundPlayback

是否允许后台播放

@property (nonatomic, assign) BOOL enableBackgroundPlayback

Declared In

PLVVodPlayerViewController.h

  enableTeaser

是否播放片头,默认 NO

@property (nonatomic, assign) BOOL enableTeaser

Declared In

PLVVodPlayerViewController.h

  teaserState

片头播放状态

@property (nonatomic, assign, readonly) PLVVodAssetState teaserState

Declared In

PLVVodPlayerViewController.h

  enableAd

是否开启广告,默认 NO

@property (nonatomic, assign) BOOL enableAd

Declared In

PLVVodPlayerViewController.h

  adPlayer

广告播放器

@property (nonatomic, strong, readonly) PLVVodAdPlayerViewController *adPlayer

Declared In

PLVVodPlayerViewController.h

  rememberLastPosition

是否开启记忆播放位置,默认 NO

@property (nonatomic, assign) BOOL rememberLastPosition

Declared In

PLVVodPlayerViewController.h

  scalingMode

拉伸模式

@property (nonatomic, assign) PLVVodMovieScalingMode scalingMode

Declared In

PLVVodPlayerViewController.h

  routeLine

路由线路,仅对加密视频有效,传入 POVVodVideo 对象中 availableRouteLines 数组的元素

@property (nonatomic, copy) NSString *routeLine

Declared In

PLVVodPlayerViewController.h

  playerControl

播放控制

@property (nonatomic, strong) IBOutlet id<PLVVodPlayerSkinProtocol> playerControl

Declared In

PLVVodPlayerViewController.h

  gestureType

识别手势类型

@property (nonatomic, assign, readonly) PLVVodGestureType gestureType

Declared In

PLVVodPlayerViewController.h

  gestureCallback

手势识别回调

@property (nonatomic, copy) void ( ^ ) ( PLVVodPlayerViewController *player , UIGestureRecognizer *recognizer , PLVVodGestureType gestureType ) gestureCallback

Declared In

PLVVodPlayerViewController.h

  doNotReceiveGestureViews

手势识别时忽略的视图

@property (nonatomic, strong) NSArray *doNotReceiveGestureViews

Declared In

PLVVodPlayerViewController.h

  marquee

跑马灯

@property (nonatomic, strong) PLVMarquee *marquee

Declared In

PLVVodPlayerViewController.h

  autoplay

自动播放,默认 YES

@property (nonatomic, assign) BOOL autoplay

Declared In

PLVVodPlayerViewController.h

  playbackRate

播放速度

@property (nonatomic, assign) double playbackRate

Declared In

PLVVodPlayerViewController.h

  playbackVolume

播放音量

@property (nonatomic, assign) double playbackVolume

Declared In

PLVVodPlayerViewController.h

  startPlaybackTime

开始播放时间

@property (nonatomic, assign) NSTimeInterval startPlaybackTime

Declared In

PLVVodPlayerViewController.h

  currentPlaybackTime

当前播放时间

@property (nonatomic, assign) NSTimeInterval currentPlaybackTime

Declared In

PLVVodPlayerViewController.h

  duration

媒体时长

@property (nonatomic, assign, readonly) NSTimeInterval duration

Declared In

PLVVodPlayerViewController.h

  playableDuration

可播放时长

@property (nonatomic, assign, readonly) NSTimeInterval playableDuration

Declared In

PLVVodPlayerViewController.h

  preparedToPlay

是否就绪播放

@property (nonatomic, assign, readonly) BOOL preparedToPlay

Declared In

PLVVodPlayerViewController.h

  playbackState

播放状态

@property (nonatomic, assign, readonly) PLVVodPlaybackState playbackState

Declared In

PLVVodPlayerViewController.h

  loadState

加载状态

@property (nonatomic, assign, readonly) PLVVodLoadState loadState

Declared In

PLVVodPlayerViewController.h

  loadingHandler

是否正在载入回调

@property (nonatomic, copy) void ( ^ ) ( BOOL isLoading ) loadingHandler

Declared In

PLVVodPlayerViewController.h

  reachEnd

是否播放结束

@property (nonatomic, assign, readonly) BOOL reachEnd

Declared In

PLVVodPlayerViewController.h

  fullscreen

当前是否全屏

@property (nonatomic, assign, readonly) BOOL fullscreen

Declared In

PLVVodPlayerViewController.h

  playerErrorHandler

播放器错误回调

@property (nonatomic, copy) void ( ^ ) ( PLVVodPlayerViewController *player , NSError *error ) playerErrorHandler

Declared In

PLVVodPlayerViewController.h

– setVideo:quality:

指定/切换 PLVVodVideo 对象,及其清晰度

- (void)setVideo:(PLVVodVideo *)video quality:(PLVVodQuality)quality

Parameters

video

PLVVodVideo 对象

quality

清晰度

Declared In

PLVVodPlayerViewController.h

– switchQuality:

切换码率,若码率不符合则自动切换到附近的清晰度

- (void)switchQuality:(PLVVodQuality)quality

Parameters

quality

清晰度

Declared In

PLVVodPlayerViewController.h

– play

播放

- (void)play

Declared In

PLVVodPlayerViewController.h

– pause

暂停

- (void)pause

Declared In

PLVVodPlayerViewController.h

– snapshot

当前时刻的截图

- (UIImage *)snapshot

Declared In

PLVVodPlayerViewController.h

+ rotateOrientation:

旋转设备到指定方向

+ (void)rotateOrientation:(UIInterfaceOrientation)orientation

Declared In

PLVVodPlayerViewController.h

– timeDescription

时间描述

- (NSString *)timeDescription

Declared In

PLVVodPlayerViewController.h

– playPauseAction:

播放或暂停 Action

- (IBAction)playPauseAction:(UIButton *)sender

Declared In

PLVVodPlayerViewController.h

– playbackSliderTouchDownAction:

播放进度滑杆 TouchDown Action

- (IBAction)playbackSliderTouchDownAction:(UISlider *)sender

Declared In

PLVVodPlayerViewController.h

– playbackSliderValueChangeAction:

播放进度滑杆 ValueChange Action

- (IBAction)playbackSliderValueChangeAction:(UISlider *)sender

Declared In

PLVVodPlayerViewController.h

– playbackSliderTouchUpCancelAction:

播放进度滑杆 TouchUpCancel Action

- (IBAction)playbackSliderTouchUpCancelAction:(UISlider *)sender

Declared In

PLVVodPlayerViewController.h

– brightnessAction:

亮度滑杆调节 Action

- (IBAction)brightnessAction:(UISlider *)sender

Declared In

PLVVodPlayerViewController.h

– volumeAction:

音量滑杆调节 Action

- (IBAction)volumeAction:(UISlider *)sender

Declared In

PLVVodPlayerViewController.h

– addPlayerOnPlaceholderView:rootViewController:

添加播放器到占位视图上

- (void)addPlayerOnPlaceholderView:(UIView *)placeholderView rootViewController:(UIViewController *)rootViewController

Parameters

placeholderView

竖屏状态时的占位视图

rootViewController

播放器所在页面的 UIViewController 对象

Discussion

placeholderView 为竖屏时的占位视图,该视图需要先布局,播放器会参照该视图的布局而进行竖屏的布局。

Declared In

PLVVodPlayerViewController.h