This topic describes the data structures for the ApsaraVideo Real-time Communication SDK for iOS and macOS.
Contents
Data type | Description |
Error codes for audio accompaniment playback (iOS only). | |
The state of audio accompaniment playback (iOS only). | |
User volume information. | |
Audio samples. | |
Video samples. | |
Channel modes. | |
User roles. | |
Session statistics. | |
Local video statistics. | |
Remote video statistics. | |
Local audio statistics. | |
Remote audio statistics. | |
Video data output positions. | |
Video data formats. | |
External device types (Mac only). | |
External device states (Mac only). | |
Network connection statuses. | |
Reasons for network connection status changes. | |
Video stream types. | |
Stream ingest states. | |
Subscription states. | |
Reasons for a user going offline. | |
Camera stream types. | |
Audio stream types. | |
Network quality. | |
Screen orientation types (iOS only). | |
SDK control permissions for Audio Session (iOS only). | |
Rendering modes. | |
Image modes. | |
Rotation angles. | |
Log levels. | |
The number of audio channels. | |
Audio recording sample rates. | |
Record types. | |
Record formats | |
The audio quality of recorded audio files. | |
The video quality of recorded video files. | |
Video codec types. | |
Video decoder settings. | |
Video encoding types. | |
Audio quality. | |
Audio quality modes. | |
Audio scenario mode parameters. | |
Local mute modes. | |
Audio recording settings. | |
Video recording settings. | |
Canvas size for video recording settings (Mac only). | |
Layout information for video recording (Mac only). | |
Layout modes for video recording (Mac only). | |
Background color for video recording (Mac only). | |
User view configuration for recording layout (Mac only). | |
Position information of the user view (Mac only). | |
Coordinates for stream mixing recording (Mac only). | |
Recording templates (Mac only). | |
Device information (Mac only). | |
Basic retouching settings. | |
OnBye type enumeration. | |
Voice changer effect modes. | |
Reverb effect modes. | |
Reverb effect parameters. | |
Audio routes (iOS only). | |
Rendering canvas. | |
Bypass stream ingest error codes. | |
Watermark image settings. | |
Camera capture preference properties. | |
Camera directions. | |
Specifies the camera capture resolution. | |
Camera capture preferences. | |
Video encoding frame rates. | |
Video encoding bitrates. | |
Encoded video image modes. | |
Encoded video rotation modes. | |
Video encoding preferences. | |
Screen sharing encoding preferences. | |
Screen sharing configurations (Mac only). | |
Screen sharing areas (Mac only). | |
Screen sharing source information (Mac only). | |
Screen sharing configuration information (Mac only). | |
Screen sharing types (Mac only). | |
Authentication information. | |
Device volume types (iOS only). | |
Raw video data source types. | |
Raw audio data source types. | |
Video data types. | |
Error codes. | |
Video output width alignment modes. | |
Dashboard display types. | |
Bypass LiveStream ingest statuses. | |
Bypass live streaming image display types. | |
Bypass live streaming text types. | |
Bypass live streaming segmentation types. | |
Bypass live streaming input types. | |
Video stream status changes. | |
Reasons that trigger video stream status changes. | |
Bypass live streaming crop modes. | |
Bypass live streaming media processing modes. | |
Bypass live streaming ingest stream types. | |
Bypass live streaming modes. | |
Live stream bypass status | |
Bypass live streaming text information. | |
Bypass live streaming image information. | |
Custom stream information for bypass live streaming. | |
Bypass live streaming configurations. | |
Stream mixing parameters for bypass mode. | |
Single-stream parameters for bypass mode. | |
Billing specifications for bypass live streaming. | |
Encoding parameters for bypass live streaming. | |
Audio sample rates for bypass live streaming. | |
Clock widget for bypass live streaming. | |
Scaling modes for background replacement (Mac only). | |
The state of audio accompaniment playback (Mac only). | |
Error codes for audio accompaniment playback (Mac only). | |
Screen sharing types. | |
Aggregated feature profiles. | |
Parameters for joining a channel. | |
Parameter configurations for network probing. | |
Network probing results. | |
Audio frame struct. | |
Video pipeline image types. | |
Capture pipeline scaling types. | |
Audio accompaniment playback configurations. | |
Audio file information. | |
Data message definitions. | |
Data message types. | |
On-premises device types. | |
Current device exception types. | |
Callbacks for local audio capture status. | |
Callbacks for local video capture status. | |
The state of audio accompaniment playback. | |
Error codes for audio accompaniment playback. | |
Bypass live streaming video encoders. |
Details
AliRtcAudioPlayingErrorCode: Error codes for audio accompaniment playback (iOS only).
Enumeration name
Description
AliRtcAudioPlayingNoError
Normal state.
AliRtcAudioPlayingOpenFailed
Failed to open the file.
AliRtcAudioPlayingDecodeFailed
Encoding failed.
AliRtcAudioPlayingStateCode: The playback state of audio accompaniment (iOS only).
Enumeration name
Description
AliRtcAudioPlayingStarted
Playing.
AliRtcAudioPlayingStopped
Playback is stopped.
AliRtcAudioPlayingPaused
Playback is paused.
AliRtcAudioPlayingResumed
Playback is resumed.
AliRtcAudioPlayingEnded
Playback is complete.
AliRtcAudioPlayingBuffering
Buffering.
AliRtcAudioPlayingBufferingEnd
Buffering is complete.
AliRtcAudioPlayingFailed
Playback failed.
AliRtcUserVolumeInfo: User volume information.
Parameter
Type
Description
uid
NSString * _Nonnull
The UID of the current user. Valid values:
0: The local user.
1: The remote mixed stream.
Other values: A remote user.
volume
int
The volume in the current callback.
speech_state
BOOL
true: The user is speaking.
false: The user is not speaking.
AliRtcAudioDataSample: Audio samples.
Parameter
Type
Description
dataPtr
long
A pointer to the audio data.
numOfSamples
int
The number of sample points for each channel.
bytesPerSample
int
The number of bytes per sample point. For Pulse-Code Modulation (PCM), this is typically 16 bits, which is 2 bytes.
numOfChannels
int
The number of channels. Valid values:
1: Mono.
2: Stereo.
samplesPerSec
int
The number of sample points per channel per second, which is the sample rate.
AliRtcVideoDataSample: Video samples.
Parameter
Type
Description
format
The video data format.
type
The video data type.
pixelBuffer
CVPixelBufferRef _Nullable
The pixel buffer data.
dataPtr
long
A pointer to the YUV data.
dataYPtr
long
A pointer to the Y component.
dataUPtr
long
A pointer to the U component.
dataVPtr
long
A pointer to the V component.
dataLength
long
The data size.
strideY
int
The row span of the Y buffer in the YUV data.
strideU
int
The row span of the U buffer in the YUV data.
strideV
int
The row span of the V buffer in the YUV data.
stride
int
The stride for the RGB type.
height
int
The height of the video frame.
width
int
The width of the video frame.
rotation
int
The rotation angle of the video frame.
timeStamp
long long
The timestamp.
AliRtcChannelProfile: Channel modes.
Enumeration name
Description
AliRtcCommunication
Communication mode.
AliRtcInteractivelive
Interactive mode.
AliRtcInteractiveWithLowLatencyLive
Low-latency live streaming mode.
AliRtcClientRole: User roles.
Enumeration name
Description
AliRtcClientRoleInteractive
Streamer role.
AliRtcClientRolelive
Viewer role.
AliRtcStats: Session statistics.
Parameter
Type
Description
sent_kbitrate
long long
The sending bitrate.
rcvd_kbitrate
long long
The receiving bitrate.
sent_bytes
long long
The number of bytes sent.
rcvd_bytes
long long
The number of bytes received.
systemCpuUsage
float
The system CPU utilization.
cpu_usage
float
The CPU utilization of the RTC process.
video_rcvd_kbitrate
long
The video receiving bitrate.
video_sent_kbitrate
long
The video sending bitrate.
call_duration
long
The call duration in seconds.
sent_loss_rate
long
The packet loss rate from the client to the server.
sent_loss_pkts
long long
The number of lost packets from the client to the server.
sent_expected_pkts
long long
The total number of packets from the client to the server.
rcvd_loss_rate
long long
The downstream packet loss rate from the client to the server.
rcvd_loss_pkts
long long
The number of downstream lost packets from the client to the server.
rcvd_expected_pkts
long long
The total number of downstream packets from the client to the server.
lastmile_delay
int
The latency in milliseconds.
available_sent_kbitrate
long long
The available bandwidth in kb.
AliRtcLocalVideoStats: Local video statistics.
Parameter
Type
Description
track
The stream type.
capture_width
unsigned int
The capture width.
capture_height
unsigned int
The capture height.
encode_width
unsigned int
The encoding width.
encode_height
unsigned int
The encoding height.
sent_bitrate
unsigned int
The publishing bitrate.
sent_fps
unsigned int
The publishing frame rate.
encode_fps
unsigned int
The encoding frame rate.
target_encode_bitrate
unsigned int
The target encoding bitrate.
actual_encode_bitrate
unsigned int
The actual encoding bitrate.
capture_fps
unsigned int
The capture frame rate.
AliRtcRemoteVideoStats: Remote video statistics.
Parameter
Type
Description
userId
NSString * _Nonnull
The user ID.
track
The video stream type.
width
unsigned int
The width.
height
unsigned int
High
decode_fps
unsigned int
The encoder output frame rate.
render_fps
unsigned int
The renderer output frame rate.
frozen_times
iunsigned int
The number of stutters.
video_total_frozen_time
unsigned int
The total stutter duration of video playback in ms.
video_total_frozen_rate
unsigned int
The total stutter rate of video playback in percentage (%). The stutter rate is calculated as: Total stutter duration of video playback / Total duration of video playback.
AliRtcLocalAudioStats: Local audio statistics.
Parameter
Type
Description
track
The audio stream type.
sent_bitrate
int
The sending bitrate in Kbps.
sent_samplerate
int
The sending sample rate.
num_channel
int
The number of sound channels.
sendLoss
int
The sending packet loss rate.
AliRtcRemoteAudioStats: Remote audio statistics.
Parameter
Type
Description
userId
NSString * _Nonnull
The UID of the remote user.
track
The audio stream type.
sample_rate
unsigned int
The sample rate.
channels
unsigned int
The number of sound channels.
quality
unsigned int
The audio quality. For more information, see AliRtcTranportAudioQuality
audio_loss_rate
unsigned int
The audio frame loss rate in the callback epoch.
rcvd_bitrate
unsigned int
The instantaneous bitrate of the received stream, in Kbps.
network_transport_delay
unsigned int
The network latency from the sender to the accepter, in milliseconds.
jitter_buffer_delay
unsigned int
The network delay from the receiving end to the jitter buffer, in milliseconds.
AliRtcVideoObserPosition: The output positions of video data.
Enumeration name
Description
AliRtcPositionPostCapture
The video data after it is captured. The data is provided in the onCaptureVideoSample callback.
AliRtcPositionPreRender
Renders video data, which is returned in the onCaptureVideoSample callback.
AliRtcPositionPreEncoder
The video data before it is encoded. The data is provided in the onCaptureVideoSample callback.
AliRtcVideoFormat: The video data format.
Enumeration
Description
AliRtcVideoFormat_UNKNOW
Unknown.
AliRtcVideoFormat_BGRA
BGRA.
AliRtcVideoFormat_I420
I420.
AliRtcVideoFormat_NV21
NV21.
AliRtcVideoFormat_NV12
NV12.
AliRtcVideoFormat_RGBA
RGBA.
AliRtcVideoFormat_I422
I422.
AliRtcVideoFormat_ARGB
ARGB.
AliRtcVideoFormat_ABGR
ABGR.
AliRtcVideoFormat_RGB24
RGB24.
AliRtcVideoFormat_BGR24
BGR24.
AliRtcVideoFormat_RGB565
RGB565.
AliRtcVideoFormat_TextureOES
OES texture.
AliRtcVideoFormat_Texture2D
Texture2D texture.
AliRtcVideoFormat_H264
H.264 encoded stream.
AliRtcVideoFormat_H265
H.265 encoded stream.
AliRtcVideoFormat_File
File.
AliRtcVideoFormat_cvPixelBuffer
cvPixelBuffer.
AliRtcConnectionStatus: The network connectivity status.
Enumeration
Description
AliRtcConnectionStatusInit
Initialization is complete.
AliRtcConnectionStatusDisconnected
The network connection is disconnected.
AliRtcConnectionStatusConnecting
Establishing a network connection.
AliRtcConnectionStatusConnected
The network is connected.
AliRtcConnectionStatusReconnecting
Re-establishing the network connection.
AliRtcConnectionStatusFailed
The network connection failed.
AliRtcConnectionStatusChangeReason: The reason for a change in the network connection status.
Enumeration
Description
AliRtcConnectionChangedDummyReason
Unknown reason.
AliRtcConnectionChangedMediaPathChanged
Media channel changed.
AliRtcConnectionChangedSignalingHeartbeatTimeout
Heartbeat timeout.
AliRtcConnectionChangedSignalingHeartbeatAlive
Heartbeat recovered.
AliRtcConnectionChangedSignalingHttpdnsResolved
DNS resolution succeeded.
AliRtcConnectionChangedSignalingHttpdnsFailure
DNS resolution failed.
AliRtcConnectionChangedSignalingGslbFailure
GSLB request failed.
AliRtcConnectionChangedSignalingGslbSucccess
GSLB request succeeded.
AliRtcConnectionChangedSignalingJoinChannelFailure
Failed to join the channel.
AliRtcConnectionChangedSignalingJoinChannelSuccess
Joined the channel successfully.
AliRtcConnectionChangedSignalingLeaveRoom
Left the channel.
AliRtcConnectionChangedSignalingConnecting
Establishing a signaling connection.
AliRtcConnectionChangedNetworkInterrupted
Network connection interrupted.
AliRtcVideoTrack: The video stream type.
Enumeration Name
Description
AliRtcVideoTrackNo
No video stream.
AliRtcVideoTrackCamera
Camera stream.
AliRtcVideoTrackScreen
Screen sharing stream.
AliRtcVideoTrackBoth
Camera and screen sharing.
AliRtcPublishState: Stream ingest states.
Enumeration
Description
AliRtcStatsPublishIdle
Initial status.
AliRtcStatsNoPublish
No stream ingest.
AliRtcStatsPublishing
Ingesting stream.
AliRtcStatsPublished
Stream ingested.
AliRtcSubscribeState: Subscription states.
Enumeration name
Description
AliRtcStatsSubscribeIdle
Initial status.
AliRtcStatsNoSubscribe
Not subscribed.
AliRtcStatsSubscribing
Subscribing.
AliRtcStatsSubscribed
Subscribed.
AliRtcUserOfflineReason: The reason why a user goes offline.
Enumerator
Description
AliRtcUserOfflineQuit
The user left the channel.
AliRtcUserOfflineDropped
The user dropped due to a timeout because no data packets were received for an extended period.
AliRtcUserOfflineBecomeAudience
The user's role switched from streamer to viewer.
AliRtcVideoStreamType: The camera stream type.
Enumerator
Description
AliRtcVideoStreamTypeNone
No video stream.
AliRtcVideoStreamTypeHigh
Large stream
AliRtcVideoStreamTypeLow
Low stream.
AliRtcAudioTrack: The audio stream type.
Enumeration
Description
AliRtcAudioTrackNo
No audio stream.
AliRtcAudioTrackMic
Microphone stream.
AliRtcAudioTrackDual
Second audio stream.
AliRtcAudioTrackBoth
Microphone stream and second audio stream.
AliRtcNetworkQuality indicates the network quality.
Enumeration name
Description
AlivcRtcNetworkQualityExcellent
The network quality is excellent. The stream is smooth and has good definition.
AlivcRtcNetworkQualityGood
The network is good. The smoothness and definition are comparable to the Excellent quality level.
AlivcRtcNetworkQualityPoor
The network is poor. Audio and video quality is slightly impaired. Communication is not affected.
AlivcRtcNetworkQualityBad
The network connection is poor. The video lags critically, but the audio is normal.
AlivcRtcNetworkQualityVeryBad
The network is very poor. Communication is nearly impossible.
AlivcRtcNetworkQualityDisconnect
Network disconnected.
AlivcRtcNetworkQualityUnknown
Unknown cause.
AliRtcOrientationMode: Specifies the screen orientation. This parameter applies to iOS only.
Enumeration name
Description
AliRtcOrientationModePortrait
Fixed portrait mode.
AliRtcOrientationModeLandscapeLeft
Fixed left landscape mode.
AliRtcOrientationModePortraitUpsideDown
Fixed inverted mode.
AliRtcOrientationModeLandscapeRight
Fixed reverse landscape mode.
AliRtcOrientationModeAuto
Automatic rotation mode.
AliRtcAudioSessionOperationRestriction: Permissions for the SDK to control the Audio Session (iOS only).
Enumeration
Description
AliRtcAudioSessionOperationRestrictionNone
No restrictions. The SDK has full control of AVAudioSession.
AliRtcAudioSessionOperationRestrictionSetCategory
The SDK cannot modify the category of AVAudioSession.
AliRtcAudioSessionOperationRestrictionConfigureSession
The SDK cannot modify the configuration of AVAudioSession, including its Category, Mode, and CategoryOptions.
AliRtcAudioSessionOperationRestrictionDeactivateSession
The SDK cannot deactivate AVAudioSession. When a user leaves the channel, AVAudioSession remains active.
AliRtcAudioSessionOperationRestrictionAll
The SDK does not modify the configuration of AVAudioSession. This applies all three of the preceding restrictions.
AliRtcRenderMode: The rendering mode.
Enumeration name
Description
AliRtcRenderModeAuto
Auto.
AliRtcRenderModeStretch
Stretches the video to fill the view. The aspect ratio is not preserved.
AliRtcRenderModeFill
Scales the video while preserving the aspect ratio. Black bars are added to fill the view.
AliRtcRenderModeClip
Scales the video while preserving the aspect ratio. The video is cropped to fit the view.
AliRtcRenderMirrorMode: The mirror mode.
Enumeration name
Description
AliRtcRenderMirrorModeOnlyFrontCameraPreviewEnabled
Only the front camera preview is mirrored. Other views are not mirrored.
AliRtcRenderMirrorModeAllEnabled
All images.
AliRtcRenderMirrorModeAllDisable
No views are mirrored.
AliRtcRotationMode: Specifies the rotation angle.
Enumeration name
Description
AliRtcRotationMode_0
No rotation.
AliRtcRotationMode_90
Rotate 90 degrees.
AliRtcRotationMode_180
Rotates the video by 180 degrees.
AliRtcRotationMode_270
Rotates 270 degrees.
AliRtcLogLevel: The log level.
Enumeration
Description
AliRtcLogLevelInfo
Standard
AliRtcLogLevelWarn
Warning.
AliRtcLogLevelError
Error.
AliRtcLogLevelFatal
Critical.
AliRtcLogLevelNone
None.
AliRtcAudioNumChannel: The number of audio channels.
Enumeration name
Description
AliRtcMonoAudio
Mono.
AliRtcStereoAudio
Two sound channels.
AliRtcAudioSampleRate: The audio sample rate for recording.
Enumeration Name
Description
AliRtcAudioSampleRate_8000
Sample rate 8000 Hz.
AliRtcAudioSampleRate_11025
Sample rate 11025 Hz.
AliRtcAudioSampleRate_16000
Sample rate 16000 Hz.
AliRtcAudioSampleRate_22050
Sample rate 22050 Hz.
AliRtcAudioSampleRate_32000
Sample rate 32000 Hz.
AliRtcAudioSampleRate_44100
Sample rate 44100 Hz.
AliRtcAudioSampleRate_48000
Sample rate 48000 Hz.
AliRtcAudioSampleRate_Unknown
Unknown sample rate. Used in certain cases.
AliRtcRecordType: The recording type.
Enumeration name
Description
AliRtcRecordTypeAudio
Records an audio-only file.
AliRtcRecordTypeVideo
Records a video file.
AliRtcRecordFormat: The format of the recording.
Enumeration name
Description
AliRtcRecordFormatAAC
AAC file.
AliRtcRecordFormatWAV
WAV file.
AliRtcRecordFormatMP4
MP4 file.
AliRtcAudioQuality: The audio quality for recording.
Enumeration value
Description
AliRtcAudioQualityLow
Low.
AliRtcAudioQualityMidium
Medium.
AliRtcAudioQualityHigh
High.
AliRtcVideoQuality: Specifies the quality of the recorded video.
Enumeration name
Description
AliRtcVideoQualityDefault
The default value is the same as the value for collection.
AliRtcVideoCodecType: The video codec type.
Enumeration
Description
AliRtcVideoCodecTypeDefault
The default hardware video encoder.
AliRtcVideoCodecTypeSoftware
The software video encoder.
AliRtcVideoCodecTypeHardware
The hardware video encoder.
AliRtcVideoDecoderConfiguration: Video decoder settings.
Parameter
Type
Description
codecType
The codec type.
The default value is AliRtcVideoCodecTypeDefault. This uses the system default settings.
enableDecoderBframe
NSInteger
Specifies whether to enable B-frames for the decoder.
The default value is -1. Set this parameter to 0 to disable B-frames, or to 1 to enable B-frames.
backgroundHardwareToSoftware
NSInteger
Specifies whether to downgrade from hardware decoding to software decoding when the app runs in the background.
The default value is -1. Set this parameter to 0 to disable the downgrade, or to 1 to enable it.
AliRtcVideoEncodeCodecType: The encoder type.
Enumeration
Description
AliRtcVideoEncodeCodecTypeDefault
The default value. The current default is H.264.
AliRtcVideoEncodeCodecTypeH264
H.264 encoding.
AliRtcVideoEncodeCodecTypeHevc
HEVC encoding.
AliRtcTranportAudioQuality: The audio quality.
Enumeration name
Description
AliRtcAudioQualityUnknown
Unknown quality.
AliRtcAudioQualityExcellent
Excellent quality.
AliRtcAudioQualityGood
The perceived audio quality is similar to Excellent, but the bitrate may be slightly lower.
AliRtcAudioQualityPoor
The user perceives minor quality issues, but communication is unaffected.
AliRtcAudioQualityBad
Can communicate, but with difficulty.
AliRtcAudioQualityVeryBad
The network quality is very poor. Communication is almost impossible.
AliRtcAudioQualityNetworkDisconnected
Network connectivity is lost, and no communication is possible.
AliRtcAudioProfile: Specifies the audio quality mode.
Enumeration name
Description
AliRtcEngineLowQualityMode
Low audio quality mode.
AliRtcEngineBasicQualityMode
Standard audio quality mode.
AliRtcEngineHighQualityMode
High-quality audio mode.
AliRtcEngineStereoHighQualityMode
High-quality stereo mode.
AliRtcEngineSuperHighQualityMode
Ultra-high audio quality mode.
AliRtcEngineStereoSuperHighQualityMode
Stereo ultra-high audio quality mode.
AliRtcAudioScenario: The audio scenario.
Enumeration name
Description
AliRtcSceneDefaultMode
The default scenario. Recommended for general Real-Time Communication scenarios.
AliRtcSceneEducationMode
The education scenario. This mode prioritizes audio continuity and stability.
AliRtcSceneMediaMode
Media scenario. Preserves high-quality audio for human voices and music. Recommended for co-hosted live channels.
AliRtcSceneMusicMode
Recommended for scenarios that require high-fidelity music quality, such as music playback and musical instrument instruction.
AliRtcSceneChatroomMode
Chat room scenario. This is for chats where users frequently join and leave as speakers.
AliRtcMuteLocalAudioMode: The local audio muting mode.
Enumeration name
Description
AliRtcMuteAudioModeDefault
Default mode. Mutes all audio, including the microphone and external audio input.
AliRtcMuteAllAudioMode
Mutes all audio, including the microphone and external audio input.
AliRtcMuteOnlyMicAudioMode
Mutes only the microphone.
AliRtcMuteLocalAudioMax
Placeholder.
AliRtcRecordAudioConfig: Audio recording settings.
Parameter
Type
Description
sampleRate
The audio sampling rate.
quality
The audio quality.
enableRecordExternalRenderPCM
bool
Specifies whether to record rendering data from external Pulse-Code Modulation (PCM) input.
AliRtcRecordVideoConfig: Settings for video recording.
Parameter
Type
Description
quality
The video quality.
AliRtcBeautyConfig: Basic retouching settings.
Parameter
Type
Description
whiteningLevel
float
The whitening level. The value ranges from 0 to 1. A larger value provides a stronger whitening effect.
smoothnessLevel
float
The smoothing level. The value ranges from 0 to 1. A larger value provides a stronger smoothing effect.
AliRtcOnByeType: An enumeration of OnBye event types.
Enumeration name
Description
AliRtcOnByeBeKickedOut
The user was kicked out.
AliRtcOnByeChannelTerminated
The channel was terminated.
AliRtcOnByeUserReplaced
The current device was forced offline because a user with the same user ID joined the channel from another device.
AliRtcAudioEffectVoiceChangerMode: The mode for the voice changer effect.
Enumeration name
Description
AliRtcAudioEffectvVoiceChanger_OFF
Shutdown.
AliRtcAudioEffectvVoiceChanger_OLD_MAN
Old man.
AliRtcAudioEffectvVoiceChanger_BABYBOY
Boy.
AliRtcAudioEffectvVoiceChanger_BABYGILR
Girl.
AliRtcAudioEffectvVoiceChanger_ROBOT
Robot.
AliRtcAudioEffectvVoiceChanger_DAIMO
Demon Lord.
AliRtcAudioEffectvVoiceChanger_KTV
KTV.
AliRtcAudioEffectvVoiceChangerR_ECHO
Echo.
AliRtcAudioEffectvVoiceChangerR_DIALECT
Dialect.
AliRtcAudioEffectvVoiceChangerR_HOWL
Roar.
AliRtcAudioEffectvVoiceChangerR_ELECTRONIC
Electronic music.
AliRtcAudioEffectvVoiceChangerR_PHONOGRAPH
Phonograph.
AliRtcAudioEffectvVoiceChanger_MAX
This is a placeholder with no meaning.
AliRtcAudioEffectReverbMode: The reverb effect mode.
Enumeration name
Description
AliRtcAudioEffectReverb_Off
Off.
AliRtcAudioEffectReverb_Vocal_I
Vocal I.
AliRtcAudioEffectReverb_Vocal_II
Vocal II.
AliRtcAudioEffectReverb_Bathroom
Bathroom.
AliRtcAudioEffectReverb_Small_Room_Bright
Bright small room.
AliRtcAudioEffectReverb_Small_Room_Dark
Dark small channel.
AliRtcAudioEffectReverb_Medium_Room
Medium channel.
AliRtcAudioEffectReverb_Large_Room
Large channel.
AliRtcAudioEffectReverb_Church_Hall
Church aisle.
AliRtcAudioEffectReverb_Mode_Max
This placeholder has no meaning.
AliRtcAudioEffectReverbParamType: The parameters for the reverb sound effect.
Enumeration name
Description
AliRtcAudioEffectReverb_Room_Size
The size of the room. The value range is [0, 100].
AliRtcAudioEffectReverb_Pre_Delay
The pre-delay in ms. The value range is [0, 200].
AliRtcAudioEffectReverb_Revetberance
Reverberance. The value range is [0, 100].
AliRtcAudioEffectReverb_Hf_Damping
Damping. The value range is [0, 100].
AliRtcAudioEffectReverb_Tone_Low
Low tone. The value range is [0, 100].
AliRtcAudioEffectReverb_Tone_High
The pitch. The value range is [0, 100].
AliRtcAudioEffectReverb_Dry_Gain
Dry gain. The valid range is [-20, 10].
AliRtcAudioEffectReverb_Wet_Gain
The wet gain has a value range of [-20, 10].
AliRtcAudioEffectReverb_Type_Max
This is a placeholder with no meaning.
AliRtcAudioRouteType: The audio route. This parameter is for iOS only.
Enumeration name
Description
AliRtcAudioRouteTypeDefault
The default audio route.
AliRtcAudioRouteTypeHeadset
Headset.
AliRtcAudioRouteTypeEarpiece
Earpiece.
AliRtcAudioRouteTypeHeadsetNoMic
Headset without a mic.
AliRtcAudioRouteTypeSpeakerphone
Phone speaker.
AliRtcAudioRouteTypeLoudSpeaker
External speakers.
AliRtcAudioRouteTypeBlueTooth
Bluetooth headphones.
AliVideoCanvas is a rendering canvas.
Parameter
Type
Description
view
UIView * _Nonnull
The rendering view. This parameter cannot be nil.
renderMode
The rendering mode. The default is AliRtcRenderModeAuto.
mirrorMode
The mirroring mode. The default value is AliRtcRenderMirrorModeOnlyFront.
backgroundColor
int
The background color in RGB Hex format.
rotationMode
The angle to rotate the video. The default is no rotation.
AliRtcTrascodingLiveStreamErrorCode: The error code for bypass stream ingest.
Enumeration name
Description
AliRtcTrascodingLiveStreamErrorPublishOk
Stream ingest succeeded.
AliRtcTrascodingLiveStreamErrorStreamNotFound
Fault: Stream not found.
AliRtcTrascodingLiveStreamErrorStreamAlreadyExist
Error: The target stream already exists.
AliRtcTrascodingLiveStreamErrorInvalidParam
Error: Invalid parameter.
AliRtcTrascodingLiveStreamErrorInternalError
Error: Internal error.
AliRtcTranscodingLiveStreamErrorRtmpServerError
Error: RTMP service fault.
AliRtcTrascodingLiveStreamErrorRtmpStreamUrlError
Fault: Abnormal URL.
AliRtcTranscodingLiveStreamErrorPublishTimeout
Error: Task timeout.
AliRtcTranscodingLiveStreamErrorNotAuthorized
Error: Operation not authorized.
AliRtcWatermarkConfig: Contains the settings for the watermark image.
Parameter
Type
Description
visibleInPreview
BOOL
Specifies whether the watermark is visible in the local preview.
positionInLandscapeMode
CGRect
The watermark coordinates in landscape mode.
positionInPortraitMode
CGRect
The watermark coordinates in portrait mode.
alpha
float
Transparency.
normalized
BOOL
Whether to normalize.
AliRtcCameraCapturerConfiguration: The preferences for camera capture.
Parameter
Type
Description
preference
The capture preference.
cameraDirection
The camera direction.
fps
int
Specifies the frame rate for camera capture and preview. This allows the preview frame rate to be different from the encoding frame rate. For the encoding frame rate setting, see frameRate in AliRtcVideoEncoderConfiguration.
cameraCaptureProfile
Specifies the resolution for video capture.
disableVideoCaptureReverse
int
Disables flipping captured video frames based on the aspect ratio.
enableCameraMacroFocus
int
Enables macro focus adjustment.
captureObserverOriginal
int
Specifies whether to call back the original video frame data.
nativeBufferObserver
int
The texture ID of the callback.
captureCallbackCvpixelbufferToRaw
int
Uses the CVPixelBuffer callback for video capture
AliRtcCameraDirection: The camera direction.
Enumeration
Description
AliRtcCameraDirectionInvalid
Unknown.
AliRtcCameraDirectionBack
Rear camera.
AliRtcCameraDirectionFront
Front camera.
AliRtcCameraCaptureProfile: Specifies the camera capture resolution.
Enumeration
Description
AliRtcCameraCaptureProfileDefault
Default.
AliRtcCameraCaptureProfile1080P
Enables camera capture at 1080p resolution for video.
AliRtcCaptureOutputPreference: The preferences for camera capture output.
Enumeration name
Description
AliRtcCaptureOutputPreferenceAuto
Automatically adjusts capture parameters.
AliRtcCaptureOutputPreferencePerformance
Prioritizes device performance. Selects the camera output parameters that most closely match the parameters set by setVideoProfile.
AliRtcCaptureOutputPreferencePreview
Select higher camera output parameters to prioritize video preview quality.
AliRtcVideoEncoderFrameRate: The frame rate for video encoding.
Enumeration name
Description
AliRtcVideoEncoderFrameRate_FPS_5
5 FPS.
AliRtcVideoEncoderFrameRate_FPS_10
10 FPS.
AliRtcVideoEncoderFrameRate_FPS_15
15 FPS.
AliRtcVideoEncoderFrameRate_FPS_20
20 FPS.
AliRtcVideoEncoderFrameRate_FPS_30
30 FPS.
AliRtcVideoEncoderBitrate: The video encoding bitrate.
Enumeration name
Description
AliRtcVideoEncoderStandardBitrate
Standard bitrate mode.
AliRtcVideoEncoderMirrorMode: The mirror mode for encoded video.
Enumeration name
Description
AliRtcVideoEncoderMirrorModeDisabled
Mirrors the encoded video.
AliRtcVideoEncoderMirrorModeEnabled
Does not mirror the encoded video.
AliRtcVideoEncoderOrientationMode: The orientation mode for video encoding.
Enumeration name
Description
AliRtcVideoEncoderOrientationModeAdaptive
Automatic rotation. The orientation is consistent with the captured video.
AliRtcVideoEncoderOrientationModeFixedLandscape
Fixed landscape orientation.
AliRtcVideoEncoderOrientationModeFixedPortrait
Fixed portrait orientation.
AliRtcVideoEncoderConfiguration: Configures the video encoding preferences.
Parameter
Type
Description
dimensions
CGSize
The video resolution.
frameRate
NSInteger
The frame rate for video encoding.
bitrate
NSInteger
The video encoding bitrate.
min_bitrate
NSInteger
The minimum video encoding bitrate in Kbps. The default value is 0.
keyFrameInterval
NSInteger
The keyframe interval in milliseconds. The default value is 0. A value of 0 means the SDK controls the keyframe interval.
forceStrictKeyFrameInterval
bool
Specifies whether the encoder must strictly follow the set keyframe interval. The default value is false.
false: The encoder responds to external keyframe requests, such as when a new subscriber joins. The actual keyframe interval may differ from the set value.
true: The encoder ignores other keyframe requests and generates keyframes strictly at the set interval. This may delay the first frame for subscribers.
mirrorMode
The mirror mode for the encoded video.
orientationMode
The orientation mode for video encoding.
rotationMode
The video rotation angle.
codecType
The codec type.
encoderType
The video encoding type.
seiForceFrontIFrame
NSInteger
Specifies whether to force an I-frame before an SEI message is sent.
A value of -1 uses the default setting. A value of 0 does not force an I-frame. A value of 1 forces an I-frame (default).
enableDynamicEncode
NSInteger
Specifies whether to enable dynamic encoding.
When enabled, the system creates both a hardware and a software encoder. If the hardware encoder fails, the system falls back to the software encoder. A value of -1 uses the default setting. A value of 0 disables this feature. A value of 1 enables this feature.
disableDipenseResolutionChange
NSInteger
Disables the Quality of Service (QoS) feature that lowers resolution.
When QoS detects that the real-time bandwidth is too low for the current resolution, it lowers the video encoding resolution.
-1: Uses the default value. 0: Allows QoS to lower the resolution. 1: Prevents QoS from lowering the resolution.
enableDowngrade
NSInteger
Allows Quality of Service (QoS) to reduce the video encoding bitrate based on the detected bandwidth.
-1 indicates the default value, 0 disables bitrate reduction, and 1 enables bitrate reduction.
enableH264BFrame
NSInteger
Specifies whether to enable H.264 B-frame support.
-1: Use the default value. 0: Disable B-frame support. 1: Enable B-frame support.
ImportantIf you enable this option, the decoder must also have B-frame support enabled.
enableHevcBFrame
NSInteger
Specifies whether to enable HEVC B-frame support.
-1: Uses the default value. 0: Disables B-frame support. 1: Enables B-frame support.
ImportantIf this option is enabled, B-frame support must also be enabled on the decoder.
backgroundHardwareToSoftware
NSInteger
Specifies whether to allow a downgrade to software encoding when the app moves to the background. On iOS devices, hardware encoding stops working when an app is in the background.
A value of -1 uses the default value. A value of 0 disallows the downgrade to software encoding. A value of 1 allows the downgrade to software encoding.
AliRtcScreenShareEncoderConfiguration: The encoding preferences for screen sharing.
Parameter
Type
Description
dimensions
CGSize
The video resolution.
frameRate
NSInteger
The frame rate for video encoding.
Bitrate
NSInteger
Video encoding bitrate.
rotationMode
The rotation angle of the screen.
keyFrameInterval
NSInteger
The Group of Pictures (GOP) in milliseconds. The default value is 0, which indicates that the SDK internally controls the GOP.
forceStrictKeyFrameInterval
bool
Specifies whether the encoder must strictly follow the set Group of Pictures (GOP) size. The default value is false.
false: The encoder responds to keyframe requests, such as when a user joins a meeting. The GOP size does not strictly match the set value.
true: The encoder ignores other keyframe requests and generates keyframes strictly based on the set GOP size. This might delay the first frame for subscribers.
AliRtcAuthInfo: Authentication information.
Parameter
Type
Description
channelId
NSString * _Nonnull
The channel ID.
userId
NSString * _Nonnull
The user ID.
appId
NSString * _Nonnull
The application ID.
nonce
NSString * _Nonnull
A random string.
token
NSString * _Nonnull
The token.
timestamp
long long
The timestamp.
AliRtcDeviceVolumeType: The device volume type (iOS only).
Enumeration
Description
AliRtcDeviceVolumeTypeAuto
The SDK automatically sets the volume type. This is the default value. The SDK internally selects a suitable volume type. Do not set the volume type manually unless you have specific requirements.
AliRtcDeviceVolumeTypeMedia
Sets the volume to media volume. This is suitable for media playback scenarios. The volume can be adjusted to zero.
AliRtcDeviceVolumeTypeVOIP
Sets the volume to call volume. This is suitable for call scenarios. The volume cannot be adjusted to zero.
AliRtcVideoSource: The type of raw video data source.
Enumeration
Description
AliRtcVideosourceCameraType
Video stream.
AliRtcVideosourceScreenShareType
Screen sharing stream.
AliRtcVideosourceTypeMax
Placeholder.
AliRtcAudioSource: The type of raw audio data source.
Enumeration
Description
AliRtcAudioSourceCaptured
Captured audio data.
AliRtcAudioSourceProcessCaptured
Audio data after 3A processing.
AliRtcAudiosourcePub
Audio data for stream ingest.
AliRtcAudioSourcePlayback
Audio data for playback.
AliRtcAudioSourceRemoteUser
Remote audio data from stream pulling.
AliRtcBufferType: The video data type.
Enumeration
Description
AliRtcBufferType_Raw_Data
Raw YUV data.
AliRtcBufferType_CVPixelBuffer
CVPixelBuffer data.
AliRtcBufferType_Texture
Texture.
AliRtcBufferType_File
File path.
AliRtcErrorCode: The error code.
Enumeration name
Description
AliRtcErrNone
None.
AliRtcErrJoinBadAppId
The App ID does not exist.
AliRtcErrJoinInvalidAppId
The App ID is invalid.
AliRtcErrJoinBadChannel
The channel does not exist.
AliRtcErrJoinInvalidChannel
The channel is invalid.
AliRtcErrJoinBadToken
The token does not exist.
AliRtcErrJoinTimeout
The join channel operation timed out.
AliRtcErrJoinBadParam
Invalid parameter.
AliRtcErrMicOpenFail
Failed to initialize the capture device.
AliRtcErrSpeakerOpenFail
Playback device initialization failed.
AliRtcErrMicInterrupt
An error occurred during audio capture.
AliRtcErrSpeakerInterrupt
An error occurred during playback.
AliRtcErrMicAuthFail
The microphone device is not authorized.
AliRtcErrMicNotAvailable
No audio capture device is available.
AliRtcErrSpeakerNotAvailable
No audio playback device is available.
AliRtcErrCameraOpenFail
Capture device initialization failed.
AliRtcErrCameraInterrupt
An error occurred during the capture process.
AliRtcErrDisplayOpenFail
Failed to initialize the rendering device.
AliRtcErrDisplayInterrupt
An exception occurred during rendering.
AliRtcErrIceConnectionConnectFail
Media channel establishment failed.
AliRtcErrIceConnectionReconnectFail
Media channel reconnection failed.
AliRtcErrIceConnectionHeartbeatTimeout
Signaling heartbeat timeout.
AliRtcErrPublishInvalid
The stream publish operation is invalid.
AliRtcErrPublishNotJoinChannel
Stream ingest failed because you have not joined a channel.
AliRtcErrPublishAudioStreamFailed
Failed to push the audio stream.
AliRtcErrPublishVideoStreamFailed
Failed to push the video stream.
AliRtcErrPublishDualStreamFailed
Failed to push the dual stream.
AliRtcErrPublishScreenShareFailed
Failed to push the screen share.
AliRtcErrPublishScreenShareConfigError
Screen sharing configuration error.
AliRtcErrSubscribeInvalid
The subscription is invalid.
AliRtcErrSubscribeNotJoinChannel
Subscription fault because the user has not joined a channel.
AliRtcErrSubscribeAudioStreamFailed
Failed to subscribe to the audio stream.
AliRtcErrSubscribeVideoStreamFailed
Failed to subscribe to the video stream.
AliRtcErrSubscribeDualStreamFailed
Failed to subscribe to the dual stream.
AliRtcErrSubscribeScreenShareFailed
Failed to subscribe to the screen share.
AliRtcErrCdnLiveCommunicationFailed
Signaling failed for low-latency ApsaraVideo Real-time Communication.
AliRtcErrCdnLiveMeidaSettingFailed
Low-latency ApsaraVideo Real-time Communication media setting error.
AliRtcErrCdnLiveNoneBroadcaster
No streamer is publishing a stream in the current low-latency live streaming channel.
AliRtcErrCdnLiveNeedRestart
A low-latency ApsaraVideo Real-time Communication fault. The application layer must create a new SDK instance.
AliRtcErrCdnLiveNeedRestartAgainLater
A low-latency live streaming fault occurred. The application layer must wait for a custom interval and then create a new SDK instance.
AliRtcErrCdnLiveServiceUnavailable
The low-latency ApsaraVideo Real-time Communication service is unavailable or degraded.
AliRtcErrCdnLiveMediaConnectionInterruption
The network connection for low-latency live streaming was interrupted.
AliRtcErrSdkInvalidState
Invalid SDK state.
AliRtcErrSessionRemoved
The session was removed.
AliRtcErrInvalidArguments
Invalid parameters.
AliRtcErrAudioBufferFull
The buffer queue for the external raw data transmission feature is saturated.
AliRtcErrVideoBufferFull
The buffer queue for exporting raw data is saturated.
AliRtcErrUpdateRoleChannel
A role-setting fault occurs in interactive mode.
AliRtcErrInner
Other errors.
AliRtcExternalDeviceType: The type of the external device (for macOS only).
Enumeration name
Description
AliRtcExternalTypeUnknown
Unknown type.
AliRtcExternalTypeAudioCapture
Audio capture device.
AliRtcExternalTypeAudioPlayout
Audio playback device.
AliRtcExternalTypeVideoCapture
Video capture device.
AliRtcExternalDeviceState: External device status (macOS only).
Enumeration
Description
AliRtcExternalDeviceAdd
An external device is added.
AliRtcExternalDeviceRemove
An external device is removed.
AliRtcRecordVideoCanvasConfig: The canvas size for video recording (macOS only).
Parameter
Type
Description
canvasWidth
int
The width of the canvas.
canvasHeight
int
The height of the canvas.
AliRtcRecordVideoLayout: The video recording layout (macOS only).
Parameter
Type
Description
mode
The layout mode.
backColor
The background color.
shapes
NSMutableArray<AliRtcRecordVideoRegion *> * _Nullable
The screen position of each user.
AliRtcRecordVideoLayoutMode: The layout mode for video recording (macOS only).
Enumeration
Description
AliRtcRecordVideoLayoutMode_GRID
Grid layout.
AliRtcRecordVideoLayoutMode_SPEAKER
Speaker layout.
AliRtcRecordVideoLayoutMode_UNIQUE
Single-stream layout.
AliRtcRecordVideoLayoutMode_CUSTOM
Custom layout.
AliRtcRecordVideoBgColor: The background color for video recordings on macOS.
Parameter
Type
Description
r
uint8_t
The value of the red component in the color mix.
g
uint8_t
The green value in the color mix.
b
uint8_t
The blue value in the color scheme.
AliRtcRecordVideoRegion: The configuration for a user's video in the recording layout (macOS only).
Parameter
Type
Description
userId
NSString * _Nonnull
The user ID.
sourceType
The type of the raw video data source.
area
The position of the user's video.
AliRtcRecordVideoRectangle: The position of the user's video (macOS only).
Parameter
Type
Description
left
The left margin.
top
Top margin.
width
The width.
height
Height.
AliRtcRecordVideoRational: Coordinates for mixed stream recording (macOS only).
Parameter
Type
Description
numerator
uint32_t
The numerator (an integer).
denominator
uint32_t
The denominator (an integer).
AliRtcRecordTemplate: Specifies the recording template (macOS only).
Parameter
Type
Description
recordType
The record type.
recordFormat
The recording format.
sampleRate
The audio sampling rate for recording.
audioQuality
The audio quality of the recording.
enableRecordExternalCapturePCM
bool
Specifies whether to mix and record the externally input audio.
enableRecordExternalRenderPCM
bool
Specifies whether to mix and record the audio from an external input after rendering.
canvas
The canvas size of the recorded video.
fps
int
The frame rate.
bitrate
int
The bitrate.
isFragment
bool
Specifies if a segmented MP4 file is recorded. The default value is true.
AliRtcDeviceInfo: Device information (macOS only).
Parameter
Type
Description
deviceName
NSString * _Nullable
The device name.
deviceID
NSString * _Nullable
The device ID.
AliRtcScreenShareConfig: The screen share configuration (macOS only).
Parameter
Type
Description
isShareByRegion
bool
Indicates whether to share a region of the screen.
shareRegion
AliRtcScreenShareRegion* _Nonnull
The layout information for the shared region.
AliRtcScreenShareRegion: The screen sharing area (macOS only).
Parameter
Type
Description
originX
float
The x-coordinate.
originY
float
The y-coordinate.
width
float
The width.
height
float
The height.
AliRtcScreenSourceInfo: Information about the screen sharing source (macOS only).
Parameter
Type
Description
sourceId
NSString * _Nonnull
The sharing source ID.
sourceName
NSString * _Nonnull
The sharing source name.
AliRtcScreenShareInfo: The configuration for screen sharing (macOS only).
Parameter
Type
Description
sourceType
The sharing type.
sourceId
NSString * _Nonnull
The ID of the sharing source.
config
AliRtcScreenShareConfig * _Nonnull
Screen sharing configuration.
AliRtcScreenShareType: The type of screen sharing (macOS only).
Enumeration name
Description
AliRtcScreenShareDesktop
Shares the desktop.
AliRtcScreenShareWindow
Shares a window.
AliRtcVideoObserAlignment: The alignment of the video output width.
Enumeration name
Description
AliRtcAlignmentDefault
Retains the original video width. This is the default.
AliRtcAlignmentEven
The width is aligned to an even number.
AliRtcAlignment4
The width is a multiple of 4.
AliRtcAlignment8
The width is a multiple of 8.
AliRtcAlignment16
The width is a multiple of 16.
AliRtcShowDebugViewType: The type of gauge to display.
Enumeration member
Description
AliRtcShowTypeNone
Not displayed.
AliRtcShowTypeAudio
Audio.
AliRtcShowTypeVideo
Video.
AliRtcShowTypeNetwork
Network.
AliRtcShowTypeAll
All.
AliRtcTranscodingLiveTaskStatus: The status of the bypass live stream ingest task.
Enumeration name
Description
AliRtcTrascodingLiveTaskStatusStart
The task starts.
AliRtcTrascodingLiveTaskStatusUpdate
The task is updated.
AliRtcTrascodingLiveTaskStatusStop
The task has stopped.
AliRtcLiveTranscodingDisplayType: The display type for images in a bypass live stream.
Enumeration name
Description
NOT_DISPLAY
Not displayed.
ALWAYS
Always displayed.
WHEN_NO_VIDEO
Displayed when no video is available.
AliRtcLiveTranscodingFontType: The font type for bypass live streaming text.
Enumeration Name
Description
NOTO_SERIF_CJKSC_REGULAR
Noto Serif CJK SC Regular.
ALIBABA_PUHUITI_REGULAR
Alibaba PuHuiTi Regular.
ALIBABA_PUHUITI_BOLD
Alibaba PuHuiTi Bold.
ALIBABA_PUHUITI_Heavy
Alibaba PuHuiTi Heavy.
ALIBABA_PUHUITI_LIGHT
Alibaba PuHuiTi Light.
ALIBABA_PUHUITI_MEDIUM
Alibaba PuHuiTi Medium.
AliRtcLiveTranscodingSegmentType specifies the segmentation type for bypass live streaming.
Enumeration name
Description
AliRtcLiveTranscodingNoBody
No portrait segmentation.
AliRtcLiveTranscodingBody
Portrait segmentation.
AliRtcLiveTranscodingSourceType: The input source type for bypass live streaming.
Enumeration Name
Description
AliRtcLiveTranscodingCamera
Camera.
AliRtcLiveTranscodingShareScreen
Screen sharing.
AliRtcVideoState: The video stream status.
Enumeration
Description
AliRtcVideoVideoClose
Shuts down the video stream.
AliRtcVideoVideoOpen
Resumes the video stream.
AliRtcVideoReason: The reason for a change in the video stream status.
Enumeration
Description
AliRTCVideoChangedByClient
Client.
AliRTCVideoChangedByServer
Server.
AliRtcLiveTranscodingCropMode: Specifies the crop mode for bypass live streaming.
Enumeration name
Description
AliRtcLiveTranscodingCrop
Crops the video and maintains the aspect ratio.
AliRtcLiveTranscodingFill
Keeps the aspect ratio and adds borders (default).
AliRtcLiveTranscodingMediaProcessMode: The media processing mode for bypass live streaming.
Enumeration
Description
AliRtcLiveTranscodingNormal
General mode.
AliRtcLiveTranscodingVirtualBackground
Virtual background mode.
AliRtcLiveTranscodingStreamType: Specifies the type of a bypass live publishing stream.
Enumeration name
Description
AliRtcLiveTranscodingOrigin
Relay the source stream.
AliRtcLiveTranscodingAudio
Pushes only the audio stream.
AliRtcLiveTranscodingVideo
Relays only the video stream.
AliRtcLiveTranscodingMixMode: The bypass streaming mode.
Enumeration
Description
AliRtcLiveTranscodingSINGLE
Pushes a single stream without stream mixing or transcoding. You do not need to configure parameters for stream mixing and transcoding.
AliRtcLiveTranscodingMIX
Stream mixing and transcoding (Default). Supports mixed and transcoded output.
AliRtcLiveTranscodingState: The bypass stream ingest status.
Enumeration
Description
AliRtcLiveTranscodingState_IDLE
Stream ingest is idle.
AliRtcLiveTranscodingState_CONNNECT
Connecting to the stream ingest server.
AliRtcLiveTranscodingState_RUNNING
Stream ingest is in progress.
AliRtcLiveTranscodingState_RECOVERING
Recovering the stream ingest.
AliRtcLiveTranscodingState_FAILURE
Stream ingest failed.
AliRtcLiveTranscodingState_END
Stream ingest ended.
AliRtcLiveTranscodingText: The text overlay for live stream transcoding.
Parameter
Type
Description
text
NSString
The text content.
x
int
The X-coordinate, in pixels.
y
int
The y-coordinate in pixels.
fontType
The font for bypass live streaming.
fontSize
int
The font size.
zOrder
int
The stacking order. A value of 0 indicates the bottom layer. Layer 1 is on top of layer 0, and so on.
fontColor
int
Font color.
AliRtcLiveTranscodingImage: Information about an image in a bypass live stream.
Parameter
Type
Description
url
NSString
The URL of the image.
alpha
float
The transparency. The value ranges from 0.0 (transparent) to 1.0 (opaque).
display
The display mode of the image.
x
int
The x-coordinate, in pixels.
y
int
The y-coordinate, in pixels.
width
int
The width of the image.
height
int
The height of the image.
zOrder
it
The stacking order. A value of 0 indicates the bottom layer. A larger value indicates a higher layer.
AliRtcLiveTranscodingUser: Information about a user's custom stream in bypass live streaming.
Parameter
Type
Description
x
int
The X coordinate in pixels.
y
int
The y-coordinate, in pixels.
width
int
The width of the pane.
height
int
The height of the pane.
zOrder
int
The stacking order. A value of 0 indicates the bottom layer. Layer 1 is placed on top of layer 0, and so on.
userId
NSString *
The user ID.
streamType
Bypass stream ingest pattern.
sourceType
Stream type.
segmentType
The bypass live streaming input type.
images
NSArray<AliRtcLiveTranscodingImage *> *
Bypass live stream image information.
Texts
NSArray<AliRtcLiveTranscodingText *> *
Bypass live stream text information.
AliRtcLiveTranscodingParam: The configurations for bypass live streaming.
Parameter
Type
Description
mixMode
The bypass live streaming pattern.
singleParam
The parameters for a single bypass live stream.
mixParam
The parameters for bypass live stream mixing.
AliRtcLiveTranscodingMixParam: The parameters for stream mixing in bypass mode.
Parameter
Type
Description
taskProfile
The billing specifications for bypass live streaming.
encodeParam
The bypass live streaming encoding parameters.
users
NSArray<AliRtcLiveTranscodingUser *> *
The user list for bypass live streaming.
backgroundColor
int
Background color.
Backgrounds
NSArray<AliRtcLiveTranscodingImage *> *
List of background images.
Watermarks
NSArray<AliRtcLiveTranscodingImage *> *
A list of watermark images.
clockWidgets
NSArray<AliRtcLiveTranscodingClockWidget *> *
List of clock widgets.
cropMode
Bypass live stream crop mode.
mediaProcessMode
Bypass live streaming media processing pattern.
AliRtcLiveTranscodingSingleParam: The parameters for a single stream in bypass mode.
Parameter
Type
Description
userId
NSString *
User ID.
streamType
The bypass live stream ingest type.
sourceType
The type of the bypass live video stream.
AliRtcLiveTranscodingTaskProfile: The billing specifications for bypass live streaming.
Enumeration name
Description
AliRtcLiveTranscoding_Profile_1IN_1080P
1IN_1080P.
AliRtcLiveTranscoding_Profile_1IN_720P
1IN_720P.
AliRtcLiveTranscoding_Profile_1IN_360P
1IN_360P.
AliRtcLiveTranscoding_Profile_2IN_1080P
2IN_1080P.
AliRtcLiveTranscoding_Profile_2IN_720P
2IN_720P.
AliRtcLiveTranscoding_Profile_2IN_360P
2IN_360P.
AliRtcLiveTranscoding_Profile_4IN_1080P
4IN_1080P.
AliRtcLiveTranscoding_Profile_4IN_720P
4IN_720P.
AliRtcLiveTranscoding_Profile_4IN_360P
4IN_360P.
AliRtcLiveTranscoding_Profile_9IN_1080P
9IN_1080P.
AliRtcLiveTranscoding_Profile_9IN_720P
9IN_720P.
AliRtcLiveTranscoding_Profile_9IN_360P
9IN_360P.
AliRtcLiveTranscoding_Profile_12IN_1080P
12IN_1080P.
AliRtcLiveTranscoding_Profile_12IN_720P
12IN_720P.
AliRtcLiveTranscoding_Profile_12IN_360P
12IN_360P.
AliRtcLiveTranscoding_Profile_16IN_1080P
16IN_1080P.
AliRtcLiveTranscoding_Profile_16IN_720P
16IN_720P.
AliRtcLiveTranscoding_Profile_16IN_360P
16IN_360P.
AliRtcLiveTranscoding_Profile_Mixed
Audio-only.
AliRtcLiveTranscodingEncodeParam: The encoding parameters for bypass live streaming.
Parameter
Type
Description
videoWidth
int
Width
videoHeight
int
Height.
videoFramerate
int
Frame rate.
videoBitrate
int
Bitrate.
videoGop
int
GOP.
videoCodec
The video encoder for bypass live streaming.
audioSamplerate
The audio sampling rate for bypass live streaming.
audioBitrate
int
Audio bitrate.
audioChannels
int
The number of audio channels.
AliRtcLiveTranscodingAudioSampleRate: The audio sampling rate for bypass live streaming.
Enumeration name
Description
AliRtcLiveTranscoding_HZ_48000
The sample rate is 48000 Hz.
AliRtcLiveTranscoding_HZ_44100
The sample rate is 44100 Hz.
AliRtcLiveTranscoding_HZ_32000
The sample rate is 32000 Hz.
AliRtcLiveTranscoding_HZ_16000
Sample rate 16000 Hz.
AliRtcLiveTranscoding_HZ_8000
The sample rate is 8000 Hz.
AliRtcLiveTranscodingClockWidget: A clock widget for bypass live streaming.
Parameter
Type
Description
x
int
The x-coordinate, in pixels.
y
int
The y-coordinate, in pixels.
fontSize
int
The font size for bypass live streaming.
zOrder
int
The stacking order. A value of 0 indicates the bottom layer. A value of 1 indicates the layer on top of layer 0, and so on.
fontColor
int
The font color for bypass live streaming.
fontType
The font for bypass live streaming.
AliRtcBokehScaleModel: The scaling mode for background replacement (macOS only).
Enumeration name
Description
AliRtcBokehScaleModelCrop
Proportional crop.
AliRtcBokehScaleModelFill
Fills with black bars.
AliRtcAudioPlayingStateCode: Music accompaniment playback status (macOS only).
Enumeration name
Description
AliRtcAudioPlayingStarted
Playback started.
AliRtcAudioPlayingStopped
Playback stopped.
AliRtcAudioPlayingPaused
Playback paused.
AliRtcAudioPlayingResumed
Playback resumed.
AliRtcAudioPlayingEnded
Playback finished.
AliRtcAudioPlayingBuffering
Buffering.
AliRtcAudioPlayingBufferingEnd
Buffering finished.
AliRtcAudioPlayingFailed
Playback failed.
AliRtcAudioPlayingErrorCode: Error codes for music accompaniment playback (macOS only).
Enumeration
Description
AliRtcAudioPlayingNoError
No error.
AliRtcAudioPlayingOpenFailed
Error opening the file.
AliRtcAudioPlayingDecodeFailed
Error decoding the file.
AliRtcScreenShareMode.
Enumeration name
Description
AliRtcScreenShareNone
No sharing.
AliRtcScreenShareVideo
Shares the video stream.
AliRtcScreenShareAudioApp
Shares the app audio stream.
AliRtcScreenShareAll
Shares all audio and video streams. This mode does not support sharing the microphone audio stream. Use the microphone audio capture feature provided by the SDK.
AliRtcCapabilityProfile: A profile for feature aggregation.
Enumeration name
Description
AliRtcCapabilityProfileDefault
The default value. This profile has no special requirements.
AliRtcCapabilityProfileAiHuman
The features for a human user in an AI agent call scenario.
AliRtcCapabilityProfileAiRobot
The features for a robot in an AI agent call scenario.
AliRtcChannelParam: Specifies the parameters for joining a channel.
Parameter
Type
Description
channelId
NSString*
The channel to join. This must be the same as the channel used to generate the token. If you do not specify this parameter, the channelId used to generate the token is used by default.
userId
NSString*
The user ID to join the session. This ID must match the user ID used to generate the token. If you do not specify this parameter, the user ID that was used to generate the token is used by default.
userName
NSString*
An arbitrary display name for the user. This is not the user ID. This parameter is optional. If omitted, it indicates that no username is specified.
capabilityProfile
Feature profile. For scenarios that require additional features, such as an AI agent call, select a profile instead of enabling each feature individually.
AliRtcNetworkQualityProbeConfig: Parameters for network probing.
Parameter
Type
Description
probeUplink
BOOL
Specifies whether to probe the upstream bandwidth. Default: NO.
probeDownlink
BOOL
Specifies whether to probe the downstream bandwidth. Default: NO. This parameter is not currently supported.
upLinkBandWidth
int
The peak upstream bandwidth for probing, in kbps. Default: 1000.
DownLinkBandWidth
int
The peak downstream bandwidth for probing, in kbps. Default: 1000. This parameter is not currently supported.
AliRtcNetworkQualityProbeResult: The network probe result.
Parameter
Type
Description
rtt
int
The link RTT in ms.
upLinkLossRate
int
The uplink packet loss rate. The maximum value is 100%.
upLinkJitter
int
The uplink jitter in ms.
upLinkBandWidth
int
The uplink network bandwidth in kbps.
downLinkLossRate
int
The downlink packet loss rate. The maximum value is 100%. This parameter is not supported.
downLinkJitter
int
The downlink jitter in ms. This parameter is not supported.
downLinkBandWidth
int
The downlink network bandwidth in kbps. This parameter is not supported.
AliRtcAudioFrame: The raw audio data.
Parameter
Type
Description
dataPtr
void *
The pointer to the audio data.
numOfSamples
int
The number of samples.
bytesPerSample
int
The number of bytes per sample.
numOfChannels
int
The number of sound channels.
samplesPerSec
int
The sample rate.
AliRtcVideoPipelineMirrorMode: The mirror mode for the video pipeline.
Enumeration name
Description
AliRtcVideoPipelineMirrorModeNoMirror
Mirroring is disabled for both preview and encoding.
AliRtcVideoPipelineMirrorModeBothMirror
Mirroring is enabled for both preview and encoding.
AliRtcVideoPipelineMirrorModeOnlyPreviewMirror
Mirroring is enabled for preview only.
AliRtcVideoPipelineMirrorModeOnlyPublishMirror
Mirroring is enabled for the published stream only.
AliRtcCapturePipelineScaleMode: The scaling type for the capture pipeline.
Enumerator
Description
AliRtcCapturePipelineScaleModePre
Scales the video immediately after capture. (Default)
AliRtcCapturePipelineScaleModePost
Scales the video during encoding.
AliRtcAudioAccompanyConfig: The configuration for playing audio accompaniment.
Parameter
Type
Description
onlyLocalPlay
BOOL
Specifies whether to play the audio locally only.
replaceMic
BOOL
Specifies whether to replace the microphone input.
loopCycles
int
The number of times to loop the playback. Set this parameter to -1 for an infinite loop or a positive integer greater than 0. Other values are invalid.
startPosMs
NSInteger
The start position for playback, in ms.
publishVolume
int
The volume for stream ingest. The value ranges from 0 to 100. The default value is 50.
playoutVolume
int
The playback volume. The value ranges from 0 to 100. The default value is 50.
AliRtcAudioFileInfo: Audio file information.
Parameter
Type
Description
filePath
NSString *
The path of the audio file.
durationMs
NSInteger
The duration of the audio file, in ms.
AliRtcDataChannelMsg: Defines a data message.
Parameter
Type
Description
type
Pointer to audio data.
networkTime
long long
The network timestamp.
progress
int
The progress.
data
NSData*
The data.
AliRtcDataMsgType: The data message type.
Enumeration
Description
AliRtcDataMsgNone
Undefined message.
AliRtcDataMsgMusicProgress
Music progress message.
AliRtcDataMsgCustom
Custom message.
AliRtcLocalDeviceType: The local device type.
Enumeration value
Description
AliRtcLocalDeviceTypeUnknown
Unknown device type.
AliRtcLocalDeviceTypeMic
A microphone.
AliRtcLocalDeviceTypeSpeaker
A speaker.
AliRtcLocalDeviceTypeAudioDevice
An audio device.
AliRtcLocalDeviceTypeCamera
A camera.
AliRtcLocalDeviceTypeDisplay
A display device.
AliRtcLocalDeviceTypeVideoDevice
A video device.
AliRtcLocalDeviceExceptionType: The type of exception for a local device.
Enumeration value
Description
AliRtcLocalDeviceExceptionTypeUnknown
Unknown exception type.
AliRtcLocalDeviceExceptionTypeMicOpenFail
Failed to open the microphone.
AliRtcLocalDeviceExceptionTypeMicInterrupt
The microphone was interrupted.
AliRtcLocalDeviceExceptionTypeMicAuthFail
Microphone permission denied.
AliRtcLocalDeviceExceptionTypeMicNotAvailable
No available microphone.
AliRtcLocalDeviceExceptionTypeSpeakerOpenFail
Failed to open the speaker.
AliRtcLocalDeviceExceptionTypeSpeakerInterrupt
The speaker was interrupted.
AliRtcLocalDeviceExceptionTypeSpeakerNotAvailable
No available speaker.
AliRtcLocalDeviceExceptionTypeAudioDeviceException
Audio device exception.
AliRtcLocalDeviceExceptionTypeCameraOpenFail
Failed to open the camera.
AliRtcLocalDeviceExceptionTypeCameraInterrupt
The camera was interrupted.
AliRtcLocalDeviceExceptionTypeCameraAuthFail
Camera permission denied.
AliRtcLocalDeviceExceptionTypeDisplayExecption
Display device exception.
AliRtcLocalDeviceExceptionTypeVideoDeviceException
Video device exception.
AliRtcLocalAudioStateType: The local audio capture status.
Enumeration value
Description
AliRtcLocalAudioStateTypeStarting
Starting.
AliRtcLocalAudioStateTypeStarted
Startup has completed.
AliRtcLocalAudioStateTypeStopping
Stopping.
AliRtcLocalAudioStateTypeStopped
Shutdown complete.
AliRtcLocalVideoStateType: The local video device status.
Value
Description
AliRtcLocalVideoStateTypeStarting
Starting.
AliRtcLocalVideoStateTypeStarted
Started.
AliRtcLocalVideoStateTypeStopping
Stopping.
AliRtcLocalVideoStateTypeStopped
Stopped.
AliRtcAudioAccompanyStateCode: The playback status of the music accompaniment.
Enumeration value
Description
AliRtcAudioAccompanyStarted
Playback starts.
AliRtcAudioAccompanyStopped
Playback stops.
AliRtcAudioAccompanyPaused
Playback is paused.
AliRtcAudioAccompanyResumed
Playback resumes.
AliRtcAudioAccompanyEnded
Playback is complete.
AliRtcAudioAccompanyBuffering
Buffering is in progress.
AliRtcAudioAccompanyBufferingEnd
Buffering is complete.
AliRtcAudioAccompanyFailed
Playback failed.
AliRtcAudioAccompanyErrorCode: The error codes for audio accompaniment playback.
Enumeration value
Description
AliRtcAudioAccompanyNoError
No error.
AliRtcAudioAccompanyOpenFailed
Failed to open the file.
AliRtcAudioAccompanyDecodeFailed
Failed to decode the file.
AliRtcLiveTranscodingVideoCodec: The video codec for bypass live streaming.
Enumeration name
Description
AliRtcLiveTranscodingVideoCodec_H264
h264
AliRtcLiveTranscodingVideoCodec_H265
h265