![]() |
AliyunPlayer v7.10.0
Aliyun Player API Reference Manual for iOS Platforms
|
Classes | |
| struct | _AVPStsInfo |
| STS information structure. More... | |
| class | AVPErrorModel |
| AVPErrorModel represents playback error descriptions. More... | |
| class | AVPNetworkStat |
| class | AVPTimeShiftModel |
| AVPTimeShiftModel represents broadcasting timeshift descriptions. More... | |
| class | AVPUrlResult |
| URL refresh result. More... | |
Typedefs | |
| typedef enum AVPAlphaRenderMode | AVPAlphaRenderMode |
| Alpha rendering mode Used for rendering video frames that contain an alpha channel (transparency). | |
| typedef enum BizScene | AVPBizScene |
| Scenario enumeration for adaptive downgrade URL switching. | |
| typedef enum CodecType | AVPCodecType |
| Enumeration of the original URL codec format during adaptive degradation. | |
| typedef enum AVPEventType | AVPEventType |
| Player event type. | |
| typedef enum AVPIpResolveType | AVPIpResolveType |
| IP resolve type enumeration. | |
| typedef enum AVPLogLevel | AVPLogLevel |
| Log level enumeration. | |
| typedef enum AVPLogOption | AVPLogOption |
| Log option enumeration. | |
| typedef enum AVPMirrorMode | AVPMirrorMode |
| Mirroring mode enumeration. | |
| typedef enum AVPMultiBitratesMode | AVPMultiBitratesMode |
| multiBitrates preload mode, effect only on multiBitrates hls stream. | |
| typedef enum AVPNetworkLevel | AVPNetworkLevel |
| typedef enum AVPOption | AVPOption |
| Player option enumeration. | |
| typedef enum AVPOutputAudioChannel | AVPOutputAudioChannel |
| Output audio channel enumeration. | |
| typedef enum AVPPIPShowMode | AVPPIPShowMode |
| Picture-in-Picture (PIP) show mode enumeration. | |
| typedef enum AVPPixelNumber | AVPPixelNumber |
| Pixel number of specific resolution enumeration. | |
| typedef enum AVPPropertyKey | AVPPropertyKey |
| Property key enumeration for querying player information. | |
| typedef enum AVPRotateMode | AVPRotateMode |
| Rotate mode enumeration. | |
| typedef enum AVPScalingMode | AVPScalingMode |
| Scaling mode enumeration. | |
| typedef enum _AVPScene | AVPScene |
| Scene enumeration. | |
| typedef enum AVPSceneType | AVPSceneType |
| Scene type enumeration. | |
| typedef enum AVPSeekMode | AVPSeekMode |
| Seek mode enumeration. | |
| typedef enum AVPStatus | AVPStatus |
| Player status enumeration. | |
| typedef enum AVPStrategyType | AVPStrategyType |
| strategy type | |
| typedef struct _AVPStsInfo | AVPStsInfo |
| STS information structure. | |
| typedef enum _AVPStsStatus | AVPStsStatus |
| STS (Security Token Service) status enumeration. | |
| typedef enum _GlobalOption | GlobalOption |
| specified option on GlobalSettings. | |
| typedef enum _PlayerOption | PlayerOption |
| Player-specific option enumeration. | |
| typedef bool(* | PlayURLConverCallback) (const char *srcURL, const char *srcFormat, char **destURL) |
| Playback URL conversion callback function. | |
| typedef enum _SupportFeatureType | SupportFeatureType |
| Feature type enumeration. | |
| typedef enum AVPAlphaRenderMode AVPAlphaRenderMode |
Alpha rendering mode Used for rendering video frames that contain an alpha channel (transparency).
The video frame is split into an RGB image region and an alpha channel region. The player extracts both parts based on the specified layout and performs alpha blending. Commonly used for live-stream gifts, animated overlays, and other transparent effects. Please refer to Video frame processing
| typedef enum BizScene AVPBizScene |
Scenario enumeration for adaptive downgrade URL switching.
Identifies whether URL switching occurs in the player or preloader.
When the player or preloader needs to switch to a backup URL due to unsupported codec format (e.g., H.265 not supported), this enumeration distinguishes the specific scenario.
| typedef enum CodecType AVPCodecType |
Enumeration of the original URL codec format during adaptive degradation.
Used to represent the codec format of the original URL in adaptive degradation scenarios. When the codec format is not supported, the player can switch to a backup URL based on this information.
| typedef enum AVPEventType AVPEventType |
Player event type.
| typedef enum AVPIpResolveType AVPIpResolveType |
IP resolve type enumeration.
Used to specify the type of IP address to use during network connections.
During DNS resolution, you can specify to prioritize IPv4 or IPv6, or allow automatic selection of both.
| typedef enum AVPLogLevel AVPLogLevel |
Log level enumeration.
Used to control the verbosity of player log output.
Log levels from lowest to highest are: NONE, FATAL, ERROR, WARNING, INFO, DEBUG, TRACE. Higher values result in more detailed log output.
| typedef enum AVPLogOption AVPLogOption |
Log option enumeration.
Used to control specific features of log output.
These options enable or disable specific features of the logging system.
| typedef enum AVPMirrorMode AVPMirrorMode |
Mirroring mode enumeration.
Used to control video frame mirroring (flip) effect.
| typedef enum AVPMultiBitratesMode AVPMultiBitratesMode |
multiBitrates preload mode, effect only on multiBitrates hls stream.
| typedef enum AVPNetworkLevel AVPNetworkLevel |
Player option enumeration.
Used to query player performance metrics in real-time.
These options allow you to retrieve current rendering frame rate, network bitrate, video bitrate, and other dynamic information.
| typedef enum AVPOutputAudioChannel AVPOutputAudioChannel |
Output audio channel enumeration.
Used to specify which audio channel to output.
When the input audio source is stereo, you can select to output only the left or right channel. If the input is mono, this setting has no effect and audio plays normally.
| typedef enum AVPPIPShowMode AVPPIPShowMode |
Picture-in-Picture (PIP) show mode enumeration.
Used to control the UI display method of the picture-in-picture feature.
Defines how control buttons are shown or hidden when picture-in-picture mode is enabled.
| typedef enum AVPPixelNumber AVPPixelNumber |
Pixel number of specific resolution enumeration.
This enumeration lists the number of pixels for common video resolutions. These values can be used as reference values for AVPConfig::maxAllowedAbrVideoPixelNumber.
| typedef enum AVPPropertyKey AVPPropertyKey |
Property key enumeration for querying player information.
Used to retrieve specific player properties or statistical information.
These keys allow you to obtain HTTP response information, connection information, and other debugging and performance-related data.
| typedef enum AVPRotateMode AVPRotateMode |
Rotate mode enumeration.
Used to control video frame rotation angle (clockwise).
| typedef enum AVPScalingMode AVPScalingMode |
Scaling mode enumeration.
Used to control video frame scaling and filling mode.
Scene enumeration.
Used to specify the most suitable scene configuration for the player.
The player automatically applies optimized configuration strategies based on the specified scene, without requiring manual parameter adjustment by developers.
| typedef enum AVPSceneType AVPSceneType |
Scene type enumeration.
Used to specify the playback scenario, allowing the player to optimize relevant configurations.
The Alibaba Cloud player has preset optimal configurations for different scenarios. By specifying the scene type, corresponding optimization strategies are automatically applied without manual adjustment of individual configuration parameters.
| typedef enum AVPSeekMode AVPSeekMode |
Seek mode enumeration.
Controls whether to seek to the exact specified position.
Accurate seeking will seek to the exact specified time position but is relatively slower. Inaccurate seeking will seek to the nearest keyframe before the specified position and start playback, which is faster but may have a deviation from the specified position.
| typedef enum AVPStrategyType AVPStrategyType |
strategy type
| typedef struct _AVPStsInfo AVPStsInfo |
STS information structure.
Used to store credentials related to temporary security tokens.
Contains information such as access ID, access key, security token, region, and format, used for authentication and authorization to access Alibaba Cloud resources.
| typedef enum _AVPStsStatus AVPStsStatus |
STS (Security Token Service) status enumeration.
Used to represent the validity status of STS tokens.
| typedef enum _GlobalOption GlobalOption |
specified option on GlobalSettings.
Used to configure options for player global behavior. +setOption:valueInt:
| typedef enum _PlayerOption PlayerOption |
Player-specific option enumeration.
Used to configure behavior options for individual player instances.
These options can be set after creating the player, and each player instance can be configured independently.
| typedef bool(* PlayURLConverCallback) (const char *srcURL, const char *srcFormat, char **destURL) |
Playback URL conversion callback function.
| srcURL | [in] Input original URL string, must not be NULL. |
| srcFormat | [in] Format of the input URL, typically "m3u8", "mp4", or other format identifiers. Empty string if format is unknown. |
| destURL | [out] Output converted URL string. The function is responsible for memory allocation, and the caller must release this memory after use. |
| typedef enum _SupportFeatureType SupportFeatureType |
Feature type enumeration.
Used to query whether the player supports specific hardware or software features.
These types allow you to check if the device supports specific advanced audio and video features.
| enum _AVPScene |
Scene enumeration.
Used to specify the most suitable scene configuration for the player.
The player automatically applies optimized configuration strategies based on the specified scene, without requiring manual parameter adjustment by developers.
| enum _AVPStsStatus |
STS (Security Token Service) status enumeration.
Used to represent the validity status of STS tokens.
| enum _GlobalOption : NSUInteger |
specified option on GlobalSettings.
Used to configure options for player global behavior. +setOption:valueInt:
| Enumerator | |
|---|---|
| SET_PRE_CONNECT_DOMAIN | Pre-connect domain option . Sets the domain for pre-connection to optimize initial connection speed. |
| SET_DNS_PRIORITY_LOCAL_FIRST | DNS local-first resolution option . When enabled, DNS resolution prioritizes local DNS over remote DNS. |
| ENABLE_H2_MULTIPLEX | Enable HTTP/2 multiplexing option. Enables HTTP/2 protocol multiplexing to improve network transmission efficiency. +setOption:valueInt:@endlink |
| SET_EXTRA_DATA | Set extra data option . Used to pass custom extra data to the player internals. |
| ENABLE_ANDROID_DECODE_REUSE | Enable Android decoder reuse option (Android only) . Android-specific placeholder option for enabling decoder reuse functionality. |
| NOT_PAUSE_WHEN_PREPARING | Do not pause when preparing option . When enabled, playback will not pause during preparation. |
| ALLOW_RTS_DEGRADE | Allow RTS degradation option . Allows Real-time Streaming (RTS) to degrade to normal live streaming mode when necessary. |
| ENABLE_DECODER_FAST_FIRST_FRAME | Enable decoder fast first frame option . Optimizes decoder initialization to accelerate first frame display. |
| DISABLE_CAPTURE_SCALE | Disable capture scaling option . Disables automatic scaling during screenshot capture. |
| ALLOW_BOUNDS_CHANGE_ANIMATION | Allow bounds change animation option (iOS only) . iOS-specific option that allows animation effects when view bounds change. |
| AV3A_DECODE_MODEL_PATH | AV3A decode model path option . Specifies the file path for the AV3A decoding model. |
| RENDER_IGNORE_DAR_SCALE | Ignore DAR scaling option (iOS only) . iOS-specific option that ignores Display Aspect Ratio (DAR) scaling processing. |
| MAX_ERROR_FRAMES_HARDWARE_DECODE | Maximum error frames for hardware decoding option . Sets the maximum number of consecutive error frames allowed for hardware decoder before triggering fallback. |
| ALLOW_AUDIOUNIT | Allow AudioUnit option (iOS only) . iOS-specific option that allows using AudioUnit for audio processing. |
| DISABLE_CATCHUP_IN_LOWLATENCY_AUDIOQUEUE | Disable catch-up in low-latency audio queue option (iOS only) . iOS-specific option that disables catch-up mechanism in low-latency audio queue. |
| ENABLE_URL_REFRESH_ON_FORBIDDEN | Enable URL refresh on Forbidden error option . Automatically triggers URL refresh mechanism when receiving HTTP 403 Forbidden error. |
| ENABLE_PARSE_VTT_DIALOGUE_CUE_BY_JSON | Enable VTT dialogue cue parsing by JSON option . When enabled, dialogue cues in VTT subtitles will be parsed in JSON format. |
| enum _PlayerOption : NSUInteger |
Player-specific option enumeration.
Used to configure behavior options for individual player instances.
These options can be set after creating the player, and each player instance can be configured independently.
| Enumerator | |
|---|---|
| SET_MEDIA_TYPE | |
| ALLOW_DECODE_BACKGROUND | Allow decode in background. Continue video decoding when the app enters the background, maintaining playback state. |
| ALLOW_PRE_RENDER | Allow pre-render. Enables pre-rendering of video frames to accelerate first frame display. |
| PLAYED_DURATION_INCLUDE_SPEED | Played duration includes playback speed. Playback duration calculation takes playback speed into account.
|
| PRE_RENDER_MAX_BUFFER_MS | Pre-render maximum buffer duration in milliseconds. Specifies the maximum buffer duration for the pre-rendering feature. Only effective when ALLOW_PRE_RENDER is enabled. |
| LINE_FALLBACK_URL | Line fallback URL. Sets backup stream URL for multi-line scenarios to improve playback quality and availability. |
| enum _SupportFeatureType : NSUInteger |
Feature type enumeration.
Used to query whether the player supports specific hardware or software features.
These types allow you to check if the device supports specific advanced audio and video features.
| Enumerator | |
|---|---|
| FeatureDolbyAudio | Dolby Audio support. Checks whether the hardware supports Dolby Audio decoding and output. |
| enum AVPAlphaRenderMode : NSUInteger |
Alpha rendering mode Used for rendering video frames that contain an alpha channel (transparency).
The video frame is split into an RGB image region and an alpha channel region. The player extracts both parts based on the specified layout and performs alpha blending. Commonly used for live-stream gifts, animated overlays, and other transparent effects. Please refer to Video frame processing
| enum AVPEventType : NSUInteger |
Player event type.
| enum AVPIpResolveType : NSUInteger |
IP resolve type enumeration.
Used to specify the type of IP address to use during network connections.
During DNS resolution, you can specify to prioritize IPv4 or IPv6, or allow automatic selection of both.
| Enumerator | |
|---|---|
| AVPIpResolveWhatEver | |
| AVPIpResolveV4 | |
| AVPIpResolveV6 | |
| enum AVPLogLevel : NSUInteger |
Log level enumeration.
Used to control the verbosity of player log output.
Log levels from lowest to highest are: NONE, FATAL, ERROR, WARNING, INFO, DEBUG, TRACE. Higher values result in more detailed log output.
| Enumerator | |
|---|---|
| LOG_LEVEL_NONE | |
| LOG_LEVEL_FATAL | |
| LOG_LEVEL_ERROR | |
| LOG_LEVEL_WARNING | |
| LOG_LEVEL_INFO | |
| LOG_LEVEL_DEBUG | |
| LOG_LEVEL_TRACE | |
| enum AVPLogOption : NSUInteger |
| enum AVPMirrorMode : NSUInteger |
Mirroring mode enumeration.
Used to control video frame mirroring (flip) effect.
| enum AVPMultiBitratesMode : NSUInteger |
multiBitrates preload mode, effect only on multiBitrates hls stream.
| enum AVPNetworkLevel : NSInteger |
| enum AVPOption : NSUInteger |
Player option enumeration.
Used to query player performance metrics in real-time.
These options allow you to retrieve current rendering frame rate, network bitrate, video bitrate, and other dynamic information.
| enum AVPOutputAudioChannel : NSUInteger |
Output audio channel enumeration.
Used to specify which audio channel to output.
When the input audio source is stereo, you can select to output only the left or right channel. If the input is mono, this setting has no effect and audio plays normally.
| Enumerator | |
|---|---|
| AVP_AUDIO_CHANNEL_NONE | Not specified, default value. |
| AVP_AUDIO_CHANNEL_LEFT | Left audio channel. |
| AVP_AUDIO_CHANNEL_RIGHT | Right audio channel. |
| enum AVPPIPShowMode : NSUInteger |
Picture-in-Picture (PIP) show mode enumeration.
Used to control the UI display method of the picture-in-picture feature.
Defines how control buttons are shown or hidden when picture-in-picture mode is enabled.
| enum AVPPixelNumber : NSUInteger |
Pixel number of specific resolution enumeration.
This enumeration lists the number of pixels for common video resolutions. These values can be used as reference values for AVPConfig::maxAllowedAbrVideoPixelNumber.
| Enumerator | |
|---|---|
| Resolution_360P | |
| Resolution_480P | |
| Resolution_540P | |
| Resolution_720P | |
| Resolution_1080P | |
| Resolution_2K | |
| Resolution_4K | |
| Resolution_NoLimit | |
| enum AVPPropertyKey : NSUInteger |
Property key enumeration for querying player information.
Used to retrieve specific player properties or statistical information.
These keys allow you to obtain HTTP response information, connection information, and other debugging and performance-related data.
| enum AVPRotateMode : NSUInteger |
| enum AVPScalingMode : NSUInteger |
Scaling mode enumeration.
Used to control video frame scaling and filling mode.
| enum AVPSceneType : NSInteger |
Scene type enumeration.
Used to specify the playback scenario, allowing the player to optimize relevant configurations.
The Alibaba Cloud player has preset optimal configurations for different scenarios. By specifying the scene type, corresponding optimization strategies are automatically applied without manual adjustment of individual configuration parameters.
| enum AVPSeekMode : NSUInteger |
Seek mode enumeration.
Controls whether to seek to the exact specified position.
Accurate seeking will seek to the exact specified time position but is relatively slower. Inaccurate seeking will seek to the nearest keyframe before the specified position and start playback, which is faster but may have a deviation from the specified position.
| enum AVPStatus : NSUInteger |
| enum AVPStrategyType : NSUInteger |
| enum BizScene : NSUInteger |
Scenario enumeration for adaptive downgrade URL switching.
Identifies whether URL switching occurs in the player or preloader.
When the player or preloader needs to switch to a backup URL due to unsupported codec format (e.g., H.265 not supported), this enumeration distinguishes the specific scenario.
| Enumerator | |
|---|---|
| AVP_Player | Player scenario. URL switching occurs in the player. |
| AVP_Loader | Preloader scenario. URL switching occurs in the preloader. |
| enum CodecType : NSUInteger |
Enumeration of the original URL codec format during adaptive degradation.
Used to represent the codec format of the original URL in adaptive degradation scenarios. When the codec format is not supported, the player can switch to a backup URL based on this information.
| Enumerator | |
|---|---|
| AVP_H265 | H.265 codec format (HEVC). |