![]() |
AliyunPlayer v7.9.0
Aliyun Player API Reference Manual for iOS Platforms
|
媒体预加载管理器。 More...
#include "AliMediaLoaderV2.h"
Instance Methods | |
| (NSString *) | - addTask:listener: |
| 添加一个预加载任务。 | |
| (void) | - cancelTask: |
| 取消指定任务 ID 的加载。 | |
| (void) | - pauseTask: |
| 暂停指定任务 ID 的加载。 | |
| (void) | - resumeTask: |
| 恢复指定任务 ID 的加载。 | |
Class Methods | |
| (instancetype) | + shareInstance |
| 获取 AliMediaLoaderV2 的单例实例。 | |
媒体预加载管理器。
Media preload manager.
提供预加载任务的提交、控制和状态监控能力。这是一个单例类。
Provides capabilities for submitting, controlling, and monitoring the status of preload tasks. This is a singleton class.
| - (NSString *) addTask: | (AVPPreloadTask *) | preloadTask | |
| listener: | (id< OnPreloadListener >) | listener |
添加一个预加载任务。
此方法用于提交一个预加载任务,并为该任务指定一个状态回调监听器。操作是异步的。
| preloadTask | AVPPreloadTask 预加载任务对象,包含了数据源和需要加载的时长等信息。 |
| listener | 实现了 OnPreloadListener 协议的监听器对象。任务状态发生变更时,会通过此监听器的方法进行通知。 |
Adds a preload task.
This method is used to submit a preload task and specify a status callback listener for it. The operation is asynchronous.
| preloadTask | The AVPPreloadTask object, which contains information such as the data source and loading duration. |
| listener | A listener object that conforms to the OnPreloadListener protocol. When the task status changes, notifications will be sent through the methods of this listener. |
| - (void) cancelTask: | (NSString *) | taskId |
取消指定任务 ID 的加载。
| taskId | 要取消加载的任务 ID,该 ID 由 addTask:listener:] 返回。 |
Cancels the loading for the specified task ID.
| taskId | The ID of the task to be canceled, which is returned by addTask:listener:] . |
| - (void) pauseTask: | (NSString *) | taskId |
暂停指定任务 ID 的加载。
| taskId | 要暂停加载的任务 ID,该 ID 由 addTask:listener:] 返回。 |
Pauses the loading for the specified task ID.
| taskId | The ID of the task to be paused, which is returned by addTask:listener:] . |
| - (void) resumeTask: | (NSString *) | taskId |
恢复指定任务 ID 的加载。
用于继续一个之前被 pauseTask:] 暂停的任务。
| taskId | 要恢复加载的任务 ID,该 ID 由 addTask:listener:] 返回。 |
Resumes the loading for the specified task ID.
Used to continue a task that was previously paused by pauseTask:] .
| taskId | The ID of the task to be resumed, which is returned by addTask:listener:] . |
| + (instancetype) shareInstance |
获取 AliMediaLoaderV2 的单例实例。
AliMediaLoaderV2 的共享单例对象。Gets the singleton instance of AliMediaLoaderV2.
AliMediaLoaderV2.