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

Preload configuration class. More...

#include "AVPPreloadConfig.h"

Inheritance diagram for AVPPreloadConfig:

Instance Methods

(NSArray< NSString * > *) - getCustomHeaders
 Gets the custom headers.
(int) - getDefaultBandWidth
 Gets the configured preload bitrate.
(NSString *) - getDefaultQuality
 Gets the configured preload quality.
(int) - getDefaultResolution
 Gets the configured preload resolution.
(AVPPreloadOptionType) - getDefaultType
 Gets the currently configured default preload option type.
(int) - getDuration
 Gets the preload duration.
(int) - getNetworkRetryCount
 Gets the network retry count.
(int) - getNetworkTimeout
 Gets the network timeout.
(NSString *) - getReferrer
 Gets the Referrer.
(instancetype) - init
 Default constructor.
(instancetype) - initWithDuration:
 Constructs a preload configuration with a specified duration.
(void) - setCustomHeaders:
 Sets the custom headers.
(void) - setDefaultBandWidth:
 Sets the preload bitrate for a multi-bitrate stream.
(void) - setDefaultQuality:
 Sets the preload quality for a multi-bitrate stream.
(void) - setDefaultResolution:
 Sets the preload resolution for a multi-bitrate stream.
(void) - setDuration:
 Sets the preload duration.
(void) - setNetworkRetryCount:
 Sets the network retry count.
(void) - setNetworkTimeout:
 Sets the network timeout.
(void) - setReferrer:
 Sets the Referrer.

Properties

NSArray< NSString * > * customHeaders
 Custom HTTP Headers.
int networkRetryCount
 Network retry count.
int networkTimeout
 Network timeout, in milliseconds.
int optionIntValue
 When preloadOptionType is AVPPreloadOptionTypeResolution or AVPPreloadOptionTypeBandWidth, this property stores the corresponding integer value.
NSString * optionStringValue
 When preloadOptionType is AVPPreloadOptionTypeQuality, this property stores the corresponding string value.
int preloadDuration
 Preload duration, in milliseconds.
AVPPreloadOptionType preloadOptionType
 The option type for preloading multi-bitrate streams.
NSString * referrer
 The Referrer for HTTP requests.

Detailed Description

Preload configuration class.

This class is used to configure specific parameters for a preload task, such as preload duration, network settings, and selection strategy for multi-bitrate streams. It is typically used in conjunction with AVPPreloadTask.

See also
AVPPreloadTask

Method Documentation

◆ getCustomHeaders

- (NSArray< NSString * > *) getCustomHeaders

Gets the custom headers.

Returns
An array of custom headers.
See also
AVPPreloadConfig::customHeaders

◆ getDefaultBandWidth

- (int) getDefaultBandWidth

Gets the configured preload bitrate.

Note
The return value is only meaningful when the preload option type is AVPPreloadOptionTypeBandWidth.
Returns
The target bitrate.

◆ getDefaultQuality

- (NSString *) getDefaultQuality

Gets the configured preload quality.

Note
The return value is only meaningful when the preload option type is AVPPreloadOptionTypeQuality.
Returns
The description string of the target quality.

◆ getDefaultResolution

- (int) getDefaultResolution

Gets the configured preload resolution.

Note
The return value is only meaningful when the preload option type is AVPPreloadOptionTypeResolution.
Returns
The product of the width and height of the resolution.

◆ getDefaultType

- (AVPPreloadOptionType) getDefaultType

Gets the currently configured default preload option type.

Returns
The current preload option type.
See also
AVPPreloadOptionType

◆ getDuration

- (int) getDuration

Gets the preload duration.

Returns
Preload duration, in milliseconds.
See also
AVPPreloadConfig::preloadDuration

◆ getNetworkRetryCount

- (int) getNetworkRetryCount

Gets the network retry count.

Returns
Network retry count.
See also
AVPPreloadConfig::networkRetryCount

◆ getNetworkTimeout

- (int) getNetworkTimeout

Gets the network timeout.

Returns
Network timeout, in milliseconds.
See also
AVPPreloadConfig::networkTimeout

◆ getReferrer

- (NSString *) getReferrer

Gets the Referrer.

Returns
The Referrer string.
See also
AVPPreloadConfig::referrer

◆ init

- (instancetype) init

Default constructor.

Returns
An initialized AVPPreloadConfig instance.

◆ initWithDuration:

- (instancetype) initWithDuration: (int) duration

Constructs a preload configuration with a specified duration.

Parameters
durationPreload duration, in milliseconds.
Returns
An initialized AVPPreloadConfig instance.

◆ setCustomHeaders:

- (void) setCustomHeaders: (NSArray< NSString * > *) customHeaders

Sets the custom headers.

Parameters
customHeadersAn array of custom headers.
See also
AVPPreloadConfig::customHeaders

◆ setDefaultBandWidth:

- (void) setDefaultBandWidth: (int) bandWidth

Sets the preload bitrate for a multi-bitrate stream.

Note
Calling this method sets the preload option type to AVPPreloadOptionTypeBandWidth.
Parameters
bandWidthThe target bitrate. The SDK will select the stream with the closest value for preloading.

◆ setDefaultQuality:

- (void) setDefaultQuality: (NSString *) quality

Sets the preload quality for a multi-bitrate stream.

Note
Calling this method sets the preload option type to AVPPreloadOptionTypeQuality.
Parameters
qualityThe description string of the target quality.

◆ setDefaultResolution:

- (void) setDefaultResolution: (int) resolution

Sets the preload resolution for a multi-bitrate stream.

Note
Calling this method sets the preload option type to AVPPreloadOptionTypeResolution.
Parameters
resolutionThe product of the width and height of the resolution. The SDK will select the stream with the closest value for preloading.

◆ setDuration:

- (void) setDuration: (int) duration

Sets the preload duration.

Parameters
durationPreload duration, in milliseconds.
See also
AVPPreloadConfig::preloadDuration

◆ setNetworkRetryCount:

- (void) setNetworkRetryCount: (int) networkRetryCount

Sets the network retry count.

Parameters
networkRetryCountNetwork retry count.
See also
AVPPreloadConfig::networkRetryCount

◆ setNetworkTimeout:

- (void) setNetworkTimeout: (int) networkTimeout

Sets the network timeout.

Parameters
networkTimeoutNetwork timeout, in milliseconds.
See also
AVPPreloadConfig::networkTimeout

◆ setReferrer:

- (void) setReferrer: (NSString *) referrer

Sets the Referrer.

Parameters
referrerThe Referrer string.
See also
AVPPreloadConfig::referrer

Property Documentation

◆ customHeaders

- (NSArray<NSString *>*) customHeaders
readwritenonatomicstrong

◆ networkRetryCount

- (int) networkRetryCount
readwritenonatomicassign

◆ networkTimeout

- (int) networkTimeout
readwritenonatomicassign

Network timeout, in milliseconds.

See also
-[AVPPreloadConfig - setNetworkTimeout:]
-[AVPPreloadConfig - getNetworkTimeout]

◆ optionIntValue

- (int) optionIntValue
readwritenonatomicassign

When preloadOptionType is AVPPreloadOptionTypeResolution or AVPPreloadOptionTypeBandWidth, this property stores the corresponding integer value.

◆ optionStringValue

- (NSString*) optionStringValue
readwritenonatomicstrong

When preloadOptionType is AVPPreloadOptionTypeQuality, this property stores the corresponding string value.

◆ preloadDuration

- (int) preloadDuration
readwritenonatomicassign

Preload duration, in milliseconds.

See also
-[AVPPreloadConfig - setDuration:]
-[AVPPreloadConfig - getDuration]

◆ preloadOptionType

- (AVPPreloadOptionType) preloadOptionType
readwritenonatomicassign

The option type for preloading multi-bitrate streams.

See also
AVPPreloadOptionType

◆ referrer

- (NSString*) referrer
readwritenonatomicstrong

The Referrer for HTTP requests.

See also
-[AVPPreloadConfig - setReferrer:]
-[AVPPreloadConfig - getReferrer]

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