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

VOD media resource loader. More...

#include "AliVodMediaLoader.h"

Inheritance diagram for AliVodMediaLoader:

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.

Detailed Description

VOD media resource loader.

Provides functionalities for preparing, loading, pausing, resuming, and canceling VOD media resources. This is a singleton class.

Method Documentation

◆ cancel:index:

- (void) cancel: (NSString *) vid
index: (int) index 

Cancels loading.

Note
This operation will not delete already downloaded files. A successful cancellation will trigger the onCanceled:index:] callback.
Parameters
vidThe VID of the load to be canceled.
indexThe index of the load to be canceled.

◆ load:index:duration:

- (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.

Parameters
vidThe video VID to be loaded.
indexThe index to be loaded.
durationThe duration to load, in milliseconds.

◆ pause:index:

- (void) pause: (NSString *) vid
index: (int) index 

Pauses loading.

Parameters
vidThe VID of the load to be paused.
indexThe index of the load to be paused.

◆ prepareVidAuthSource:

- (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.

Parameters
authSourceThe AVPVidAuthSource object, containing VID and playback credential information.

◆ prepareVidStsSource:

- (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.

Parameters
stsSourceThe AVPVidStsSource object, containing VID and STS credential information.

◆ removeVidSource:

- (void) removeVidSource: (NSString *) vid

Removes a prepared VID resource.

Parameters
vidThe VID of the media resource to be removed.

◆ resume:index:

- (void) resume: (NSString *) vid
index: (int) index 

Resumes loading.

Used to resume a loading task that was paused by pause:index:] .

Parameters
vidThe VID of the load to be resumed.
indexThe index of the load to be resumed.

◆ setAliVodMediaLoaderStatusDelegate:

- (void) setAliVodMediaLoaderStatusDelegate: (id< AliVodMediaLoaderStatusDelegate >) delegate

Sets the status delegate.

Parameters
delegateAn object that conforms to the AliVodMediaLoaderStatusDelegate protocol, used to receive loading status callbacks.
See also
AliVodMediaLoaderStatusDelegate

◆ shareInstance

+ (instancetype) shareInstance

Gets the singleton instance of AliVodMediaLoader.

Returns
The shared instance of AliVodMediaLoader.

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