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

Player configuration class. More...

#include "AVPConfig.h"

Inheritance diagram for AVPConfig:

Properties

BOOL enableProjection __deprecated
 Enable projection.
int audioInterruptMode
 Audio interrupt mode.
BOOL clearShowWhenStop
 Whether to clear display when stopped.
BOOL disableAudio
 Disable audio track.
BOOL disableVideo
 Disable video track.
int enableEnhancedHttpDns
 Enable enhanced HTTP DNS.
BOOL enableHttp3
 Enable HTTP/3 protocol.
int enableHttpDns
 Enable HTTP DNS.
BOOL enableLocalCache
 Enable local cache.
BOOL enableSEI
 Enable SEI data callback.
BOOL enableStrictAuthMode
 Enable strict auth mode.
BOOL enableStrictFlvHeader
 Enable strict FLV header.
int highBufferDuration
 High water level buffer duration.
NSMutableArray * httpHeaders
 Custom HTTP headers.
NSString * httpProxy
 HTTP proxy.
int liveStartIndex
 HLS live start index.
int maxAllowedAbrVideoPixelNumber
 Maximum pixel count for ABR resolution upgrade.
int maxBufferDuration
 Maximum buffer duration.
int maxDelayTime
 Maximum broadcasting delay.
int maxProbeSize
 Probe data size (Deprecated).
uint64_t mMAXBackwardDuration
 Maximum backward buffer duration in milliseconds.
int networkRetryCount
 Network retry count.
int networkTimeout
 Network connection timeout.
int pixelBufferOutputFormat
 Pixel buffer output format.
int positionTimerIntervalMs
 Progress update frequency.
BOOL preferAudio
 Prefer audio playback.
NSString * referer
 HTTP request Referer.
int selectTrackBufferMode
 Select track buffer mode.
int startBufferDuration
 Start buffer duration.
int startBufferLimit
 Start preload threshold.
int stopBufferLimit
 Stop preload threshold.
NSString * userAgent
 HTTP User-Agent.
int videoRenderType
 Video render Type.

Detailed Description

Player configuration class.

Contains various configuration parameters for the player, such as buffer duration, network timeout, HTTP headers, etc. Configuration should be set before calling AliPlayer::prepare.

Property Documentation

◆ __deprecated

- (BOOL enableProjection) __deprecated
readwritenonatomicassign

Enable projection.

Whether to allow current player instance to project to external devices. Requires integrating projection SDK for complete functionality. Default: NO.

Deprecated
Deprecated

◆ audioInterruptMode

- (int) audioInterruptMode
readwritenonatomicassign

Audio interrupt mode.

Handling method when audio is interrupted (such as incoming call):

  • 0: Pause playback during interruption, resume after interruption ends
  • 1: Continue playback during interruption

Default: 0.

◆ clearShowWhenStop

- (BOOL) clearShowWhenStop
readwritenonatomicassign

Whether to clear display when stopped.

After calling stop(), whether to clear the last frame image. YES clears it (black screen), NO keeps the last frame. Default: NO.

◆ disableAudio

- (BOOL) disableAudio
readwritenonatomicassign

Disable audio track.

Whether to disable audio track. YES disables audio decoding and output. Default: NO.

◆ disableVideo

- (BOOL) disableVideo
readwritenonatomicassign

Disable video track.

Whether to disable video track. YES disables video decoding and rendering. Default: NO.

◆ enableEnhancedHttpDns

- (int) enableEnhancedHttpDns
readwritenonatomicassign

Enable enhanced HTTP DNS.

Whether to enable enhanced HTTP DNS for domain resolution. Values: -1 (follow global setting), 0 (disable), others (enable).

◆ enableHttp3

- (BOOL) enableHttp3
readwritenonatomicassign

Enable HTTP/3 protocol.

Whether to use HTTP/3 protocol for requests. Supports RFC 9114 (HTTP/3) and RFC 9000 (QUIC v1) standards. Automatically degrades to normal HTTP if HTTP/3 fails. Default: NO.

◆ enableHttpDns

- (int) enableHttpDns
readwritenonatomicassign

Enable HTTP DNS.

Whether to enable HTTP DNS for domain resolution. Values: -1 (follow global setting), 0 (disable), others (enable).

◆ enableLocalCache

- (BOOL) enableLocalCache
readwritenonatomicassign

Enable local cache.

When local cache is enabled through AliPlayerGlobalSettings API, this config controls whether current player instance is allowed to cache. Default: YES.

◆ enableSEI

- (BOOL) enableSEI
readwritenonatomicassign

Enable SEI data callback.

Whether to enable callback for SEI (Supplemental Enhancement Information) data. When enabled, SEI data embedded in video can be retrieved through callbacks.

◆ enableStrictAuthMode

- (BOOL) enableStrictAuthMode
readwritenonatomicassign

Enable strict auth mode.

For HLS VOD media with URL authorization enabled, auth mode when using local cache:

  • NO (non-strict): Auth result is cached. If last play cached part of media, next play to non-cache part uses cached auth, which may fail if auth timeout is short.
  • YES (strict): Auth result is not cached; auth is verified every playback start. Offline playback fails. Default: YES (5.5.4.0~6.21.0 default NO, 7.0.0+ default YES).

◆ enableStrictFlvHeader

- (BOOL) enableStrictFlvHeader
readwritenonatomicassign

Enable strict FLV header.

