#include "AliMediaLoaderV2.h"
◆ addTask:listener:
添加一个预加载任务,并指定该任务的状态回调监听器。
- Parameters
-
preloadTask | 预加载任务对象,包含数据源和加载时长等信息 |
listener | 任务状态回调监听器,任务状态变更时会通过该监听器通知调用方 |
- Returns
- 分配的唯一任务ID(taskId),用于后续控制和查询 Add a preload task and specify the listener for the task status.
- Parameters
-
preloadTask | Preload task object containing data source and loading duration information |
listener | Task 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. |
taskId | ID of the task to be canceled |
◆ pauseTask:
- (void) pauseTask: |
|
(NSString *) | taskId |
|
暂停指定任务ID的加载。
- Parameters
-
taskId | 要暂停的任务ID Pause the loading of the specified task ID. |
taskId | ID of the task to be paused |
◆ resumeTask:
- (void) resumeTask: |
|
(NSString *) | taskId |
|
继续(恢复)指定任务ID的加载。
- Parameters
-
taskId | 要恢复的任务ID Resume (recover) the loading of the specified task ID. |
taskId | ID 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: