AliyunPlayer v7.7.0
Aliyun Player API Reference Manual for iOS Platforms
Loading...
Searching...
No Matches
AliMediaLoaderV2 Class Reference

#include "AliMediaLoaderV2.h"

Inheritance diagram for AliMediaLoaderV2:

Instance Methods

(NSString *) - addTask:listener:
 添加一个预加载任务,并指定该任务的状态回调监听器。
 
(void) - cancelTask:
 取消指定任务ID的加载。 注意:不会删除已经下载的文件,仅取消未完成部分的加载。
 
(void) - pauseTask:
 暂停指定任务ID的加载。
 
(void) - resumeTask:
 继续(恢复)指定任务ID的加载。
 

Class Methods

(instancetype) + shareInstance
 获取 AliMediaLoaderV2 的单例实例。
 

Method Documentation

◆ addTask:listener:

- (NSString *) addTask: (AVPPreloadTask *) preloadTask
listener: (id< OnPreloadListener >) listener 

添加一个预加载任务,并指定该任务的状态回调监听器。

Parameters
preloadTask预加载任务对象,包含数据源和加载时长等信息
listener任务状态回调监听器,任务状态变更时会通过该监听器通知调用方
Returns
分配的唯一任务ID(taskId),用于后续控制和查询 Add a preload task and specify the listener for the task status.
Parameters
preloadTaskPreload task object containing data source and loading duration information
listenerTask status callback listener, which will notify the caller when the task status changes
Returns
Assigned unique task ID (taskId) for subsequent control and query

◆ cancelTask:

- (void) cancelTask: (NSString *) taskId

取消指定任务ID的加载。 注意:不会删除已经下载的文件,仅取消未完成部分的加载。

Parameters
taskId要取消加载的任务ID Cancel the loading of the specified task ID. Note: The downloaded file will not be deleted, only the loading of the unfinished part will be canceled.
taskIdID of the task to be canceled

◆ pauseTask:

- (void) pauseTask: (NSString *) taskId

暂停指定任务ID的加载。

Parameters
taskId要暂停的任务ID Pause the loading of the specified task ID.
taskIdID of the task to be paused

◆ resumeTask:

- (void) resumeTask: (NSString *) taskId

继续(恢复)指定任务ID的加载。

Parameters
taskId要恢复的任务ID Resume (recover) the loading of the specified task ID.
taskIdID of the task to be resumed

◆ shareInstance

+ (instancetype) shareInstance

获取 AliMediaLoaderV2 的单例实例。

Returns
AliMediaLoaderV2 单例对象 Media preload manager interface, providing task submission, control, and status monitoring capabilities.

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