AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
<AMDDelegate> Protocol Reference

The delegate protocol for the downloader. More...

#include "AMDDelegate.h"

Inheritance diagram for <AMDDelegate>:

Instance Methods

(void) - onCompletion:
 Callback for download completion.
(void) - onDownloadingProgress:percentage:
 Callback for download progress.
(void) - onError:errorModel:
 Callback for error events.
(void) - onPrepared:mediaInfo:
 Callback for when download preparation is complete.
(void) - onProcessingProgress:percentage:
 Callback for downloaded file processing progress.

Detailed Description

The delegate protocol for the downloader.

This protocol defines callbacks for receiving key events from the downloader during the download process, including preparation completion, progress updates, processing progress, completion, and errors.

Method Documentation

◆ onCompletion:

- (void) onCompletion: (AliMediaDownloader *) downloader
optionalrequired

Callback for download completion.

This method is called when the entire download and any subsequent processing are successfully completed.

Parameters
downloaderThe AliMediaDownloader instance that triggered the callback.

◆ onDownloadingProgress:percentage:

- (void) onDownloadingProgress: (AliMediaDownloader *) downloader
percentage: (int) percent 
optionalrequired

Callback for download progress.

During the file download process, this method is called periodically to update the download progress.

Parameters
downloaderThe AliMediaDownloader instance that triggered the callback.
percentThe current download progress percentage, with a value range of 0-100.

◆ onError:errorModel:

- (void) onError: (AliMediaDownloader *) downloader
errorModel: (AVPErrorModel *) errorModel 
optionalrequired

Callback for error events.

This method is called when an error occurs at any stage of the download process.

Parameters
downloaderThe AliMediaDownloader instance that triggered the callback.
errorModelAn error description model containing a detailed error code and message.
See also
AVPErrorModel

◆ onPrepared:mediaInfo:

- (void) onPrepared: (AliMediaDownloader *) downloader
mediaInfo: (AVPMediaInfo *) info 
optional

Callback for when download preparation is complete.

This method is called after the downloader has finished preparing the media resource. At this point, media-related information can be retrieved.

Parameters
downloaderThe AliMediaDownloader instance that triggered the callback.
infoThe media information object.
See also
AVPMediaInfo

◆ onProcessingProgress:percentage:

- (void) onProcessingProgress: (AliMediaDownloader *) downloader
percentage: (int) percent 
optionalrequired

Callback for downloaded file processing progress.

This method is used to report the progress of processing.

Parameters
downloaderThe AliMediaDownloader instance that triggered the callback.
percentThe current file processing progress percentage, with a value range of 0-100.

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