AliyunPlayer  v4.7.1
Aliyun Player API Reference Manual for iOS Platforms
AliMediaDownloader Class Reference
Inheritance diagram for AliMediaDownloader:

Instance Methods

(void) - deleteFile
 Delete the downloaded file. More...
 
(void) - destroy
 Delete the download object. More...
 
(AVDConfig *) - getConfig
 Query download config. More...
 
(instancetype) - init
 Intialize the download object. More...
 
(void) - prepareWithPlayAuth:
 Use AVPVidAuthSource to prepare for playback. More...
 
(void) - prepareWithVid:
 Use AVPVidStsSource to prepare for playback. More...
 
(void) - selectTrack:
 Specify the indexes of the tracks to be downloaded. More...
 
(void) - setConfig:
 Modify download config. More...
 
(void) - setPlayUrlConvertCallback:
 Set a URL conversion callback. More...
 
(void) - setSaveDirectory:
 Set a path to save the downloaded file. More...
 
(void) - start
 Start downloading. More...
 
(void) - stop
 Pause downloading. More...
 
(void) - updateWithPlayAuth:
 Update the AVPVidAuthSource information when the authentication expires. More...
 
(void) - updateWithVid:
 Update the AVPVidStsSource information when the authentication expires. More...
 

Class Methods

(int) + deleteFile:vid:format:index:
 Delete a downloaded file. More...
 
(NSString *) + getSDKVersion
 Query the SDK version. More...
 

Properties

id< AMDDelegatedelegate
 Set a proxy. More...
 
NSString * downloadedFilePath
 Query the path of the downloaded file. More...
 
BOOL enableLog
 Enable or disable logging. More...
 

Method Documentation

◆ deleteFile()

- (void) deleteFile

Delete the downloaded file.

◆ deleteFile:vid:format:index:()

+ (int) deleteFile: (NSString *)  saveDir
vid: (NSString *)  vid
format: (NSString *)  format
index: (int)  index 

Delete a downloaded file.

Parameters
saveDirThe path where the file is saved.
vidVID.
formatFormat.
indexThe download index corresponds to the VID.

◆ destroy()

- (void) destroy

Delete the download object.

◆ getConfig()

- (AVDConfig*) getConfig

Query download config.

◆ getSDKVersion()

+ (NSString*) getSDKVersion

Query the SDK version.

◆ init()

- (instancetype) init

Intialize the download object.

◆ prepareWithPlayAuth:()

- (void) prepareWithPlayAuth: (AVPVidAuthSource *)  source

Use AVPVidAuthSource to prepare for playback.

Parameters
sourcevid Play the media through playAuth.

◆ prepareWithVid:()

- (void) prepareWithVid: (AVPVidStsSource *)  source

Use AVPVidStsSource to prepare for playback.

Parameters
sourcevid Play the media through VidSts.

◆ selectTrack:()

- (void) selectTrack: (int)  trackIndex

Specify the indexes of the tracks to be downloaded.

Parameters
trackIndexUse the prepare callback to retrieve all track indexes.

◆ setConfig:()

- (void) setConfig: (AVDConfig *)  config

Modify download config.

◆ setPlayUrlConvertCallback:()

- (void) setPlayUrlConvertCallback: (PlayURLConverCallback callback

Set a URL conversion callback.

URL conversion is typically used in P2P broadcasting.

Parameters
callbackThe function pointer of the callback.

◆ setSaveDirectory:()

- (void) setSaveDirectory: (NSString *)  dir

Set a path to save the downloaded file.

Parameters
dirThe specified path.

◆ start()

- (void) start

Start downloading.

◆ stop()

- (void) stop

Pause downloading.

◆ updateWithPlayAuth:()

- (void) updateWithPlayAuth: (AVPVidAuthSource *)  source

Update the AVPVidAuthSource information when the authentication expires.

Parameters
sourcevid Authentication information.

◆ updateWithVid:()

- (void) updateWithVid: (AVPVidStsSource *)  source

Update the AVPVidStsSource information when the authentication expires.

Parameters
sourcevid STS information.

Property Documentation

◆ delegate

- (id<AMDDelegate>) delegate
readwritenonatomicweak

Set a proxy.

See AMDDelegate.

◆ downloadedFilePath

- (NSString*) downloadedFilePath
readnonatomicassign

Query the path of the downloaded file.

◆ enableLog

- (BOOL) enableLog
readwritenonatomicassign

Enable or disable logging.


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