PLVLivePlaybackPlayerDelegate

Objective-C

@protocol PLVLivePlaybackPlayerDelegate <NSObject>

@optional
/// 直播回放播放器 发生错误
///
/// @param livePlaybackPlayer 直播回放播放器
/// @param error 错误信息对象 (可能为nil;error.code 可详见 PLVFPlayErrorCodeGenerator.h)
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer loadMainPlayerFailureWithError:(NSError * _Nullable)error;

/// 直播回放播放器 需获知外部 ‘当前本地缓存’
///
/// @note 此回调不保证在主线程触发
///
/// @param livePlaybackPlayer 直播回放播放器
/// @param videoId 视频唯一标识,当为暂存时代表fileId,当为回放时代表vid
/// @param channelId 频道号
/// @param listType playback-回放列表,vod-点播列表; 默认普通直播场景为vod,三分屏为playback
///
/// @return PLVPlaybackVideoInfoModel 需返回 ‘当前本地缓存‘ 的数据模型
- (PLVPlaybackLocalVideoInfoModel *)plvLivePlaybackPlayerGetPlaybackCache:(PLVLivePlaybackPlayer *)livePlaybackPlayer videoId:(NSString * _Nullable)videoId channelId:(NSString * _Nullable)channelId listType:(NSString * _Nullable)listType isRecord:(BOOL)isRecord;

/// 直播回放播放器 定时返回当前播放进度
///
/// @param livePlaybackPlayer 直播回放播放器
/// @param downloadProgress 已缓存进度 (0.0 ~ 1.0)
/// @param playedProgress 已播放进度 (0.0 ~ 1.0)
/// @param playedTimeString 当前播放时间点字符串 (示例 "01:23")
/// @param durationTimeString 总时长字符串 (示例 "01:23")
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer downloadProgress:(CGFloat)downloadProgress playedProgress:(CGFloat)playedProgress playedTimeString:(NSString *)playedTimeString durationTimeString:(NSString *)durationTimeString;

/// 直播回放播放器 ‘频道信息’ 发生改变
///
/// @param livePlaybackPlayer 直播回放播放器
/// @param channelInfo 当前最新 ’频道信息‘ 对象
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer channelInfoDidUpdated:(PLVChannelInfoModel *)channelInfo;

/// 直播回放播放器 ‘视频信息’ 发生改变
///
/// @param livePlaybackPlayer 直播回放播放器
/// @param playbackVideoInfo 当前最新 ’频道信息‘ 对象
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer playbackVideoInfoDidUpdated:(PLVPlaybackVideoInfoModel *)playbackVideoInfo;

/// 直播回放播放器 ‘本地视频信息’ 发生改变
///
/// @param livePlaybackPlayer 直播回放播放器
/// @param localPlaybackVideoInfo 当前最新 ’本地频道信息‘ 对象
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer localPlaybackVideoInfoDidUpdated:(PLVPlaybackLocalVideoInfoModel *)localPlaybackVideoInfo;

/// 直播回放播放器“章节功能”开启
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer sectionEnabled:(BOOL)sectionEnabled recordEnabled:(BOOL)recordEnabled;

/// 直播回放播放器“回放列表功能”开启
- (void)plvLivePlaybackPlayer:(PLVLivePlaybackPlayer *)livePlaybackPlayer playbackListEnabled:(BOOL)playbackListEnabled vodList:(BOOL)vodList;

@end

Swift

protocol PLVLivePlaybackPlayerDelegate : NSObjectProtocol

Undocumented