Optimization strategy for pure audio or pure video RTMP/FLV live streams. When stream header declares audio-only or video-only and actual content matches, enabling this can speed up startup. Default: NO.

◆ highBufferDuration

- (int) highBufferDuration
readwritenonatomicassign

High water level buffer duration.

When cached data size exceeds this value, the player resumes playback from buffering state. Used to avoid frequent buffering pauses. Unit: milliseconds.

◆ httpHeaders

- (NSMutableArray*) httpHeaders
readwritenonatomicstrong

Custom HTTP headers.

Add custom HTTP request headers. Can be used for authentication information or other HTTP headers.

◆ httpProxy

- (NSString*) httpProxy
readwritenonatomiccopy

HTTP proxy.

HTTP proxy address for accessing network resources.

◆ liveStartIndex

- (int) liveStartIndex
readwritenonatomicassign

HLS live start index.

Fragment index for starting HLS live stream playback. Controls the start position for live playback.

◆ maxAllowedAbrVideoPixelNumber

- (int) maxAllowedAbrVideoPixelNumber
readwritenonatomicassign

Maximum pixel count for ABR resolution upgrade.

When resolution switches to AUTO (adaptive) mode, the maximum pixel count allowed for upgrading resolution. For example, setting to 1280 * 720 = 921600 limits upgrade to this resolution, not 1920 * 1080.

Note
Pixel values for different resolutions can refer to AVPPixelNumber
This setting also applies to AliPlayer::setAutoBandWidth interface

◆ maxBufferDuration

- (int) maxBufferDuration
readwritenonatomicassign

Maximum buffer duration.

Maximum duration of data the player allows to cache. Prevents buffer from consuming excessive memory. Unit: milliseconds, Default: 50000 (50 seconds).

◆ maxDelayTime

- (int) maxDelayTime
readwritenonatomicassign

Maximum broadcasting delay.

Used to limit the maximum delay of live stream. When playback delay exceeds this value, the player attempts to speed up and catch up. Unit: milliseconds, Default: 5000 (5 seconds).

◆ maxProbeSize

- (int) maxProbeSize
readwritenonatomicassign

Probe data size (Deprecated).

Size of data used to probe media information. Default -1 means not set; player decides automatically.

Deprecated
This property is deprecated.

◆ mMAXBackwardDuration

- (uint64_t) mMAXBackwardDuration
readwritenonatomicassign

Maximum backward buffer duration in milliseconds.

Default: 0.

◆ networkRetryCount

- (int) networkRetryCount
readwritenonatomicassign

Network retry count.

Number of retries when network connection fails. Retry interval is determined by networkTimeout. Set to 0 to disable automatic retry; retry strategy is decided by app. Default: 2.

◆ networkTimeout

- (int) networkTimeout
readwritenonatomicassign

Network connection timeout.

Timeout for network requests. No response within this time is considered network timeout. Unit: milliseconds, Default: 15000 (15 seconds).

◆ pixelBufferOutputFormat

- (int) pixelBufferOutputFormat
readwritenonatomicassign

Pixel buffer output format.

Video format for renderFrame callback. Only effective for VTB decoder, value equals OSType. Supported formats include: 420v, 420f, y420, BGRA, etc.

◆ positionTimerIntervalMs

- (int) positionTimerIntervalMs
readwritenonatomicassign

Progress update frequency.

Frequency of playback progress and buffer progress updates. Includes callback update interval for current position and buffered position. Unit: milliseconds.

See also
AVPDelegate::onCurrentPositionUpdate
AVPDelegate::onBufferedPositionUpdate

◆ preferAudio

- (BOOL) preferAudio
readwritenonatomicassign

Prefer audio playback.

Whether to prioritize audio playback over video quality when network bandwidth is insufficient. Currently effective only in DASH live streams (video already at lowest bitrate).

◆ referer

- (NSString*) referer
readwritenonatomiccopy

HTTP request Referer.

Value of Referer field in HTTP request. Used for anti-hotlinking and other functions.

◆ selectTrackBufferMode

- (int) selectTrackBufferMode
readwritenonatomicassign

Select track buffer mode.

Whether to clear buffered data when calling selectTrack() to switch track:

  • 0: Do not clear buffer
  • 1: Clear buffer

This mode applies to both high-definition and low-definition tracks.

◆ startBufferDuration

- (int) startBufferDuration
readwritenonatomicassign

Start buffer duration.

Duration of data to buffer before starting playback. Playback begins when buffered data reaches this value. Smaller values speed up start but may cause stuttering; larger values are more stable but have higher latency. Unit: milliseconds, Default: 500.

◆ startBufferLimit

- (int) startBufferLimit
readwritenonatomicassign

Start preload threshold.

Trigger start preload buffer threshold. When playback buffer data is higher than this value, start background preload. Unit: milliseconds.

◆ stopBufferLimit

- (int) stopBufferLimit
readwritenonatomicassign

Stop preload threshold.

Trigger stop preload buffer threshold. When playback buffer data is lower than this value, stop preload. Unit: milliseconds.

◆ userAgent

- (NSString*) userAgent
readwritenonatomiccopy

HTTP User-Agent.

Value of User-Agent field in HTTP request. Identifies client information.

◆ videoRenderType

- (int) videoRenderType
readwritenonatomicassign

Video render Type.

Specifies the renderer type for video rendering:

  • 0: Default renderer
  • 1: Mixed renderer
  • 2: Metal render (iOS only)
  • 3: OpenGL render

Default: 0.


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