All Products
Search
Document Center

ApsaraVideo Live:Data structure

Last Updated:Mar 13, 2026

This topic describes the data types used in the ApsaraVideo Real-time Communication (ARTC) SDK for iOS and macOS.

Contents

Data type

Description

AliRtcAudioPlayingErrorCode

The playback error code of the accompaniment. This data type applies only to iOS.

AliRtcAudioPlayingStateCode

The playback status code of the accompaniment. This data type applies only to iOS.

AliRtcUserVolumeInfo

The volume information of the user.

AliRtcAudioDataSample

The audio sample.

AliRtcVideoDataSample

The video sample.

AliRtcChannelProfile

The channel mode.

AliRtcClientRole

The user role.

AliRtcStats

The statistics on the session.

AliRtcLocalVideoStats

The statistics on the local video.

AliRtcRemoteVideoStats

The statistics on the remote video.

AliRtcLocalAudioStats

The statistics on the local audio.

AliRtcRemoteAudioStats

The statistics on the remote audio.

AliRtcVideoObserPosition

The output position of the video data.

AliRtcVideoFormat

The format of the video data.

AliRtcExternalDeviceType

The type of the peripheral device. This data type applies only to macOS.

AliRtcExternalDeviceState

The status of the peripheral device. This data type applies only to macOS.

AliRtcConnectionStatus

The status of the network connection.

AliRtcConnectionStatusChangeReason

The reason why the network connection status changes.

AliRtcVideoTrack

The type of video stream.

AliRtcPublishState

The stream ingest status.

AliRtcSubscribeState

The subscription status.

AliRtcUserOfflineReason

The reason why the user is disconnected from the channel.

AliRtcVideoStreamType

The type of the camera track.

AliRtcAudioTrack

Audio stream type.

AliRtcNetworkQuality

The network quality.

AliRtcOrientationMode

The orientation mode. This data type applies only to iOS.

AliRtcAudioSessionOperationRestriction

The permissions of the SDK on AVAudioSession. This data type applies only to iOS.

AliRtcRenderMode

The rendering mode.

AliRtcRenderMirrorMode

The mirroring mode.

AliRtcRotationMode

The rotation angle.

AliRtcLogLevel

The log level.

AliRtcAudioNumChannel

The number of sound channels.

AliRtcAudioSampleRate

The sampling rate in audio recording.

AliRtcRecordType

The recording type.

AliRtcRecordFormat

The recording format.

AliRtcAudioQuality

The quality of the recorded audio.

AliRtcVideoQuality

The quality of the recorded video.

AliRtcVideoCodecType

The video codec type.

AliRtcVideoDecoderConfiguration

The video decoder configuration.

AliRtcVideoEncodeCodecType

The video encoding type.

AliRtcTranportAudioQuality

The audio quality.

AliRtcAudioProfile

The mode of audio quality.

AliRtcAudioScenario

The mode for the audio scenario.

AliRtcMuteLocalAudioMode

The mode of local mute.

AliRtcRecordAudioConfig

The settings for audio recording.

AliRtcRecordVideoConfig

The settings for video recording.

AliRtcRecordVideoCanvasConfig

The canvas size for video recording. This data type applies only to macOS.

AliRtcRecordVideoLayout

The layout information used for video recording. This data type applies only to macOS.

AliRtcRecordVideoLayoutMode

The layout mode for video recording. This data type applies only to macOS.

AliRtcRecordVideoBgColor

The background color for video recording. This data type applies only to macOS.

AliRtcRecordVideoRegion

The layout settings of the pane for video recording. This data type applies only to macOS.

AliRtcRecordVideoRectangle

The position of the pane. This data type applies only to macOS.

AliRtcRecordVideoRational

The coordinates for mixed-stream recording. This data type applies only to macOS.

AliRtcRecordTemplate

The recording template. This data type applies only to macOS.

AliRtcDeviceInfo

The device information. This data type applies only to macOS.

AliRtcBeautyConfig

The basic retouching settings.

AliRtcOnByeType

The OnBye type enumeration.

AliRtcAudioEffectVoiceChangerMode

The voice change effect mode.

AliRtcAudioEffectReverbMode

The reverberation effect mode.

AliRtcAudioEffectReverbParamType

The reverberation effect parameters.

AliRtcAudioRouteType

The audio route. This data type applies only to iOS.

AliVideoCanvas

The canvas for rendering.

AliRtcTrascodingLiveStreamErrorCode

The error code of relayed live streaming.

AliRtcWatermarkConfig

The watermark settings.

AliRtcCameraCapturerConfiguration

Property for camera capture preferences.

AliRtcCameraDirection

Camera direction.

AliRtcCameraCaptureProfile

The resolution for camera capture.

AliRtcCaptureOutputPreference

The collection preferences of the camera.

AliRtcVideoEncoderFrameRate

The frame rate of video encoding.

AliRtcVideoEncoderBitrate

The bitrate of video encoding.

AliRtcVideoEncoderMirrorMode

The mirroring mode of the encoded video.

AliRtcVideoEncoderOrientationMode

The orientation mode of the encoded video.

AliRtcVideoEncoderConfiguration

The video encoding preferences.

AliRtcScreenShareEncoderConfiguration

The video encoding preferences for screen sharing.

AliRtcScreenShareConfig

The screen sharing settings. This data type applies only to macOS.

AliRtcScreenShareRegion

The shared part of the screen. This data type applies only to macOS.

AliRtcScreenSourceInfo

The source of the shared screen. This data type applies only to macOS.

AliRtcScreenShareInfo

The information about screen sharing. This data type applies only to macOS.

AliRtcScreenShareType

The type of screen sharing. This data type applies only to macOS.

AliRtcAuthInfo

The authentication information.

AliRtcDeviceVolumeType

The volume type of the device. This data type applies only to iOS.

AliRtcVideoSource

The source of the raw video data.

AliRtcAudioSource

The source of the raw audio data.

AliRtcBufferType

The type of the video data.

AliRtcErrorCode

The error code.

AliRtcVideoObserAlignment

The width alignment of the output video.

AliRtcShowDebugViewType

The type of the displayed dashboard.

AliRtcTrascodingLiveTaskStatus

The status of the relayed live streaming task.

AliRtcLiveTranscodingDisplayType

The display mode of images in relayed live streaming.

AliRtcLiveTranscodingFontType

The font of the text that is displayed in relayed live streaming.

AliRtcLiveTranscodingSegmentType

The portrait segmentation status in relayed live streaming.

AliRtcLiveTranscodingSourceType

The input source of relayed live streaming.

AliRtcVideoState

The status change of the video track.

AliRtcVideoReason

The reason why the status of the video track changes.

AliRtcLiveTranscodingCropMode

The cropping mode in relayed live streaming.

AliRtcLiveTranscodingMediaProcessMode

The media processing mode in relayed live streaming.

AliRtcLiveTranscodingStreamType

The type of relayed live streaming.

AliRtcLiveTranscodingMixMode

The mode of relayed live streaming.

AliRtcLiveTranscodingState

The status of relayed live streaming.

AliRtcLiveTranscodingText

The information about the text that is displayed in relayed live streaming.

AliRtcLiveTranscodingImage

Bypass live stream image data.

AliRtcLiveTranscodingUser

The custom stream information for a user in relayed live streaming.

AliRtcLiveTranscodingParam

The configurations of relayed live streaming.

AliRtcLiveTranscodingMixParam

The parameters for ingesting mixed streams in relayed live streaming.

AliRtcLiveTranscodingSingleParam

Bypass mode parameters for a single ingest endpoint.

AliRtcLiveTranscodingTaskProfile

The billing specifications of relayed live streaming.

AliRtcLiveTranscodingEncodeParam

The encoding parameters of relayed live streaming.

AliRtcLiveTranscodingAudioSampleRate

The audio sampling rate of relayed live streaming.

AliRtcLiveTranscodingClockWidget

The clock widget used in relayed live streaming.

AliRtcBokehScaleModel

The scaling mode for background replacement. This data type applies only to macOS.

AliRtcAudioPlayingStateCode

The playback status code of the accompaniment. This data type applies only to macOS.

AliRtcAudioPlayingErrorCode

The playback error code of the accompaniment. This data type applies only to macOS.

AliRtcScreenShareMode

The screen sharing mode.

AliRtcCapabilityProfile

The profile that aggregates features.

AliRtcChannelParam

The parameters for joining a channel.

AliRtcNetworkQualityProbeConfig

The parameter configuration for network probing.

AliRtcNetworkQualityProbeResult

The result of network probing.

AliRtcAudioFrame

The audio frame struct.

AliRtcVideoPipelineMirrorMode

The mirroring mode for the video pipeline.

AliRtcCapturePipelineScaleMode

The scaling mode for the capture pipeline.

AliRtcAudioAccompanyConfig

The audio accompaniment playback configuration.

AliRtcAudioFileInfo

The audio file information.

AliRtcDataChannelMsg

The definition of a data message.

AliRtcDataMsgType

The type of a data message.

AliRtcLocalDeviceType

The type of the local device.

AliRtcLocalDeviceExceptionType

The exception type of the current device.

AliRtcLocalAudioStateType

The callback for the local audio capture state.

AliRtcLocalVideoStateType

The callback for the local video capture state.

AliRtcAudioAccompanyStateCode

The playback status code of the music accompaniment.

AliRtcAudioAccompanyErrorCode

The playback error code of the music accompaniment.

AliRtcLiveTranscodingVideoCodec

Bypass the live video encoder.

AliRtcAudioEffectBeautifyMode

The enumeration of voice beautification modes.

AliRtcAudioEffectEqualizationBandFrequency

The enumeration of reverberation parameters.

