AliyunPlayer v6.19.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AVPDelegate> Protocol Reference

#include "AVPDelegate.h"

Inheritance diagram for <AVPDelegate>:

Instance Methods

(void) - onBufferedPositionUpdate:position:
 视频缓存位置回调
 
(void) - onCaptureScreen:image:
 获取截图回调
 
(int) - onChooseTrackIndex:info:
 选择希望播放的流
 
(void) - onCurrentDownloadSpeed:speed:
 当前下载速度回调
 
(void) - onCurrentPositionUpdate:position:
 视频当前播放位置回调
 
(void) - onCurrentUtcTimeUpdate:time:
 视频当前播放内容对应的utc时间回调
 
(void) - onError:errorModel:
 错误代理回调
 
(void) - onGetThumbnailFailed:
 获取缩略图失败回调
 
(void) - onGetThumbnailSuc:fromPos:toPos:image:
 获取缩略图成功回调
 
(void) - onLoadingProgress:progress:
 视频缓冲进度回调
 
(void) - onLocalCacheLoaded:size:
 视频当前播放缓存命中回调
 
(void) - onPlayerEvent:eventType:
 播放器事件回调
 
(void) - onPlayerEvent:eventWithString:description:
 播放器事件回调
 
(void) - onPlayerStatusChanged:oldStatus:newStatus:
 播放器状态改变回调
 
(void) - onSEIData:type:uuid:data:
 SEI回调
 
(void) - onStreamSwitchedFail:URL:errorModel:
 根据url切换清晰度流失败通知
 
(void) - onStreamSwitchedSuccess:URL:
 根据url切换清晰度流成功通知
 
(void) - onSubtitleExtAdded:trackIndex:URL:
 外挂字幕被添加
 
(void) - onSubtitleHeader:trackIndex:Header:
 字幕头信息回调,ass字幕,如果实现了此回调,则播放器不会渲染字幕,由调用者完成渲染,否则播放器自动完成字幕的渲染
 
(void) - onSubtitleHide:trackIndex:subtitleID:
 字幕隐藏回调
 
(void) - onSubtitleShow:trackIndex:subtitleID:subtitle:
 字幕显示回调
 
(void) - onSubTrackReady:info:
 获取track信息回调
 
(void) - onTrackChanged:info:
 track切换完成回调
 
(void) - onTrackReady:info:
 获取track信息回调
 
(void) - onVideoRendered:timeMs:pts:
 播放器渲染信息回调
 
(void) - onVideoSizeChanged:width:height:rotation:
 视频大小变化回调
 

Method Documentation

◆ onBufferedPositionUpdate:position:

- (void) onBufferedPositionUpdate: (AliPlayer *) player
position: (int64_t) position 
optionalrequired

视频缓存位置回调

Parameters
player播放器player指针
position视频当前缓存位置

◆ onCaptureScreen:image:

- (void) onCaptureScreen: (AliPlayer *) player
image: (AVPImage *) image 
optionalrequired

获取截图回调

Parameters
player播放器player指针
image图像
See also
AVPImage

◆ onChooseTrackIndex:info:

- (int) onChooseTrackIndex: (AliPlayer *) player
info: (NSArray< AVPTrackInfo * > *) info 
optionalrequired

选择希望播放的流

Parameters
player播放器player指针
infotrack流信息数组
See also
AVPTrackInfo

◆ onCurrentDownloadSpeed:speed:

- (void) onCurrentDownloadSpeed: (AliPlayer *) player
speed: (int64_t) speed 
optionalrequired

当前下载速度回调

Parameters
player播放器player指针
speedbits per second

◆ onCurrentPositionUpdate:position:

- (void) onCurrentPositionUpdate: (AliPlayer *) player
position: (int64_t) position 
optionalrequired

视频当前播放位置回调

Parameters
player播放器player指针
position视频当前播放位置

◆ onCurrentUtcTimeUpdate:time:

- (void) onCurrentUtcTimeUpdate: (AliPlayer *) player
time: (int64_t) time 
optionalrequired

视频当前播放内容对应的utc时间回调

Parameters
player播放器player指针
timeutc时间

◆ onError:errorModel:

- (void) onError: (AliPlayer *) player
errorModel: (AVPErrorModel *) errorModel 
optionalrequired

错误代理回调

Parameters
player播放器player指针
errorModel播放器错误描述,参考AVPErrorModel
See also
AVPErrorModel

◆ onGetThumbnailFailed:

- (void) onGetThumbnailFailed: (int64_t) positionMs
optionalrequired

获取缩略图失败回调

Parameters
positionMs指定的缩略图位置

◆ onGetThumbnailSuc:fromPos:toPos:image:

- (void) onGetThumbnailSuc: (int64_t) positionMs
fromPos: (int64_t) fromPos
toPos: (int64_t) toPos
image: (id) image 
optionalrequired

获取缩略图成功回调

Parameters
positionMs指定的缩略图位置
fromPos此缩略图的开始位置
toPos此缩略图的结束位置
image缩图略图像指针,对于mac是NSImage,iOS平台是UIImage指针

◆ onLoadingProgress:progress:

- (void) onLoadingProgress: (AliPlayer *) player
progress: (float) progress 
optionalrequired

视频缓冲进度回调

Parameters
player播放器player指针
progress缓存进度0-100

◆ onLocalCacheLoaded:size:

