AliyunIPlayerCallback

@protocol AliyunIPlayerCallback <NSObject>

播放器回调协议

  • 播放结束

    Declaration

    Objective-C

    - (void)playerDidEnd;
  • 播放进度

    Declaration

    Objective-C

    - (void)playProgress:(double)playSec streamProgress:(double)streamSec;

    Parameters

    playSec

    播放时间

    streamSec

    播放流时间

  • 播放异常

    Declaration

    Objective-C

    - (void)playError:(int)errorCode;

    Parameters

    errorCode

    错误码 状态错误 ALIVC_FRAMEWORK_MEDIA_POOL_WRONG_STATE DEMUXER重复创建 ALIVC_FRAMEWORK_DEMUXER_INIT_MULTI_TIMES DEMUXER打开失败 ALIVC_FRAMEWORK_DEMUXER_OPEN_FILE_FAILED DEMUXER获取流信息失败 ALIVC_FRAMEWORK_DEMUXER_FIND_STREAM_INFO_FAILED 解码器创建失败 ALIVC_FRAMEWORK_AUDIO_DECODER_CREATE_DECODER_FAILED 解码器状态错误 ALIVC_FRAMEWORK_AUDIO_DECODER_ERROR_STATE 解码器输入错误 ALIVC_FRAMEWORK_AUDIO_DECODER_ERROR_INPUT 解码器参数SPSPPS为空 ALIVC_FRAMEWORK_VIDEO_DECODER_SPS_PPS_NULL, 解码H264参数创建失败 ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_H264_PARAM_SET_FAILED 解码HEVC参数创建失败 ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_HEVC_PARAM_SET_FAILED 缓存数据已满 ALIVC_FRAMEWORK_MEDIA_POOL_CACHE_DATA_SIZE_OVERFLOW 解码器内部返回错误码

It is not recommended to use the following methods.

  • Deprecated

    deprecated

    seek结束

    Declaration

    Objective-C

    - (void)seekDidEnd;
  • Deprecated

    deprecated

    开始播放 已废弃

    Declaration

    Objective-C

    - (void)playerDidStart;
  • 播放进度

    Declaration

    Objective-C

    - (void)playProgress:(double)sec;

    Parameters

    sec

    单位:s