Details

  • AliRtcAudioPlayingErrorCode: the error code for audio accompaniment playback. This data type applies only to iOS.

    Enumeration name

    Description

    AliRtcAudioPlayingNoError

    The normal state.

    AliRtcAudioPlayingOpenFailed

    The file fails to be opened.

    AliRtcAudioPlayingDecodeFailed

    Encoding failed.

  • AliRtcAudioPlayingStateCode: the status code for audio accompaniment playback. This data type applies only to iOS.

    Enumeration Name

    Description

    AliRtcAudioPlayingStarted

    The playback is in progress.

    AliRtcAudioPlayingStopped

    The playback stops.

    AliRtcAudioPlayingPaused

    The playback is paused.

    AliRtcAudioPlayingResumed

    The playback is resumed.

    AliRtcAudioPlayingEnded

    The playback ends.

    AliRtcAudioPlayingBuffering

    The system is buffering data.

    AliRtcAudioPlayingBufferingEnd

    The buffering is complete.

    AliRtcAudioPlayingFailed

    The playback fails.

  • AliRtcUserVolumeInfo: information about a user’s audio volume.

    Parameter

    Type

    Description

    uid

    NSString * _Nonnull

    The UID of the user. Valid values:

    • 0: local

    • 1: remote audio mixing

    • Others: indicates a remote user.

    volume

    int

    The audio volume returned in the callback.

    speech_state

    BOOL

    • true: indicates that the user is speaking.

    • false: indicates that the user is not speaking.

  • AliRtcAudioDataSample: an audio sample.

    Parameter

    Type

    Description

    dataPtr

    long

    The pointer of the audio data.

    numOfSamples

    int

    The number of sampling points in each sound channel.

    bytesPerSample

    int

    The audio bit depth. Pulse-code modulation (PCM) audio data usually adopts 16-bit depth, which is 2 bytes in size.

    numOfChannels

    int

    The number of sound channels. Valid values:

    • 1: mono

    • 2: Dual sound channel.

    samplesPerSec

    int

    The number of sampling points per second in each sound channel, which is the sampling rate.

  • AliRtcVideoDataSample: a video sample.

    Parameter

    Type

    Description

    format

    AliRtcVideoFormat

    The format of the video data.

    type

    AliRtcBufferType

    The type of the video data.

    pixelBuffer

    CVPixelBufferRef _Nullable

    The pixel buffer data.

    dataPtr

    long

    The pointer for the YUV color data.

    dataYPtr

    long

    The pointer for the luminance component Y.

    dataUPtr

    long

    The pointer for the chrominance component U.

    dataVPtr

    long

    The pointer for the chrominance component V.

    dataLength

    long

    The data size.

    strideY

    int

    The stride of the row that represents the luminance component Y.

    strideU

    int

    The stride of the row that represents the chrominance component U.

    strideV

    int

    The stride of the row that represents the chrominance component V.

    stride

    int

    The stride for RGB data.

    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. Only 0°, 90°, 180°, and 270° are supported.

    timeStamp

    long long

    The timestamp.

  • AliRtcChannelProfile: the channel mode.

    Enumeration Name

    Description

    AliRtcCommunication

    The communication mode.

    AliRtcInteractivelive

    The interactive mode.

    AliRtcInteractiveWithLowLatencyLive

    Real-time audio and video mode with low latency.

  • AliRtcClientRole: the role assigned to a user in a session.

    Enumeration name

    Description

    AliRtcClientRoleInteractive

    The streamer role.

    AliRtcClientRolelive

    The viewer role.

  • AliRtcStats: session statistics.

    Parameter

    Type

    Description

    sent_kbitrate

    long long

    The bitrate at which data is sent.

    rcvd_kbitrate

    long long

    The bitrate at which data is received.

    sent_bytes

    long long

    The number of bytes that are sent.

    rcvd_bytes

    long long

    The number of bytes that are received.

    systemCpuUsage

    float

    The CPU utilization of the system.

    cpu_usage

    float

    The CPU utilization of the ARTC processes.

    video_rcvd_kbitrate

    long

    The bitrate at which the video is received.

    video_sent_kbitrate

    long

    The bitrate at which the video is sent.

    call_duration

    long

    The duration of the call. Unit: seconds.

    sent_loss_rate

    long

    The packet loss rate in data transmission from the client to the server.

    sent_loss_pkts

    long long

    The number of lost packets in data transmission from the client to the server.

    sent_expected_pkts

    long long

    The total number of packets that are sent from the client to the server.

    rcvd_loss_rate

    long long

    The packet loss rate from the client to the server.

    rcvd_loss_pkts

    long long

    Client-to-server packet loss count.

    rcvd_expected_pkts

    long long

    The total number of packets sent from the client to the server.

    lastmile_delay

    int

    The latency. Unit: milliseconds.

    available_sent_kbitrate

    long long

    The available bandwidth. Unit: kbps.

  • AliRtcLocalVideoStats: local video statistics.

    Parameter

    Type

    Description

    track

    AliRtcVideoTrack

    The type of the stream.

    capture_width

    unsigned int

    The capture width.

    capture_height

    unsigned int

    The capture height.

    encode_width

    unsigned int

    The encode width.

    encode_height

    unsigned int

    The encode height.

    sent_bitrate

    unsigned int

    The published bitrate.

    sent_fps

    unsigned int

    The published 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

    User ID

    track

    AliRtcVideoTrack

    Video stream type.

    width

    unsigned int

    The width.

    height

    unsigned int

    The height.

    decode_fps

    unsigned int

    The output frame rate of the encoder.

    render_fps

    unsigned int

    The output frame rate of the renderer.

    frozen_times

    iunsigned int

    The number of times stuttering occurs.

    video_total_frozen_time

    unsigned int

    The cumulative stuttering time during video playback. Unit: ms.

    video_total_frozen_rate

    unsigned int

    The cumulative stuttering rate during video playback. Unit: %. The calculation method is: video playback stuttering rate = cumulative stuttering time / total video playback time.

  • AliRtcLocalAudioStats: local audio statistics.

    Parameter

    Type

    Description

    track

    AliRtcVideoTrack

    The type of audio stream.

    sent_bitrate

    int

    The bitrate at which data is sent. Unit: Kbps.

    sent_samplerate

    int

    The sampling rate at which the audio is sent.

    num_channel

    int

    The number of sound channels.

    sendLoss

    int

    The packet loss rate in data transmission.

  • AliRtcRemoteAudioStats: remote audio statistics.

    Parameter

    Type

    Description

    userId

    NSString * _Nonnull

    The UID of the remote user.

    track

    AliRtcAudioTrack

    The type of the audio stream.

    sample_rate

    unsigned int

    The sampling 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 frame loss rate of the audio in the callback period.

    rcvd_bitrate

    unsigned int

    The instantaneous bitrate of the received audio. Unit: Kbps.

    network_transport_delay

    unsigned int

    The network latency from the publisher to the subscriber. Unit: milliseconds.

    jitter_buffer_delay

    unsigned int

    The network latency from the subscriber to the jitter buffer. Unit: milliseconds.

  • AliRtcVideoObserPosition: the output position of video data.

    Enumeration Name

    Description

    AliRtcPositionPostCapture

    The collected video data. The data is returned in the onCaptureVideoSample callback.

    AliRtcPositionPreRender

    Renders video data. The corresponding output callback is (callback).

    AliRtcPositionPreEncoder

    The video data before encoding. The data is returned in the onCaptureVideoSample callback.

  • AliRtcVideoFormat: the format of video data.

    Enumeration Name

    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 connection status.

    Enumeration Name

    Description

    AliRtcConnectionStatusInit

    The initialization is complete.

    AliRtcConnectionStatusDisconnected

    The network is disconnected.

    AliRtcConnectionStatusConnecting

    The network connection is being established.

    AliRtcConnectionStatusConnected

    The network connection is established.

    AliRtcConnectionStatusReconnecting

    The network connection is being re-established.

    AliRtcConnectionStatusFailed

    The network connection fails.

  • AliRtcConnectionStatusChangeReason: the reason for a change in network connection status.

    Enumerated value

    Description

    AliRtcConnectionChangedDummyReason

    Unknown reason.

    AliRtcConnectionChangedMediaPathChanged

    The media channel is changed.

    AliRtcConnectionChangedSignalingHeartbeatTimeout

    The signaling heartbeat times out.

    AliRtcConnectionChangedSignalingHeartbeatAlive

    The signaling heartbeat is resumed.

    AliRtcConnectionChangedSignalingHttpdnsResolved

    The Domain Name System (DNS) resolution is successful.

    AliRtcConnectionChangedSignalingHttpdnsFailure

    The DNS resolution fails.

    AliRtcConnectionChangedSignalingGslbFailure

    The global server load balancing (GSLB) request fails.

    AliRtcConnectionChangedSignalingGslbSucccess

    The GSLB request succeeds.

    AliRtcConnectionChangedSignalingJoinChannelFailure

    The request to join the channel fails.

    AliRtcConnectionChangedSignalingJoinChannelSuccess

    The request to join the channel succeeds.

    AliRtcConnectionChangedSignalingLeaveRoom

    The user leaves the channel.

    AliRtcConnectionChangedSignalingConnecting

    The signaling connection is established.

    AliRtcConnectionChangedNetworkInterrupted

    The network connection is interrupted.

  • AliRtcVideoTrack: The type of the video stream.

    Enumeration Name

    Description

    AliRtcVideoTrackNo

    No video track.

    AliRtcVideoTrackCamera

    The camera track.

    AliRtcVideoTrackScreen

    The screen sharing track.

    AliRtcVideoTrackBoth

    Camera and screen sharing.

  • AliRtcPublishState: the stream ingest status.

    Enumeration Name

    Description

    AliRtcStatsPublishIdle

    The initial state.

    AliRtcStatsNoPublish

    No stream is ingested.

    AliRtcStatsPublishing

    A stream is being ingested.

    AliRtcStatsPublished

    The stream ingest is complete.

  • AliRtcSubscribeState: the subscription status.

    Enumeration Name

    Description

    AliRtcStatsSubscribeIdle

    The initial state.

    AliRtcStatsNoSubscribe

    No stream is subscribed to.

    AliRtcStatsSubscribing

    A stream is being subscribed to.

    AliRtcStatsSubscribed

    The subscription is complete.

  • AliRtcUserOfflineReason: the reason a user disconnected from the channel.

    Enumeration Name

    Description

    AliRtcUserOfflineQuit

    The user proactively leaves the channel.

    AliRtcUserOfflineDropped

    The connection times out because no packet is received from the user for an excessively long period.

    AliRtcUserOfflineBecomeAudience

    The user switches from the streamer role to the viewer role.

  • AliRtcVideoStreamType: the type of camera video track.

    Enumeration Name

    Description

    AliRtcVideoStreamTypeNone

    No video track.

    AliRtcVideoStreamTypeHigh

    The major stream.

    AliRtcVideoStreamTypeLow

    The minor stream.

  • AliRtcAudioTrack: The audio stream.

    Enumeration name

    Description

    AliRtcAudioTrackNo

    No audio track.

    AliRtcAudioTrackMic

    The microphone track.

    AliRtcAudioTrackDual

    The second audio track.

    AliRtcAudioTrackBoth

    The microphone track and the second audio track.

  • AliRtcNetworkQuality: the quality of the network connection.

    Enumeration Name

    Description

    AlivcRtcNetworkQualityExcellent

    The network quality is excellent. The audio and video are smooth and clear.

    AlivcRtcNetworkQualityGood

    The network quality is good. The audio and video are as smooth and clear as those of the excellent quality.

    AlivcRtcNetworkQualityPoor

    The network condition is slightly poor. The smoothness and clarity of the audio and video are defective, but communication is not affected.

    AlivcRtcNetworkQualityBad

    The network condition is poor. Stuttering is severe in the video, but communication through audio is not affected.

    AlivcRtcNetworkQualityVeryBad

    The network quality is unacceptable, and the communication among users is severely affected.

    AlivcRtcNetworkQualityDisconnect

    The network is disconnected.

    AlivcRtcNetworkQualityUnknow

    The cause is unknown.

  • AliRtcOrientationMode: the orientation mode. This data type applies only to iOS.

    Enumeration Name

    Description

    AliRtcOrientationModePortrait

    Fixed portrait mode.

    AliRtcOrientationModeLandscapeLeft

    The left-hand landscape mode.

    AliRtcOrientationModePortraitUpsideDown

    The reverse portrait mode.

    AliRtcOrientationModeLandscapeRight

    The right-hand landscape mode.

    AliRtcOrientationModeAuto

    The adaptive orientation mode.

  • AliRtcAudioSessionOperationRestriction: the permissions that the SDK has on AVAudioSession. You can combine multiple items. This data type applies only to iOS.

    Enumeration Name

    Description

    AliRtcAudioSessionOperationRestrictionNone

    The SDK has full control of AVAudioSession.

    AliRtcAudioSessionOperationRestrictionSetCategory

    The SDK cannot modify the Category parameter of AVAudioSession.

    AliRtcAudioSessionOperationRestrictionConfigureSession

    The SDK cannot modify the parameters of AVAudioSession, including the Category, Mode, and CategoryOptions parameters.

    AliRtcAudioSessionOperationRestrictionDeactivateSession

    The SDK cannot deactivate the active status of AVAudioSession. If the user leaves the channel, AVAudioSession remains active.

    AliRtcAudioSessionOperationRestrictionActivateSession

    The SDK cannot activate the active status of AVAudioSession.

  • AliRtcRenderMode: the rendering mode.

    Enumerated value

    Description

    AliRtcRenderModeAuto

    The auto mode.

    AliRtcRenderModeStretch

    The video is stretched to fill the view. The aspect ratio of the video is not maintained if it does not match the aspect ratio of the view.

    AliRtcRenderModeFill

    The video is scaled at the original aspect ratio and black bars are added if required.

    AliRtcRenderModeClip

    The video is scaled at the original aspect ratio and cropped to fit the view.

  • AliRtcRenderMirrorMode: the mirroring mode.

    Enumeration Name

    Description

    AliRtcRenderMirrorModeOnlyFrontCameraPreviewEnabled

    The mirroring mode is enabled only for previewing videos from the front camera.

    AliRtcRenderMirrorModeAllEnabled

    All images

    AliRtcRenderMirrorModeAllDisable

    The mirroring mode is disabled for all videos.

  • AliRtcRotationMode: the rotation angle.

    Enumeration Name

    Description

    AliRtcRotationMode_0

    Do not rotate.

    AliRtcRotationMode_90

    The rotation angle is 90°.

    AliRtcRotationMode_180

    The rotation angle is 180°.

    AliRtcRotationMode_270

    The rotation angle is 270°.

  • AliRtcLogLevel: the log level.

    Enumeration name

    Description

    AliRtcLogLevelInfo

    General.

    AliRtcLogLevelWarn

    Warn.

    AliRtcLogLevelError

    Error.

    AliRtcLogLevelFatal

    It is critical.

    AliRtcLogLevelNone

    None.

  • AliRtcAudioNumChannel: the number of sound channels.

    Enumeration Name

    Description

    AliRtcMonoAudio

    Mono.

    AliRtcStereoAudio

    Stereo

  • AliRtcAudioSampleRate: the audio sampling rate.

    Enumeration Name

    Description

    AliRtcAudioSampleRate_8000

    The sampling rate is 8,000 Hz.

    AliRtcAudioSampleRate_11025

    The sampling rate is 11,025 Hz.

    AliRtcAudioSampleRate_16000

    The sampling rate is 16,000 Hz.

    AliRtcAudioSampleRate_22050

    The sampling rate is 22,050 Hz.

    AliRtcAudioSampleRate_32000

    The sampling rate is 32,000 Hz.

    AliRtcAudioSampleRate_44100

    The sampling rate is 44,100 Hz.

    AliRtcAudioSampleRate_48000

    The sampling rate is 48,000 Hz.

    AliRtcAudioSampleRate_Unknown

    The sampling rate is unknown. This value is used in some scenarios.

  • AliRtcRecordType: the recording type.

    Enumeration name

    Description

    AliRtcRecordTypeAudio

    Records an audio-only file.

    AliRtcRecordTypeVideo

    Records a video file.

  • AliRtcRecordFormat: the recording format.

    Enumeration name

    Description

    AliRtcRecordFormatAAC

    The AAC format.

    AliRtcRecordFormatWAV

    The WAV format.

    AliRtcRecordFormatMP4

    An MP4 file.

  • AliRtcAudioQuality: the quality of recorded audio.

    Enumeration Name

    Description

    AliRtcAudioQualityLow

    Low

    AliRtcAudioQualityMidium

    Middle

    AliRtcAudioQualityHigh

    It is high.

  • AliRtcVideoQuality: the quality of recorded video.

    Enumeration Name

    Description

    AliRtcVideoQualityDefault

    The default value is the same as that of the collection.

  • AliRtcVideoCodecType: the video codec type.

    Enumeration name

    Description

    AliRtcVideoCodecTypeDefault

    Not set. Uses the default value (hardware encoding).

    AliRtcVideoCodecTypeSoftware

    The software video encoder.

    AliRtcVideoCodecTypeHardware

    The hardware video encoder.

  • AliRtcVideoDecoderConfiguration: the video decoder configuration.

    Parameter

    Type

    Description

    codecType

    AliRtcVideoCodecType

    The codec type.

    The default value is AliRtcVideoCodecTypeDefault, which uses the system default settings.

    enableDecoderBframe

    NSInteger

    Specifies whether to enable B-frames for decoding.

    The default value is -1. To disable B-frames, set this parameter to 0. To enable B-frames, set this parameter to 1.

    backgroundHardwareToSoftware

    NSInteger

    Specifies whether to downgrade hardware decoding to software decoding when the application moves to the background.

    The default value is -1. To disable downgrading, set this parameter to 0. To enable downgrading, set this parameter to 1.

  • AliRtcVideoEncodeCodecType: the encoder type.

    Enumeration Name

    Description

    AliRtcVideoEncodeCodecTypeDefault

    Not set. Uses the default value (H.264).

    AliRtcVideoEncodeCodecTypeH264

    H.264 encoding.

    AliRtcVideoEncodeCodecTypeHevc

    H.265 encoding.

  • AliRtcTranportAudioQuality: the audio quality during transmission.

    Enumeration Name

    Description

    AliRtcAudioQulityUnknow

    The quality is unknown.

    AliRtcAudioQulityExcellent

    The quality is excellent.

    AliRtcAudioQulityGood

    The audio sounds as good as that of the excellent quality. However, the bitrate may be slightly lower.

    AliRtcAudioQulityPoor

    The user experience may be suboptimal, but communication is unaffected.

    AliRtcAudioQulityBad

    Communication is possible, but not fluent.

    AliRtcAudioQulityVeryBad

    The network quality is very poor, and the communication is severely affected.

    AliRtcAudioQulityNetworkDisconnected

    The network connection is disconnected, and the communication is interrupted.

  • AliRtcAudioProfile: the audio quality mode.

    Enumeration name

    Description

    AliRtcEngineLowQualityMode

    The low-quality audio mode.

    AliRtcEngineBasicQualityMode

    The standard audio quality mode.

    AliRtcEngineHighQualityMode

    The high-quality audio mode.

    AliRtcEngineStereoHighQualityMode

    The stereo high-quality audio mode.

    AliRtcEngineSuperHighQualityMode

    The ultra-high-quality audio mode.

    AliRtcEngineStereoSuperHighQualityMode

    The stereo ultra-high-quality audio mode.

  • AliRtcAudioScenario: the audio scenario mode.

    Enumeration Name

    Description

    AliRtcSceneDefaultMode

    The default mode. We recommend that you select this mode if you have no special requirements.

    AliRtcSceneEducationMode

    The education-related mode. The smoothness and stability of audio playback are prioritized in this mode.

    AliRtcSceneMediaMode

    The media-related mode. The fidelity of the human voice and music is ensured in this mode. We recommend that you select this mode for co-streaming.

    AliRtcSceneMusicMode

    The music-related mode. High fidelity is ensured for music in this mode. We recommend that you select this mode in scenarios that require high sound quality, such as instrument teaching.

    AliRtcSceneChatroomMode

    The chatroom mode. This mode is suitable for scenarios in which users frequently turn on or off the mic to interact with each other.

  • AliRtcMuteLocalAudioMode: the local audio mute mode.

    Enumeration Name

    Description

    AliRtcMuteAudioModeDefault

    The default mode. All audio, including the audio collected from the microphone and external audio sources, is muted.

    AliRtcMuteAllAudioMode

    All audio, including the audio collected from the microphone and external audio sources, is muted.

    AliRtcMuteOnlyMicAudioMode

    Only the audio collected from the microphone is muted.

    AliRtcMuteLocalAudioMax

    The placeholder.

  • AliRtcRecordAudioConfig: the audio recording settings.

    Parameter

    Type

    Description

    sampleRate

    AliRtcAudioSampleRate

    The audio sampling rate.

    quality

    AliRtcAudioQuality

    The audio quality.

    enableRecordExternalRenderPCM

    bool

    Specifies whether to record external PCM input rendering data.

  • AliRtcRecordVideoConfig: the video recording settings.

    Parameter

    Type

    Description

    quality

    AliRtcVideoQuality

    The video quality.

  • AliRtcBeautyConfig: the basic retouching settings.

    Parameter

    Type

    Description

    whiteningLevel

    float

    The skin whitening level. Valid values: 0 to 1. A larger value indicates whiter skin.

    smoothnessLevel

    float

    The skin smoothing level. Valid values: 0 to 1. A larger value indicates smoother skin.

  • AliRtcOnByeType: the OnBye enumeration type.

    Enumeration name

    Description

    AliRtcOnByeBeKickedOut

    The user is kicked out.

    AliRtcOnByeChannelTerminated

    The channel is closed. You must leave the meeting.

    AliRtcOnByeUserReplaced

    The same user ID is used to join the channel on another device, and the current device is disconnected.

  • AliRtcAudioEffectVoiceChangerMode: the voice changer effect mode.

    Enumeration name

    Description

    AliRtcAudioEffectvVoiceChanger_OFF

    Disabled.

    AliRtcAudioEffectvVoiceChanger_OLD_MAN

    An old man.

    AliRtcAudioEffectvVoiceChanger_BABYBOY

    A boy.

    AliRtcAudioEffectvVoiceChanger_BABYGILR

    A girl.

    AliRtcAudioEffectvVoiceChanger_ROBOT

    A robot.

    AliRtcAudioEffectvVoiceChanger_DAIMO

    A big devil.

    AliRtcAudioEffectvVoiceChanger_KTV

    Karaoke.

    AliRtcAudioEffectvVoiceChangerR_ECHO

    Echo.

    AliRtcAudioEffectvVoiceChangerR_DIALECT

    Dialect.

    AliRtcAudioEffectvVoiceChangerR_HOWL

    Roar!

    AliRtcAudioEffectvVoiceChangerR_ELECTRONIC

    Electronic music.

    AliRtcAudioEffectvVoiceChangerR_PHONOGRAPH

    Phonograph.

    AliRtcAudioEffectvVoiceChanger_MAX

    The placeholder. This value has no meaning.

  • AliRtcAudioEffectReverbMode: the reverberation effect mode.

    Enumeration name

    Description

    AliRtcAudioEffectReverb_Off

    Shut down.

    AliRtcAudioEffectReverb_Vocal_I

    Vocal I.

    AliRtcAudioEffectReverb_Vocal_II

    Vocal II.

    AliRtcAudioEffectReverb_Bathroom

    Bathhouse.

    AliRtcAudioEffectReverb_Small_Room_Bright

    A small bright room.

    AliRtcAudioEffectReverb_Small_Room_Dark

    A small dark room.

    AliRtcAudioEffectReverb_Medium_Room

    A medium room.

    AliRtcAudioEffectReverb_Large_Room

    A large room.

    AliRtcAudioEffectReverb_Church_Hall

    A church hall.

    AliRtcAudioEffectReverb_Mode_Max

    The placeholder. This value has no meaning.

  • AliRtcAudioEffectReverbParamType: the reverberation effect parameters.

    Enumeration Name

    Description

    AliRtcAudioEffectReverb_Room_Size

    The size of the room. Valid values: 0 to 100.

    AliRtcAudioEffectReverb_Pre_Delay

    The pre-latency. Unit: ms. Valid values: 0 to 200.

    AliRtcAudioEffectReverb_Revetberance

    The reverberation level. Valid values: 0 to 100.

    AliRtcAudioEffectReverb_Hf_Damping

    The damping level. Valid values: 0 to 100.

    AliRtcAudioEffectReverb_Tone_Low

    The low tone. Valid values: 0 to 100.

    AliRtcAudioEffectReverb_Tone_High

    The high tone. Valid values: 0 to 100.

    AliRtcAudioEffectReverb_Dry_Gain

    The dry gain. Valid values: -20 to 10.

    AliRtcAudioEffectReverb_Wet_Gain

    The wet gain. Valid values: -20 to 10.

    AliRtcAudioEffectReverb_Type_Max

    The placeholder. This value has no meaning.

  • AliRtcAudioRouteType: the audio route. This data type applies only to iOS.

    Enumeration Name

    Description

    AliRtcAudioRouteTypeDefault

    The default audio route.

    AliRtcAudioRouteTypeHeadset

    An earphone.

    AliRtcAudioRouteTypeEarpiece

    Earpiece

    AliRtcAudioRouteTypeHeadsetNoMic

    An earphone without a microphone.

    AliRtcAudioRouteTypeSpeakerphone

    The speaker on the mobile phone.

    AliRtcAudioRouteTypeLoudSpeaker

    An external speaker.

    AliRtcAudioRouteTypeBlueTooth

    A Bluetooth earphone.

  • AliVideoCanvas: the canvas used for rendering.

    Parameter

    Type

    Description

    view

    UIView * _Nonnull

    The rendering view. The value cannot be nil.

    renderMode

    AliRtcRenderMode

    The rendering mode. Default value: AliRtcRenderModeAuto.

    mirrorMode

    AliRtcRenderMirrorMode

    The mirroring mode. Default value: AliRtcRenderMirrorModeOnlyFront.

    backgroundColor

    int

    The background color. The value must be a hexadecimal RGB value.

    rotationMode

    AliRtcRotationMode

    The rotation angle of the video. By default, the video is not rotated.

  • AliRtcTrascodingLiveStreamErrorCode: the error code for relayed live streaming.

    Enumeration name

    Description

    AliRtcTrascodingLiveStreamErrorPublishOk

    The relayed live streaming task succeeds.

    AliRtcTrascodingLiveStreamErrorStreamNotFound

    Error: No stream is found.

    AliRtcTrascodingLiveStreamErrorStreamAlreadyExist

    Error: The target stream already exists.

    AliRtcTrascodingLiveStreamErrorInvalidParam

    Error: One or more parameters are invalid.

    AliRtcTrascodingLiveStreamErrorInternalError

    Error: An internal error occurs.

    AliRtcTrascodingLiveStreamErrorRtmpServerError

    Error: A Real-Time Messaging Protocol (RTMP) exception occurs.

    AliRtcTrascodingLiveStreamErrorRtmpStreamUrlError

    Error: The URL is invalid.

    AliRtcTrascodingLiveStreamErrorPublishTimeout

    Error: task timeout.

    AliRtcTrascodingLiveStreamErrorNotAuthorized

    Error: The operation is not authorized.

  • AliRtcWatermarkConfig: the watermark settings.

    Parameter

    Type

    Description

    visibleInPreview

    BOOL

    Specifies whether the watermark is visible during local preview.

    positionInLandscapeMode

    CGRect

    The coordinates of the watermark in landscape mode.

    positionInPortraitMode

    CGRect

    The coordinates of the watermark in portrait mode.

    alpha

    float

    Transparency.

    normalized

    BOOL

    Specifies whether to normalize the value.

  • AliRtcCameraCapturerConfiguration: the camera capture preferences.

    Parameter

    Type

    Description

    preference

    AliRtcCaptureOutputPreference

    The collection preferences.

    cameraDirection

    AliRtcCameraDirection

    Camera orientation

    fps

    int

    The frame rate for camera preview. You can use this parameter to control the preview frame rate independently of the encoding frame rate specified by the frameRate parameter in AliRtcVideoEncoderConfiguration.

    cameraCaptureProfile

    AliRtcCameraCaptureProfile

    The resolution for video capture.

    disableVideoCaptureReverse

    int

    Disables flipping of captured video frames based on the aspect ratio.

    enableCameraMacroFocus

    int

    Enables macro focus adjustment.

    captureObserverOriginal

    int

    Specifies whether to return raw video frame data in callbacks.

    nativeBufferObserver

    int

    Returns the texture ID.

    captureCallbackCvpixelbufferToRaw

    int

    Uses cvPixelBuffer in video capture callbacks.

  • AliRtcCameraDirection: Specifies the camera direction.

    Enumeration Name

    Description

    AliRtcCameraDirectionInvalid

    Unknown.

    AliRtcCameraDirectionBack

    The rear camera.

    AliRtcCameraDirectionFront

    The front camera.

  • AliRtcCameraCaptureProfile: the camera capture resolution.

    Enumeration name

    Description

    AliRtcCameraCaptureProfileDefault

    Default.

    AliRtcCameraCaptureProfile1080P

    Used for 1080p video. When enabled, the camera captures video at 1080p resolution.

  • AliRtcCaptureOutputPreference: the camera output preferences.

    Enumeration Name

    Description

    AliRtcCaptureOutputPreferenceAuto

    Collection parameters are automatically adjusted.

    AliRtcCaptureOutputPreferencePerformance

    On condition that the camera performance takes precedence, the camera output settings that are closest to the setVideoProfile configuration are used.

    AliRtcCaptureOutputPreferencePreview

    On condition that the quality of video preview takes precedence, the camera output settings are as high as possible.

  • 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 bitrate for video encoding.

    Enumeration Name

    Description

    AliRtcVideoEncoderStandardBitrate

    The standard bitrate mode is used.

  • AliRtcVideoEncoderMirrorMode: the mirroring mode for encoded video.

    Enumeration Name

    Description

    AliRtcVideoEncoderMirrorModeDisabled

    The encoded video is mirrored.

    AliRtcVideoEncoderMirrorModeEnabled

    The encoded video is not mirrored.

  • AliRtcVideoEncoderOrientationMode: the orientation mode for encoded video.

    Enumeration name

    Description

    AliRtcVideoEncoderOrientationModeAdaptive

    Adapts to the captured video.

    AliRtcVideoEncoderOrientationModeFixedLandscape

    The landscape mode.

    AliRtcVideoEncoderOrientationModeFixedPortrait

    You can lock portrait orientation.

  • AliRtcVideoEncoderConfiguration: the video encoding preferences.

    Parameter

    Type

    Description

    dimensions

    CGSize

    The video resolution.

    frameRate

    NSInteger

    The video encoding frame rate.

    bitrate

    NSInteger

    The video encoding bitrate.

    min_bitrate

    NSInteger

    The minimum video encoding bitrate. Unit: Kbps. Default value: 0.

    keyFrameInterval

    NSInteger

    The keyframe interval. Unit: milliseconds. Default value: 0, which means the SDK controls the keyframe interval.

    forceStrictKeyFrameInterval

    bool

    Specifies whether to force the encoder to strictly generate keyframes according to the set keyframe interval. Default value: false.

    • false: The encoder responds to keyframe requests, such as when other users join the channel. The keyframe interval does not strictly match the set value.

    • true: The encoder does not respond to other keyframe requests and strictly generates keyframes according to the set value. This may cause a delay in the first frame for subscribers.

    mirrorMode

    AliRtcVideoEncoderMirrorMode

    The mirroring mode of the encoded video.

    orientationMode

    AliRtcVideoEncoderOrientationMode

    The orientation mode of the encoded video.

    rotationMode

    AliRtcRotationMode

    The video rotation angle.

    codecType

    AliRtcVideoCodecType

    The codec type.

    encoderType

    AliRtcVideoEncodeCodecType

    The video encoding type.

    seiForceFrontIFrame

    NSInteger

    Forces an I-frame before sending SEI.

    -1: uses the default value. 0: does not force. 1: forces (default value).

    enableDynamicEncode

    NSInteger

    Enables dynamic encoding.

    Simultaneously creates hardware and software encoding. If the hardware encoder fails, it degrades to software encoding. -1: uses the default value. 0: does not create both encoding types. 1: creates both encoding types.

    disableDipenseResolutionChange

    NSInteger

    Disables QoS resolution reduction.

    When QoS detects that the real-time bandwidth is insufficient for the current resolution, it reduces the video encoding resolution.

    -1: uses the default value. 0: allows reduction. 1: does not allow QoS to reduce resolution.

    enableDowngrade

    NSInteger

    Allows QoS to reduce the video encoding bitrate based on the actual detected bandwidth.

    -1: uses the default value. 0: does not allow reducing the encoding bitrate. 1: allows reducing the encoding bitrate.

    enableH264BFrame

    NSInteger

    Specifies whether to enable H.264 B-frame support.

    -1: uses the default value. 0: does not enable B-frame support. 1: enables B-frame support.

    Important

    If you enable this option, you must also enable B-frame support on the decoding end.

    enableHevcBFrame

    NSInteger

    Specifies whether to enable H.265 B-frame support.

    -1: uses the default value. 0: does not enable B-frame support. 1: enables B-frame support.

    Important

    If you enable this option, you must also enable B-frame support on the decoding end.

    backgroundHardwareToSoftware

    NSInteger

    Specifies whether the app is allowed to run in the background. On iOS devices, hardware encoding is downgraded to software encoding when the app runs in the background because hardware encoding is not supported.

    -1: uses the default value. 0: does not allow downgrading to software encoding. 1: allows downgrading to software encoding.

  • AliRtcScreenShareEncoderConfiguration: the video encoding settings for screen sharing.

    Parameter

    Type

    Description

    dimensions

    CGSize

    The video resolution.

    frameRate

    NSInteger

    The video encoding frame rate.

    bitrate

    NSInteger

    The video encoding bitrate.

    rotationMode

    AliRtcRotationMode

    The rotation angle of the screen.

    keyFrameInterval

    NSInteger

    The keyframe interval. Unit: milliseconds. Default value: 0, which means the SDK controls the keyframe interval.

    forceStrictKeyFrameInterval

    bool

    Specifies whether to force the encoder to strictly generate keyframes according to the set keyframe interval. Default value: false.

    false: The encoder responds to keyframe requests, such as when other users join the channel. The keyframe interval does not strictly match the set value.

    true: The encoder does not respond to other keyframe requests and strictly generates keyframes according to the set value. This may cause a delay in the first frame for subscribers.

  • AliRtcAuthInfo: the 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

    The random string.

    token

    NSString * _Nonnull

    The token.

    timestamp

    long long

    The timestamp.

  • AliRtcDeviceVolumeType: the device volume type. This data type applies only to iOS.

    Enumeration name

    Description

    AliRtcDeviceVolumeTypeAuto

    The volume type is automatically specified by the SDK. This is the default value. We recommend that you not manually specify the volume type unless you have special requirements.

    AliRtcDeviceVolumeTypeMedia

    The media-related volume. This volume type applies to media-related scenarios. Volume of this type can be set to zero.

    AliRtcDeviceVolumeTypeVOIP

    The communication-related volume. This volume type applies to communication-related scenarios. Volume of this type cannot be set to zero.

  • AliRtcVideoSource: the source of raw video data.

    Enumeration Name

    Description

    AliRtcVideosourceCameraType

    The video stream.

    AliRtcVideosourceScreenShareType

    The screen sharing stream.

    AliRtcVideosourceTypeMax

    The placeholder.

  • AliRtcAudioSource: the source of raw audio data.

    Enumeration Name

    Description

    AliRtcAudioSourceCaptured

    The captured audio data.

    AliRtcAudioSourceProcessCaptured

    The audio data after 3A processing.

    AliRtcAudiosourcePub

    Ingest audio data.

    AliRtcAudioSourcePlayback

    The playback audio data.

    AliRtcAudioSourceRemoteUser

    The remote audio data from stream pulling.

  • AliRtcBufferType: the type of video data buffer.

    Enumeration Name

    Description

    AliRtcBufferType_Raw_Data

    The raw YUV data.

    AliRtcBufferType_CVPixelBuffer

    The CVPixelBuffer data.

    AliRtcBufferType_Texture

    The texture.

    AliRtcBufferType_File

    The file path.

  • AliRtcErrorCode: the error code.

    Enumeration Name

    Description

    AliRtcErrNone

    None.

    AliRtcErrJoinBadAppId

    The application ID does not exist.

    AliRtcErrJoinInvalidAppId

    The application ID is invalid.

    AliRtcErrJoinBadChannel

    The channel does not exist.

    AliRtcErrJoinInvalidChannel

    The channel is invalid.

    AliRtcErrJoinBadToken

    The token does not exist.

    AliRtcErrJoinTimeout

    The request to join the channel times out.

    AliRtcErrJoinBadParam

    The parameters are invalid.

    AliRtcErrMicOpenFail

    The collection device fails to be initialized.

    AliRtcErrSpeakerOpenFail

    The playback device fails to be initialized.

    AliRtcErrMicInterrupt

    An exception occurs during capturing.

    AliRtcErrSpeakerInterrupt

    An exception occurs during playback.

    AliRtcErrMicAuthFail

    The microphone is not authorized.

    AliRtcErrMicNotAvailable

    No audio collection device is available.

    AliRtcErrSpeakerNotAvailable

    No audio playback device is available.

    AliRtcErrCameraOpenFail

    The collection device fails to be initialized.

    AliRtcErrCameraInterrupt

    An exception occurs during capturing.

    AliRtcErrDisplayOpenFail

    Device initialization failed.

    AliRtcErrDisplayInterrupt

    An exception occurs during rendering.

    AliRtcErrIceConnectionConnectFail

    The media channel fails to be established.

    AliRtcErrIceConnectionReconnectFail

    The media channel fails to be reconnected.

    AliRtcErrIceConnectionHeartbeatTimeout

    The signaling heartbeat times out.

    AliRtcErrPublishInvaild

    Stream ingestion failed.

    AliRtcErrPublishNotJoinChannel

    The stream ingest fails because the user has not joined the channel.

    AliRtcErrPublishAudioStreamFailed

    The audio track fails to be ingested.

    AliRtcErrPublishVideoStreamFailed

    Failed to push the video stream.

    AliRtcErrPublishDualStreamFailed

    The major and minor streams fail to be ingested.

    AliRtcErrPublishScreenShareFailed

    Screen sharing push failed.

    AliRtcErrPublishScreenShareConfigError

    The screen sharing settings are invalid.

    AliRtcErrSubscribeInvaild

    The subscription is invalid.

    AliRtcErrSubscribeNotJoinChannel

    A subscription error occurs because the user has not joined the channel.

    AliRtcErrSubscribeAudioStreamFailed

    The subscription to the audio track fails.

    AliRtcErrSubscribeVideoStreamFailed

    The subscription to the video track fails.

    AliRtcErrSubscribeDualStreamFailed

    The subscription to the major and minor streams fails.

    AliRtcErrSubscribeScreenShareFailed

    The subscription to the screen track fails.

    AliRtcErrCdnLiveCommunicationFailed

    A signaling request error occurs for low-latency ARTC-based streaming.

    AliRtcErrCdnLiveMeidaSettingFailed

    The media settings are invalid for low-latency ARTC-based streaming.

    AliRtcErrCdnLiveNoneBroadcaster

    No streamer performs stream ingest in the current channel for low-latency ARTC-based streaming.

    AliRtcErrCdnLiveNeedRestart

    An error occurs for low-latency ARTC-based streaming. You must create another SDK instance at the application layer.

    AliRtcErrCdnLiveNeedRestartAgainLater

    An error occurs for low-latency ARTC-based streaming. You must create another SDK instance at the application layer after a specified period of time.

    AliRtcErrCdnLiveServiceUnavailable

    The low-latency ARTC service is unavailable or degraded.

    AliRtcErrCdnLiveMediaConnectionInterruption

    The network is disconnected during low-latency ARTC-based streaming.

    AliRtcErrSdkInvalidState

    The SDK is in an abnormal state.

    AliRtcErrSessionRemoved

    The session is deleted.

    AliRtcErrInvalidArguments

    The parameters do not match.

    AliRtcErrAudioBufferFull

    The buffer queue is full. This is used for external raw data transmission.

    AliRtcErrVideoBufferFull

    The buffer queue is full. This is used for external raw data transmission.

    AliRtcErrUpdateRoleChannel

    The role is not properly specified in interactive mode.

    AliRtcErrInner

    Other faults.

  • AliRtcExternalDeviceType: the type of peripheral device. This data type applies only to macOS.

    Enumeration Name

    Description

    AliRtcExternalTypeUnknown

    Unknown type.

    AliRtcExternalTypeAudioCapture

    The audio collection device.

    AliRtcExternalTypeAudioPlayout

    The audio playback device.

    AliRtcExternalTypeVideoCapture

    The video collection device.

  • AliRtcExternalDeviceState: the status of a peripheral device. This data type applies only to macOS.

    Enumeration Name

    Description

    AliRtcExternalDeviceAdd

    The peripheral device is added.

    AliRtcExternalDeviceRemove

    The peripheral device is removed.

  • AliRtcRecordVideoCanvasConfig: the canvas size for video recording. This data type applies only to macOS.

    Parameter

    Type

    Description

    canvasWidth

    int

    The width of the canvas.

    canvasHeight

    int

    The height of the canvas.

  • AliRtcRecordVideoLayout: the layout information for video recording. This data type applies only to macOS.

    Parameter

    Type

    Description

    mode

    AliRtcRecordVideoLayoutMode

    The layout mode.

    backColor

    AliRtcRecordVideoBgColor

    The background color.

    shapes

    NSMutableArray<AliRtcRecordVideoRegion *> * _Nullable

    The position information of each user's screen.

  • AliRtcRecordVideoLayoutMode: the layout mode for video recording. This data type applies only to macOS.

    Enumeration name

    Description

    AliRtcRecordVideoLayoutMode_GRID

    Pane layout

    AliRtcRecordVideoLayoutMode_SPEAKER

    The speaker layout.

    AliRtcRecordVideoLayoutMode_UNIQUE

    The single-stream layout.

    AliRtcRecordVideoLayoutMode_CUSTOM

    The custom layout.

  • AliRtcRecordVideoBgColor: the background color for video recording. This data type applies only to macOS.

    Parameter

    Type

    Description

    r

    uint8_t

    The red value in the color ratio.

    g

    uint8_t

    The green value in the color ratio.

    b

    uint8_t

    The blue value in the color ratio.

  • AliRtcRecordVideoRegion: the pane layout settings for video recording. This data type applies only to macOS.

    Parameter

    Type

    Description

    userId

    NSString * _Nonnull

    The user ID.

    sourceType

    AliRtcVideoSource

    The type of the raw video data source.

    area

    AliRtcRecordVideoRectangle

    The position information of the user's screen.

  • AliRtcRecordVideoRectangle: the pane position for video recording. This data type applies only to macOS.

    Parameter

    Type

    Description

    left

    AliRtcRecordVideoRational

    The left margin.

    top

    AliRtcRecordVideoRational

    The top margin.

    width

    AliRtcRecordVideoRational

    The width.

    height

    AliRtcRecordVideoRational

    The height.

  • AliRtcRecordVideoRational: the coordinates for mixed-stream recording. This data type applies only to macOS.

    Parameter

    Type

    Description

    numerator

    uint32_t

    The numerator (integer).

    denominator

    uint32_t

    The denominator (integer).

  • AliRtcRecordTemplate: the recording template. This data type applies only to macOS.

    Parameter

    Type

    Description

    recordType

    AliRtcRecordType

    The recording type.

    recordFormat

    AliRtcRecordFormat

    The recording format.

    sampleRate

    AliRtcAudioSampleRate

    The audio sampling rate for recording.

    audioQuality

    AliRtcAudioQuality

    The audio quality for recording.

    enableRecordExternalCapturePCM

    bool

    Specifies whether to mix and record external input audio.

    enableRecordExternalRenderPCM

    bool

    Specifies whether to mix and record externally rendered audio.

    canvas

    AliRtcRecordVideoCanvasConfig

    The canvas size for video recording.

    fps

    int

    The frame rate.

    bitrate

    int

    The bitrate.

    isFragment

    bool

    Specifies whether to record segmented MP4 files. Default value: true.

  • AliRtcDeviceInfo: the device information. This data type applies only to macOS.

    Parameter

    Type

    Description

    deviceName

    NSString * _Nullable

    The device name.

    deviceID

    NSString * _Nullable

    The device ID.

  • AliRtcScreenShareConfig: the screen sharing settings. This data type applies only to macOS.

    Parameter

    Type

    Description

    isShareByRegion

    bool

    Is it shared across regions?

    shareRegion

    AliRtcScreenShareRegion* _Nonnull

    The layout information of the shared region.

  • AliRtcScreenShareRegion: the portion of the screen to share. This data type applies only to macOS.

    Parameter

    Type

    Description

    originX

    float

    The x-coordinate.

    originY

    float

    The y-coordinate.

    width

    float

    The width.

    heigh

    foat

    The height.

  • AliRtcScreenSourceInfo: the source of the shared screen. This data type applies only to macOS.

    Parameter

    Type

    Description

    sourceId

    NSString * _Nonnull

    The ID of the shared source.

    sourceName

    NSString * _Nonnull

    The name of the shared source.

  • AliRtcScreenShareInfo: the screen sharing information. This data type applies only to macOS.

    Parameter

    Type

    Description

    sourceType

    AliRtcScreenShareType

    The type of shared content.

    sourceId

    NSString * _Nonnull

    The ID of the shared source.

    config

    AliRtcScreenShareConfig * _Nonnull

    The screen sharing configuration.

  • AliRtcScreenShareType: the screen sharing type. This data type applies only to macOS.

    Enumeration Name

    Description

    AliRtcScreenShareDesktop

    Desktop sharing.

    AliRtcScreenShareWindow

    Window sharing.

  • AliRtcVideoObserAlignment: the width alignment of the output video.

    Enumeration name

    Description

    AliRtcAlignmentDefault

    The width of the original video is retained. This is the default value.

    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 dashboard display type.

    Enumeration Name

    Description

    AliRtcShowTypeNone

    Not displayed.

    AliRtcShowTypeAudio

    Audio.

    AliRtcShowTypeVideo

    Video.

    AliRtcShowTypeNetwork

    Network.

    AliRtcShowTypeAll

    All

  • AliRtcTrascodingLiveTaskStatus: the status of the relayed live streaming task.

    Enumeration name

    Description

    AliRtcTrascodingLiveTaskStatusStart

    The task starts.

    AliRtcTrascodingLiveTaskStatusUpdate

    The task is updated.

    AliRtcTrascodingLiveTaskStatusStop

    The task is stopped.

  • AliRtcLiveTranscodingDisplayType: the image display mode in relayed live streaming.

    Enumeration Name

    Description

    NOT_DISPLAY

    Not displayed.

    ALWAYS

    Always display.

    WHEN_NO_VIDEO

    Displayed when no video is available.

  • AliRtcLiveTranscodingFontType: the font used for text displayed in relayed live streaming.

    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

    Portrait segmentation is disabled.

    AliRtcLiveTranscodingBody

    Portrait Segmentation

  • AliRtcLiveTranscodingSourceType: the input source for relayed live streaming.

    Enumeration Name

    Description

    AliRtcLiveTranscodingCamera

    Camera.

    AliRtcLiveTranscodingShareScreen

    Screen sharing.

  • AliRtcVideoState: the video track status change.

    Enumeration Name

    Description

    AliRtcVideoVideoClose

    The video track is closed.

    AliRtcVideoVideoOpen

    The video track is resumed.

  • AliRtcVideoReason: the reason for the video track status change.

    Enumeration name

    Description

    AliRTCVideoChangedByClient

    Client

    AliRTCVideoChangedByServer

    Server

  • AliRtcLiveTranscodingCropMode: the cropping mode in relayed live streaming.

    Enumeration Name

    Description

    AliRtcLiveTranscodingCrop

    The video is cropped at the original aspect ratio.

    AliRtcLiveTranscodingFill

    Maintains the aspect ratio with margins (default value).

  • AliRtcLiveTranscodingMediaProcessMode: the media processing mode in relayed live streaming.

    Enumerated value

    Description

    AliRtcLiveTranscodingNormal

    The general mode.

    AliRtcLiveTranscodingVirtualBackground

    The virtual background mode.

  • AliRtcLiveTranscodingStreamType: the relayed live streaming type.

    Enumeration Name

    Description

    AliRtcLiveTranscodingOrigin

    Relays the original stream.

    AliRtcLiveTranscodingAudio

    Relays only the audio track.

    AliRtcLiveTranscodingVideo

    Relays only the video track.

  • AliRtcLiveTranscodingMixMode: the relayed live streaming mix mode.

    Enumeration name

    Description

    AliRtcLiveTranscodingSINGLE

    The single-stream relay mode. In this mode, ARTC relays only the original single stream and does not transcode mixed streams. You do not need to set parameters for mixed-stream transcoding.

    AliRtcLiveTranscodingMIX

    The mixed-stream transcoding mode. In this mode, you can mix and transcode streams. This is the default value.

  • AliRtcLiveTranscodingState: the relayed live streaming status.

    Enumeration Name

    Description

    AliRtcLiveTranscodingState_IDLE

    No stream is being ingested.

    AliRtcLiveTranscodingState_CONNNECT

    The server for relayed live streaming is being connected.

    AliRtcLiveTranscodingState_RUNNING

    The stream ingest is in progress.

    AliRtcLiveTranscodingState_RECOVERING

    The stream ingest is being resumed.

    AliRtcLiveTranscodingState_FAILURE

    The stream ingest fails.

    AliRtcLiveTranscodingState_END

    The stream ingest is complete.

  • AliRtcLiveTranscodingText: the text information displayed in relayed live streaming.

    Parameter

    Type

    Description

    text

    NSString

    The text information.

    x

    int

    The x-coordinate, in pixels.

    y

    int

    The y-coordinate, in pixels.

    fontType

    AliRtcLiveTranscodingFontType

    The font for relayed live streaming.

    fontSize

    int

    The font size.

    zOrder

    int

    The z-order. 0 indicates the bottom layer, 1 indicates the layer above 0, and so on.

    fontColor

    int

    The font color.

  • AliRtcLiveTranscodingImage: the image information displayed in relayed live streaming.

    Parameter

    Type

    Description

    url

    NSString

    The URL of the image.

    alpha

    float

    The transparency of the image. 0.0 indicates transparent, and 1.0 indicates completely opaque.

    display

    AliRtcLiveTranscodingDisplayType

    The image display.

    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 z-order. 0 indicates the bottom layer, 1 indicates the layer above 0, and so on.

  • AliRtcLiveTranscodingUser: the custom stream information for a user in relayed 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 z-order. 0 indicates the bottom layer, 1 indicates the layer above 0, and so on.

    userId

    NSString *

    The user ID.

    streamType

    AliRtcLiveTranscodingStreamType

    The relayed live streaming mode.

    sourceType

    AliRtcLiveTranscodingSourceType

    The stream type.

    segmentType

    AliRtcLiveTranscodingSegmentType

    The input type for relayed live streaming.

    images

    NSArray<AliRtcLiveTranscodingImage *> *

    The image information for relayed live streaming.

    texts

    NSArray<AliRtcLiveTranscodingText *> *

    The text information for relayed live streaming.

  • AliRtcLiveTranscodingParam: the relayed live streaming configurations.

    Parameter

    Type

    Description

    mixMode

    AliRtcLiveTranscodingMixMode

    The mode of relayed live streaming.

    singleParam

    AliRtcLiveTranscodingSingleParam

    The parameters for ingesting a single stream in relayed live streaming.

    mixParam

    AliRtcLiveTranscodingMixParam

    The parameters for ingesting mixed streams in relayed live streaming.

  • AliRtcLiveTranscodingMixParam: the parameters for ingesting mixed streams in relayed live streaming.

    Parameter

    Type

    Description

    taskProfile

    AliRtcLiveTranscodingTaskProfile

    The billing specifications of relayed live streaming.

    encodeParam

    AliRtcLiveTranscodingEncodeParam

    The encoding parameters of relayed live streaming.

    users

    NSArray<AliRtcLiveTranscodingUser *> *

    The users in relayed live streaming.

    backgroundColor

    int

    The background color.

    backgrounds

    NSArray<AliRtcLiveTranscodingImage *> *

    The list of background images.

    watermarks

    NSArray<AliRtcLiveTranscodingImage *> *

    The list of watermark images.

    clockWidgets

    NSArray<AliRtcLiveTranscodingClockWidget *> *

    The list of clock widgets.

    cropMode

    AliRtcLiveTranscodingCropMode

    The cropping mode in relayed live streaming.

    mediaProcessMode

    AliRtcLiveTranscodingMediaProcessMode

    The media processing mode in relayed live streaming.

  • AliRtcLiveTranscodingSingleParam: the parameters for ingesting a single stream in relayed live streaming.

    Parameter

    Type

    Description

    userId

    NSString *

    The user ID.

    streamType

    AliRtcLiveTranscodingStreamType

    The type of relayed live streaming.

    sourceType

    AliRtcLiveTranscodingSourceType

    The type of relayed live streaming video stream.

  • AliRtcLiveTranscodingTaskProfile: the billing specifications for relayed 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 relayed live streaming.

    Parameter

    Type

    Description

    videoWidth

    int

    Width

    videoHeight

    int

    High

    videoFramerate

    int

    The frame rate.

    videoBitrate

    int

    The bitrate.

    videoGop

    int

    GOP.

    videoCodec

    AliRtcLiveTranscodingVideoCodec

    The video encoder for relayed live streaming.

    audioSamplerate

    AliRtcLiveTranscodingAudioSampleRate

    The audio sampling rate for relayed live streaming.

    audioBitrate

    int

    The audio bitrate.

    audioChannels

    int

    The number of sound channels.

  • AliRtcLiveTranscodingAudioSampleRate: the audio sampling rate for relayed live streaming.

    Enumeration Name

    Description

    AliRtcLiveTranscoding_HZ_48000

    The sampling rate is 48,000 Hz.

    AliRtcLiveTranscoding_HZ_44100

    The sampling rate is 44,100 Hz.

    AliRtcLiveTranscoding_HZ_32000

    The sampling rate is 32,000 Hz.

    AliRtcLiveTranscoding_HZ_16000

    The sampling rate is 16,000 Hz.

    AliRtcLiveTranscoding_HZ_8000

    The sampling rate is 8,000 Hz.

  • AliRtcLiveTranscodingClockWidget: the clock widget used in relayed 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 relayed live streaming.

    zOrder

    int

    The z-order. 0 indicates the bottom layer, 1 indicates the layer above 0, and so on.

    fontColor

    int

    The font color for relayed live streaming.

    fontType

    AliRtcLiveTranscodingFontType

    The font for relayed live streaming.

  • AliRtcBokehScaleModel: the scaling mode for background replacement. This data type applies only to macOS.

    Enumeration Name

    Description

    AliRtcBokehScaleModelCrop

    Crop proportionally.

    AliRtcBokehScaleModelFill

    Fill with black bars.

  • AliRtcAudioPlayingStateCode: the playback status code for audio accompaniment. This data type applies only to macOS.

    Enumeration name

    Description

    AliRtcAudioPlayingStarted

    The playback starts.

    AliRtcAudioPlayingStopped

    The playback stops.

    AliRtcAudioPlayingPaused

    The playback is paused.

    AliRtcAudioPlayingResumed

    The playback is resumed.

    AliRtcAudioPlayingEnded

    The playback ends.

    AliRtcAudioPlayingBuffering

    The system is buffering data.

    AliRtcAudioPlayingBufferingEnd

    The buffering is complete.

    AliRtcAudioPlayingFailed

    The playback fails.

  • AliRtcAudioPlayingErrorCode: the playback error code for audio accompaniment. This data type applies only to macOS.

    Enumeration Name

    Description

    AliRtcAudioPlayingNoError

    No errors.

    AliRtcAudioPlayingOpenFailed

    The file fails to be opened.

    AliRtcAudioPlayingDecodeFailed

    The file fails to be decoded.

  • AliRtcScreenShareMode.

    Enumeration Name

    Description

    AliRtcScreenShareNone

    No screen sharing is performed.

    AliRtcScreenShareVideo

    Only the video stream is shared.

    AliRtcScreenShareAudioApp

    Only the audio stream of the application is shared.

    AliRtcScreenShareAll

    Both audio and video streams are shared. It does not support sharing microphone audio during screen sharing. To share microphone audio, use the SDK's built-in capability to capture and transmit microphone audio separately.

  • AliRtcCapabilityProfile: the feature configurations used in AliRtcChannelParam.

    Enumeration Name

    Description

    AliRtcCapabilityProfileDefault

    The default value, which specifies no special requirements.

    AliRtcCapabilityProfileAiHuman

    This feature enables AI agents to interact with real users in call scenarios.

    AliRtcCapabilityProfileAiRobot

    Features of robots in AI agent call scenarios.

  • AliRtcChannelParam: the parameters for joining a channel.

    Parameter

    Type

    Description

    channelId

    NSString*

    The ID of the channel to join. It must be the same as the channel ID used to generate the token. If it is left empty, the system defaults to that channel ID.

    userId

    NSString*

    The ID of the user who joins the channel. It must be the same as the user ID used to generate the token. If it is left empty, the system defaults to that user ID.

    userName

    NSString*

    The username for display. If it is left empty, the system shows that the username is unavailable.

    capabilityProfile

    AliRtcCapabilityProfile

    The feature profile. If you have other feature requirements in an AI agent call scenario, you can directly select a profile without individually enabling each feature.

  • AliRtcNetworkQualityProbeConfig: the network probing configuration parameters.

    Parameter

    Type

    Description

    probeUplink

    BOOL

    Specifies whether to probe the uplink. Default value: NO.

    probeDownlink

    BOOL

    Specifies whether to probe the downlink. Default value: NO. Not supported temporarily.

    upLinkBandWidth

    int

    The peak uplink bandwidth for probing. Unit: kbps. Default value: 1000.

    DownLinkBandWidth

    int

    The peak downlink bandwidth for probing. Unit: kbps. Default value: 1000. Not supported temporarily.

  • AliRtcNetworkQualityProbeResult: the result of network probing.

    Parameter

    Type

    Description

    rtt

    int

    The RTT of the link. Unit: ms.

    upLinkLossRate

    int

    The packet loss rate of the uplink network for probing. Maximum value: 100%.

    upLinkJitter

    int

    The jitter of the uplink network for probing. Unit: ms.

    upLinkBandWidth

    int

    The uplink network bandwidth. Unit: kbps.

    downLinkLossRate

    int

    The packet loss rate of the downlink network for probing. Maximum value: 100%. Not supported temporarily.

    downLinkJitter

    int

    The jitter of the downlink network for probing. Unit: ms. Not supported temporarily.

    downLinkBandWidth

    int

    The downlink network bandwidth. Unit: kbps. Not supported temporarily.

  • AliRtcAudioFrame: the raw audio data.

    Parameter

    Type

    Description

    dataPtr

    void *

    The audio data pointer.

    numOfSamples

    int

    The number of samples.

    bytesPerSample

    int

    The number of bytes per sample.

    numOfChannels

    int

    The number of sound channels.

    samplesPerSec

    int

    The sampling rate.

  • AliRtcVideoPipelineMirrorMode: the mirroring 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 only for preview.

    AliRtcVideoPipelineMirrorModeOnlyPublishMirror

    Mirroring is enabled only for stream ingest.

  • AliRtcCapturePipelineScaleMode: the scaling mode for the capture pipeline.

    Enumeration Name

    Description

    AliRtcCapturePipelineScaleModePre

    Scaling is performed immediately after capture. This is the default.

    AliRtcCapturePipelineScaleModePost

    Scaling is performed during encoding.

  • AliRtcAudioAccompanyConfig: the audio accompaniment playback configuration.

    Parameter

    Type

    Description

    onlyLocalPlay

    BOOL

    Specifies whether to play only locally.

    replaceMic

    BOOL

    Specifies whether to replace the microphone.

    loopCycles

    int

    The number of loop cycles. Set to -1 for infinite loops or a positive integer greater than 0. Other values are invalid.

    startPosMs

    NSInteger

    The start playback position. Unit: ms.

    publishVolume

    int

    The stream ingest volume. Valid values: [0-100]. Default value: 50.

    playoutVolume

    int

    The playback volume. Valid values: [0-100]. Default value: 50.

  • AliRtcAudioFileInfo: the audio file information.

    Parameter

    Type

    Description

    filePath

    NSString *

    The audio file path.

    durationMs

    NSInteger

    The duration of the audio file. Unit: ms.

  • AliRtcDataChannelMsg: the definition of a data channel message.

    Parameter

    Type

    Description

    type

    AliRtcDataMsgType

    The audio data pointer.

    networkTime

    long long

    The network timestamp.

    progress

    int

    The progress.

    data

    NSData*

    The data.

  • AliRtcDataMsgType: the type of a data channel message.

    Enumerated value

    Description

    AliRtcDataMsgNone

    Undefined message.

    AliRtcDataMsgMusicProgress

    Music progress message.

    AliRtcDataMsgCustom

    User-defined message.

  • AliRtcLocalDeviceType: the type of the local device.

    Enumerated value

    Description

    AliRtcLocalDeviceTypeUnknown

    Unknown device type.

    AliRtcLocalDeviceTypeMic

    Microphone device.

    AliRtcLocalDeviceTypeSpeaker

    Speaker device.

    AliRtcLocalDeviceTypeAudioDevice

    Audio device.

    AliRtcLocalDeviceTypeCamera

    Camera device.

    AliRtcLocalDeviceTypeDisplay

    Display device.

    AliRtcLocalDeviceTypeVideoDevice

    Video device.

  • AliRtcLocalDeviceExceptionType: the exception type for the local device.

    Enumerated value

    Description

    AliRtcLocalDeviceExceptionTypeUnknown

    Unknown exception type.

    AliRtcLocalDeviceExceptionTypeMicOpenFail

    The microphone fails to open.

    AliRtcLocalDeviceExceptionTypeMicInterrupt

    The microphone is interrupted.

    AliRtcLocalDeviceExceptionTypeMicAuthFail

    The microphone is not authorized.

    AliRtcLocalDeviceExceptionTypeMicNotAvailable

    No microphone is available.

    AliRtcLocalDeviceExceptionTypeSpeakerOpenFail

    The speaker fails to open.

    AliRtcLocalDeviceExceptionTypeSpeakerInterrupt

    The speaker is interrupted.

    AliRtcLocalDeviceExceptionTypeSpeakerNotAvailable

    No speaker is available.

    AliRtcLocalDeviceExceptionTypeAudioDeviceException

    Audio device exception.

    AliRtcLocalDeviceExceptionTypeCameraOpenFail

    The camera fails to open.

    AliRtcLocalDeviceExceptionTypeCameraInterrupt

    The camera is interrupted.

    AliRtcLocalDeviceExceptionTypeCameraAuthFail

    The camera is not authorized.

    AliRtcLocalDeviceExceptionTypeDisplayExecption

    Display device exception.

    AliRtcLocalDeviceExceptionTypeVideoDeviceException

    Video device exception.

  • AliRtcLocalAudioStateType: the local audio capture state.

    Enumerated value

    Description

    AliRtcLocalAudioStateTypeStarting

    Starting.

    AliRtcLocalAudioStateTypeStarted

    Started.

    AliRtcLocalAudioStateTypeStopping

    Shutting down.

    AliRtcLocalAudioStateTypeStopped

    Stopped.

  • AliRtcLocalVideoStateType: the local video device state.

    Enumerated value

    Description

    AliRtcLocalVideoStateTypeStarting

    Starting.

    AliRtcLocalVideoStateTypeStarted

    Started.

    AliRtcLocalVideoStateTypeStopping

    Shutting down.

    AliRtcLocalVideoStateTypeStopped

    Shutdown complete.

  • AliRtcAudioAccompanyStateCode: the playback status for music accompaniment.

    Enumerated value

    Description

    AliRtcAudioAccompanyStarted

    Playback starts.

    AliRtcAudioAccompanyStopped

    Playback stops.

    AliRtcAudioAccompanyPaused

    Playback is paused.

    AliRtcAudioAccompanyResumed

    Playback is resumed.

    AliRtcAudioAccompanyEnded

    Playback ends.

    AliRtcAudioAccompanyBuffering

    Buffering.

    AliRtcAudioAccompanyBufferingEnd

    Buffering ends.

    AliRtcAudioAccompanyFailed

    Playback fails.

  • AliRtcAudioAccompanyErrorCode: the playback error code for music accompaniment.

    Enumerated value

    Description

    AliRtcAudioAccompanyNoError

    No errors.

    AliRtcAudioAccompanyOpenFailed

    The file fails to open.

    AliRtcAudioAccompanyDecodeFailed

    The file fails to decode.

  • AliRtcLiveTranscodingVideoCodec: the video encoder used for relayed live streaming.

    Enumeration Name

    Description

    AliRtcLiveTranscodingVideoCodec_H264

    H.264

    AliRtcLiveTranscodingVideoCodec_H265

    H.265

  • AliRtcAudioEffectBeautifyMode: the voice beautification mode enumeration.

    Enumerated value

    Description

    AliRtcAudioEffectBeautify_Off

    Disables voice beautification effects.

    AliRtcAudioEffectBeautify_Vigorous

    Mellow.

    AliRtcAudioEffectBeautify_Ringing

    Ringing.

    AliRtcAudioEffectBeautify_Mode_Max

    The placeholder, indicating the maximum value. Do not use for actual settings.

  • AliRtcAudioEffectEqualizationBandFrequency is an enumeration of parameter types for the reverb effect.

    Enumerated constant

    Description

    AliRtcSdk_AudioEffect_EqualizationBand31

    31 Hz

    AliRtcSdk_AudioEffect_EqualizationBand62

    62 Hz

    AliRtcSdk_AudioEffect_EqualizationBand125

    125 Hz

    AliRtcSdk_AudioEffect_EqualizationBand250

    250 Hz

    AliRtcSdk_AudioEffect_EqualizationBand500

    500 Hz

    AliRtcSdk_AudioEffect_EqualizationBand1K

    1 kHz

    AliRtcSdk_AudioEffect_EqualizationBand2K

    2 kHz

    AliRtcSdk_AudioEffect_EqualizationBand4K

    4 kHz

    AliRtcSdk_AudioEffect_EqualizationBand8K

    8 kHz

    AliRtcSdk_AudioEffect_EqualizationBand16K

    16 kHz