- (void) onLocalCacheLoaded: (AliPlayer *) player
size: (int64_t) size 
optionalrequired

视频当前播放缓存命中回调

Parameters
player播放器player指针
size文件大小

◆ onPlayerEvent:eventType:

- (void) onPlayerEvent: (AliPlayer *) player
eventType: (AVPEventType) eventType 
optional

播放器事件回调

Parameters
player播放器player指针
eventType播放器事件类型
See also
AVPEventType

◆ onPlayerEvent:eventWithString:description:

- (void) onPlayerEvent: (AliPlayer *) player
eventWithString: (AVPEventWithString) eventWithString
description: (NSString *) description 
optionalrequired

播放器事件回调

Parameters
player播放器player指针
eventWithString播放器事件类型
description播放器事件说明
See also
AVPEventType

◆ onPlayerStatusChanged:oldStatus:newStatus:

- (void) onPlayerStatusChanged: (AliPlayer *) player
oldStatus: (AVPStatus) oldStatus
newStatus: (AVPStatus) newStatus 
optionalrequired

播放器状态改变回调

Parameters
player播放器player指针
oldStatus老的播放器状态 参考AVPStatus
newStatus新的播放器状态 参考AVPStatus
See also
AVPStatus

◆ onSEIData:type:uuid:data:

- (void) onSEIData: (AliPlayer *) player
type: (int) type
uuid: (NSData *) uuid
data: (NSData *) data 
optionalrequired

SEI回调

Parameters
player播放器player指针
type类型
uuid数据(当type=5时,uuid值有效,播放器sdk 6.11.0及之后的版本新增)
data数据(不包含uuid部分,跟6.10.0及之前的版本语义保持一致)
See also
AVPImage

◆ onStreamSwitchedFail:URL:errorModel:

- (void) onStreamSwitchedFail: (AliPlayer *) player
URL: (NSString *) URL
errorModel: (AVPErrorModel *) errorModel 
optionalrequired

根据url切换清晰度流失败通知

Parameters
player播放器player指针
errorModel播放器错误描述,参考AVPErrorModel

◆ onStreamSwitchedSuccess:URL:

- (void) onStreamSwitchedSuccess: (AliPlayer *) player
URL: (NSString *) URL 
optionalrequired

根据url切换清晰度流成功通知

Parameters
player播放器player指针
url切换后的url

◆ onSubtitleExtAdded:trackIndex:URL:

- (void) onSubtitleExtAdded: (AliPlayer *) player
trackIndex: (int) trackIndex
URL: (NSString *) URL 
optionalrequired

外挂字幕被添加

Parameters
player播放器player指针
index字幕显示的索引号
URL字幕url

◆ onSubtitleHeader:trackIndex:Header:

- (void) onSubtitleHeader: (AliPlayer *) player
trackIndex: (int) trackIndex
Header: (NSString *) header 
optionalrequired

字幕头信息回调,ass字幕,如果实现了此回调,则播放器不会渲染字幕,由调用者完成渲染,否则播放器自动完成字幕的渲染

Parameters
player播放器player指针
index字幕显示的索引号
header头内容

◆ onSubtitleHide:trackIndex:subtitleID:

- (void) onSubtitleHide: (AliPlayer *) player
trackIndex: (int) trackIndex
subtitleID: (long) subtitleID 
optionalrequired

字幕隐藏回调

Parameters
player播放器player指针
trackIndex字幕流索引.
subtitleID字幕ID.

◆ onSubtitleShow:trackIndex:subtitleID:subtitle:

- (void) onSubtitleShow: (AliPlayer *) player
trackIndex: (int) trackIndex
subtitleID: (long) subtitleID
subtitle: (NSString *) subtitle 
optionalrequired

字幕显示回调

Parameters
player播放器player指针
trackIndex字幕流索引.
subtitleID字幕ID.
subtitle字幕显示的字符串

◆ onSubTrackReady:info:

- (void) onSubTrackReady: (AliPlayer *) player
info: (NSArray< AVPTrackInfo * > *) info 
optionalrequired

获取track信息回调

Parameters
player播放器player指针
infotrack流信息数组
See also
AVPTrackInfo

◆ onTrackChanged:info:

- (void) onTrackChanged: (AliPlayer *) player
info: (AVPTrackInfo *) info 
optionalrequired

track切换完成回调

Parameters
player播放器player指针
info切换后的信息 参考AVPTrackInfo
See also
AVPTrackInfo

◆ onTrackReady:info:

- (void) onTrackReady: (AliPlayer *) player
info: (NSArray< AVPTrackInfo * > *) info 
optionalrequired

获取track信息回调

Parameters
player播放器player指针
infotrack流信息数组
See also
AVPTrackInfo

◆ onVideoRendered:timeMs:pts:

- (void) onVideoRendered: (AliPlayer *) player
timeMs: (int64_t) timeMs
pts: (int64_t) pts 
optionalrequired

播放器渲染信息回调

Parameters
player播放器player指针
timeMs渲染时的系统时间
pts视频帧pts

◆ onVideoSizeChanged:width:height:rotation:

- (void) onVideoSizeChanged: (AliPlayer *) player
width: (int) width
height: (int) height
rotation: (int) rotation 
optionalrequired

视频大小变化回调

Parameters
player播放器player指针
width视频宽度
height视频高度
rotation视频旋转角度

The documentation for this protocol was generated from the following file: