![]() |
AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
|
VOD media resource loader. More...
#include "AliVodMediaLoader.h"
Instance Methods | |
| (void) | - cancel:index: |
| Cancels loading. | |
| (void) | - load:index:duration: |
| Starts loading a file. | |
| (void) | - pause:index: |
| Pauses loading. | |
| (void) | - prepareVidAuthSource: |
| Prepares media resources using VidAuthSource. | |
| (void) | - prepareVidStsSource: |
| Prepares media resources using VidStsSource. | |
| (void) | - removeVidSource: |
| Removes a prepared VID resource. | |
| (void) | - resume:index: |
| Resumes loading. | |
| (void) | - setAliVodMediaLoaderStatusDelegate: |
| Sets the status delegate. | |
Class Methods | |
| (instancetype) | + shareInstance |
| Gets the singleton instance of AliVodMediaLoader. | |
VOD media resource loader.
Provides functionalities for preparing, loading, pausing, resuming, and canceling VOD media resources. This is a singleton class.
| - (void) cancel: | (NSString *) | vid | |
| index: | (int) | index |
Cancels loading.
| vid | The VID of the load to be canceled. |
| index | The index of the load to be canceled. |
| - (void) load: | (NSString *) | vid | |
| index: | (int) | index | |
| duration: | (int64_t) | duration |
Starts loading a file.
This is an asynchronous operation, and multiple tasks can be loaded simultaneously.
| vid | The video VID to be loaded. |
| index | The index to be loaded. |
| duration | The duration to load, in milliseconds. |
| - (void) pause: | (NSString *) | vid | |
| index: | (int) | index |
Pauses loading.
| vid | The VID of the load to be paused. |
| index | The index of the load to be paused. |
| - (void) prepareVidAuthSource: | (AVPVidAuthSource *) | authSource |
Prepares media resources using VidAuthSource.
This is an asynchronous operation. Upon successful preparation, a notification will be sent via the onPrepared:] callback.
| authSource | The AVPVidAuthSource object, containing VID and playback credential information. |
| - (void) prepareVidStsSource: | (AVPVidStsSource *) | stsSource |
Prepares media resources using VidStsSource.
This is an asynchronous operation. Upon successful preparation, a notification will be sent via the onPrepared:] callback.
| stsSource | The AVPVidStsSource object, containing VID and STS credential information. |
| - (void) removeVidSource: | (NSString *) | vid |
Removes a prepared VID resource.
| vid | The VID of the media resource to be removed. |
| - (void) resume: | (NSString *) | vid | |
| index: | (int) | index |
Resumes loading.
Used to resume a loading task that was paused by pause:index:] .
| vid | The VID of the load to be resumed. |
| index | The index of the load to be resumed. |
| - (void) setAliVodMediaLoaderStatusDelegate: | (id< AliVodMediaLoaderStatusDelegate >) | delegate |
Sets the status delegate.
| delegate | An object that conforms to the AliVodMediaLoaderStatusDelegate protocol, used to receive loading status callbacks. |
| + (instancetype) shareInstance |
Gets the singleton instance of AliVodMediaLoader.