AliyunIPlayerCallback
@protocol AliyunIPlayerCallback <NSObject>
* The protocol of player callbacks.
-
* The callback when playback ends.
Declaration
Objective-C
- (void)playerDidEnd;
-
* The callback that outputs the playback progress.
Declaration
Objective-C
- (void)playProgress:(double)playSec streamProgress:(double)streamSec;
Parameters
playSec
The position on the playback timeline.
streamSec
The position on the video stream.
-
* The callback when an error occurs.
Declaration
Objective-C
- (void)playError:(int)errorCode;
Parameters
errorCode
The error code. ALIVC_FRAMEWORK_MEDIA_POOL_WRONG_STATE indicates that the player’s state is incorrect. ALIVC_FRAMEWORK_DEMUXER_INIT_MULTI_TIMES indicates that DEMUXER is initialized multiple times. ALIVC_FRAMEWORK_DEMUXER_OPEN_FILE_FAILED indicates that an error occurred while starting DEMUXER. ALIVC_FRAMEWORK_DEMUXER_FIND_STREAM_INFO_FAILED indicates that DEMUXER failed to obtain stream information. ALIVC_FRAMEWORK_AUDIO_DECODER_CREATE_DECODER_FAILED indicates that an error occurred while creating the decoder. ALIVC_FRAMEWORK_AUDIO_DECODER_ERROR_STATE indicates that the decoder state is incorrect. ALIVC_FRAMEWORK_AUDIO_DECODER_ERROR_INPUT indicates that the decoder input is incorrect. ALIVC_FRAMEWORK_VIDEO_DECODER_SPS_PPS_NULL indicates that the SPSPPS parameter of the decoder is null. ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_H264_PARAM_SET_FAILED indicates that an error occurred while creating H264 decoding parameters. ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_HEVC_PARAM_SET_FAILED indicates that an error occurred while creating HEVC decoding parameters. ALIVC_FRAMEWORK_MEDIA_POOL_CACHE_DATA_SIZE_OVERFLOW indicates that the cache memory is full.
-
Deprecated
deprecated
* The callback when the execution of seek completes.
Declaration
Objective-C
- (void)seekDidEnd;
-
Deprecated
deprecated
* The callback when playback is started. Deprecated.
Declaration
Objective-C
- (void)playerDidStart;
-
* The callback that outputs the playback progress.
Declaration
Objective-C
- (void)playProgress:(double)sec;
Parameters
sec
Unit: seconds.