Data structure

更新时间:
复制 MD 格式

This topic describes the data types of ApsaraVideo Real-time Communication (ARTC) SDK for HarmonyOS.

List of classes

Data type

Description

AliRtcAudioFrame

Audio frame data.

AliRtcAudioCapability

Audio capabilities.

AliRtcLocalAudioStats

Local audio statistics.

AliRtcRemoteAudioStats

Remote audio statistics.

AliRtcUserVolumeInfo

User volume information.

AliRtcAudioFileInfo

Audio file information.

AliRtcAudioAccompanyConfig

Accompaniment playback settings.

AliRtcAudioFrameObserverConfig

Audio data callback settings.

AliRtcExternalAudioStreamConfig

External audio stream settings.

AliRtcAudioEffectConfig

Sound effect settings.

AliRtcVideoFrame

Video frame data.

AliRtcLocalVideoStats

Local video statistics.

AliRtcRemoteVideoStats

Remote video statistics.

AliRtcVideoDimensions

Video resolution.

AliRtcVideoEncoderConfiguration

Video encoder configuration for the camera track.

AliRtcVideoDecoderConfiguration

Video decoder configuration for the camera track.

AliRtcScreenShareEncoderConfiguration

Screen share encoder configuration.

AliRtcVideoCanvas

Video canvas.

AliRtcCameraCaptureConfiguration

Camera capture preference.

AliRtcVideoExternalEncoderParameter

External encoder parameters for QoS feedback.

AliRtcEncoderNotifyInfo

Encoder usage information.

AliRtcDecoderNotifyInfo

Decoder usage information.

AliRtcStats

Session statistics.

AliRtcEngineAuthInfo

Engine authentication information.

AliRtcDataChannelMsg

Data channel message.

AliRtcLiveTranscodingSingleParam

Parameters for ingesting a single stream in relayed live streaming.

AliRtcLiveTranscodingEncodeParam

Encoding parameters for relayed live streaming.

AliRtcLiveTranscodingClockWidget

Clock widget settings for relayed live streaming.

AliRtcLiveTranscodingImage

Image overlay settings for relayed live streaming.

AliRtcLiveTranscodingText

Text overlay settings for relayed live streaming.

AliRtcLiveTranscodingUser

User layout settings for relayed live streaming.

AliRtcLiveTranscodingMixParam

Stream mixing parameters for relayed live streaming.

AliRtcLiveTranscodingParam

Configurations for relayed live streaming.

AliRtcSDKChannelParam

Channel parameters.

AliRtcSDKAIAgentParam

Parameters for the AI agent.

AliRtcRecordAudioConfig

Audio recording configuration.

AliRtcRecordVideoConfig

Video recording configuration.

AliRtcNetworkProbeResult

Network quality probe result.

AliRtcNetworkProbeConfig

Network probe configuration.

List of enumerations

Type

Description

AliRtcCameraDirection

Camera direction.

AliRtcCameraCaptureProfile

Capture resolution.

AliRtcCaptureOutputPreference

Camera capture preference.

AliRtcCapturePipelineScaleMode

Video scaling stage in the capture pipeline.

AliRtcVideoTrack

Video track type.

AliRtcVideoStreamType

Camera track type.

AliRtcVideoEncodeCodecType

Video encoding format.

AliRtcVideoCodecType

Video codec type.

AliRtcFrameRate

Video frame rate.

AliRtcVideoEncoderOrientationMode

Orientation mode.

AliRtcVideoMirrorMode

Video mirror mode.

AliRtcVideoFormat

Video format.

AliRtcBufferType

Video data format.

AliRtcRotationMode

Rotation angle.

AliRtcVideoState

Video track status.

AliRtcVideoReason

Reason for the video track status change.

AliRtcVideoEncodedFrameType

Frame type for QoS feedback to an external encoder.

AliRtcVideoCodecManufacturer

Codec manufacturer.

AliRtcVideoCodecKindType

Video codec type.

AliRtcRenderMode

Render mode.

AliRtcRenderMirrorMode

Mirror mode.

AliRtcVideoPipelineMirrorMode

Mirror mode for the video track.

AliRtcAudioTrack

Audio track type.

AliRtcAudioProfile

Audio profile.

AliRtcAudioScenario

Audio scenario.

AliRtcAudioSampleRate

Audio sample rate.

AliRtcAudioNumChannel

Audio channel configuration.

AliRtcAudioSource

Audio data source.

AliRtcAudioRouteType

Audio route type.

AliRtcAudioFocusType

Audio focus state.

AliRtcAudioAccompanyStateCode

Playback status of the accompaniment.

AliRtcAudioAccompanyErrorCode

Playback error code of the accompaniment.

AliRtcAudioEffectVoiceChangerMode

Voice changer effect.

AliRtcAudioEffectReverbMode

Reverberation mode.

AliRtcAudioEffectBeautifyMode

Voice beautification mode.

AliRtcAudioEffectReverbParamType

Reverberation parameter type.

AliRtcAudioEffectEqualizationBandFrequency

Equalization frequency band.

AliRtcMuteLocalAudioMode

Local mute mode.

AliRtcChannelProfile

Channel profile.

AliRtcClientRole

User role.

AliRtcCapabilityProfile

Role settings for the scenario.

AliRtcUserOfflineReason

User offline reason.

AliRtcOnByeType

Reason a user is forced to leave a channel.

AliRtcConnectionStatus

Network connection status.

AliRtcConnectionStatusChangeReason

Reason for the network connection status change.

AliRtcNetworkQuality

Network quality.

AliRtcPublishState

Publish state.

AliRtcSubscribeState

Subscription status.

AliRtcLocalAudioState

State of the local audio capture.

AliRtcLocalVideoState

State of the local video capture.

AliRtcLocalDeviceType

Local device type.

AliRtcLocalDeviceExceptionType

Local device exception type.

AliRtcLiveTranscodingState

State of relayed live streaming.

AliRtcLiveTranscodingStreamType

Stream type for relayed live streaming.

AliRtcLiveTranscodingMixMode

Mixing mode for relayed live streaming.

AliRtcLiveTranscodingSourceType

Video track type for relayed live streaming.

AliRtcLiveTranscodingTaskProfile

Billing specifications for relayed live streaming.

AliRtcLiveTranscodingAudioSampleRate

Audio sample rate for relayed live streaming.

AliRtcLiveTranscodingVideoCodec

Codec type for relayed live streaming.

AliRtcLiveTranscodingCropMode

Cropping mode for relayed live streaming.

AliRtcLiveTranscodingMediaProcessMode

Media processing mode for relayed live streaming.

AliRtcLiveTranscodingSegmentType

Input type for relayed live streaming.

AliRtcLiveTranscodingErrorCode

Error code for relayed live streaming.

AliRtcLiveTranscodingTaskStatus

Task status for relayed live streaming.

AliRtcLiveTranscodingFontType

Font type for relayed live streaming.

AliRtcLiveTranscodingImageDisplayType

Image display mode for relayed live streaming.

AliRtcScreenShareMode

Screen sharing mode.

AliRtcRecordType

Record type.

AliRtcRecordFormat

Record format.

AliRtcRecordAudioQuality

Audio quality for recording.

AliRtcRecordVideoQuality

Video quality for recording.

AliRtcRecordEventCode

Event type for recording callbacks.

AliRtcDataMsgType

Data channel message type.

AliRtcLogLevel

Log level.

Class

AliRtcAudioFrame

Audio frame data.

Property

Type

Description

buffer

ArrayBuffer

Raw data of the audio frame.

bytesPerSample

number

Number of bytes per sample.

numOfChannels

number

Number of audio channels.

samplesPerSec

number

Number of samples per second.

AliRtcAudioCapability

Defines the audio capability settings.

Parameter

Type

Description

captureKeepAlive

boolean

If true, the capture device remains active after leaving a meeting.

playoutKeepAlive

boolean

If true, the playback device remains active after leaving a meeting.

AliRtcLocalAudioStats

Statistics for local audio.

Property

Type

Description

scene

AliRtcAudioScenario

The audio scenario mode.

track

AliRtcAudioTrack

The audio track type.

sentBitrate

number

The sent bitrate, in kbps.

sentSamplerate

number

The sent sample rate, in Hz.

numChannel

number

The number of channels.

inputLevel

number

The input level.

AliRtcRemoteAudioStats

Contains remote audio statistics.

Parameter

Type

Description

userId

string

The remote user ID.

track

AliRtcAudioTrack

The audio track.

quality

number

The remote audio stream quality.

networkTransportDelay

number

The network latency from the sender to the receiver (ms).

jitterBufferDelay

number

The delay in the jitter buffer (ms).

audioLossRate

number

The audio packet loss rate during the callback interval (%).

rcvdBitrate

number

The instantaneous bitrate of the received stream (Kbps).

totalFrozenTimes

number

The total audio freeze duration since the remote user joined the channel (ms).

audioTotalFrozenTime

number

The cumulative audio playback freeze duration (ms).

audioTotalFrozenRate

number

The audio playback freeze rate (%).

AliRtcUserVolumeInfo

Describes a speaker's volume.

Parameter

Type

Description

uid

string

The user ID of the speaker.

speechState

boolean

The user's speaking state. true means the user is speaking.

volume

number

The speaker's volume. Value range: [0, 255].

sumVolume

number

The cumulative volume during the callback period, which is used to identify the current speaker. Value range: [0, 255].

AliRtcAudioFileInfo

Contains audio file information.

Property

Type

Description

filePath

string

The audio file path.

durationMs

number

The duration of the audio file, in milliseconds.

AliRtcAudioAccompanyConfig

Defines the playback settings for audio accompaniment.

Parameter

Type

Description

onlyLocalPlay

boolean

If true, the accompaniment plays only locally and is not published to remote users. Default: false.

replaceMic

boolean

If true, the accompaniment replaces the microphone audio stream. Default: false.

loopCycles

number

The loop count. Set to -1 for an infinite loop or a positive integer for the number of loops. Default: -1.

startPosMs

number

The start position for playback, in milliseconds (ms). Default: 0.

publishVolume

number

The publish volume of the accompaniment. The range is 0 to 100. Default: 50.

playoutVolume

number

The playout volume of the accompaniment. The range is 0 to 100. Default: 50.

AliRtcAudioFrameObserverConfig

Settings for the audio data callback.

Parameter

Type

Description

sampleRate

AliRtcAudioSampleRate

The sample rate of the audio data in the callback.

channels

AliRtcAudioNumChannel

The number of audio channels in the callback.

AliRtcExternalAudioStreamConfig

Defines settings for the external audio stream.

Parameter

Type

Description

channels

number

The number of channels. Default: 1.

sampleRate

number

The sample rate, in Hz. Default: 48000.

playoutVolume

number

The playout volume. The value ranges from 0 to 100. Default: 50.

publishVolume

number

The publish volume. The value ranges from 0 to 100. Default: 50.

publishStream

number

The type of stream to publish. Valid values: 1 (publish as a dual audio stream) and 0 (publish as a mic audio stream).

enable3A

boolean

Specifies whether to apply 3A processing to the input PCM data.

AliRtcAudioEffectConfig

Defines the settings for an audio effect.

Parameter

Type

Description

needPublish

boolean

Specifies whether to publish the audio effect. Default value: false.

loopCycles

number

Specifies the number of loops. Valid values: -1 (infinite loop) or a positive integer. Default value: -1.

startPosMs

number

Specifies the start position in milliseconds (ms). Default value: 0.

publishVolume

number

Specifies the publish volume. The value must be in the range of [0, 100]. Default value: 50.

playoutVolume

number

Specifies the playout volume. The value must be in the range of [0, 100]. Default value: 50.

AliRtcVideoFrame

Represents a video frame.

Parameter

Type

Description

format

AliRtcVideoFormat

The video format.

type

AliRtcBufferType

The buffer type.

data

ArrayBuffer

The frame data.

stride

number

The stride of the video frame, in bytes.

strideY

number

The stride of the Y component, in bytes.

strideU

number

The stride of the U component, in bytes.

strideV

number

The stride of the V component, in bytes.

height

number

The height of the video frame, in pixels.

width

number

The width of the video frame, in pixels.

rotation

number

The rotation angle, in degrees.

timeStamp

number

The timestamp of the video frame, in milliseconds.

textureId

number

The texture ID.

transformMatrix

Array

A 4x4 transformation matrix.

sharedContext

number

The shared context ID, used in multi-threaded or multi-device scenarios.

eglChanged

boolean

Indicates whether the EGL context has changed.

eglContext

number

The EGL context pointer for the OpenGL ES rendering context.

AliRtcLocalVideoStats

Provides local video statistics.

Parameter

Type

Description

track

AliRtcVideoTrack

The video track.

targetEncodeBitrate

number

The target encoding bitrate, in Kbps.

actualEncodeBitrate

number

The actual encoding bitrate, in Kbps.

sentBitrate

number

The sending bitrate, in Kbps.

sentFps

number

The sending frame rate, in fps.

encodeFps

number

The encoding frame rate, in fps.

captureFps

number

The capture frame rate, in fps.

avgQpPerSec

number

The average Quantization Parameter (QP) per second.

AliRtcRemoteVideoStats

Contains statistics for a remote video stream.

Parameter

Type

Description

userId

string

The user ID of the remote participant.

track

AliRtcVideoTrack

The video track type.

width

number

The video width, in pixels.

height

number

The video height, in pixels.

decodeFps

number

The decoding frame rate, in frames per second (fps).

renderFps

number

The rendering frame rate, in frames per second (fps).

frozenTimes

number

The total number of video freezes.

videoTotalFrozenTime

number

The cumulative video freeze duration, in milliseconds (ms).

videoTotalFrozenRate

number

The cumulative video freeze rate, in percentage (%).

rtpCount

number

The number of frames received per second.

rtpLoss

number

The number of dropped frames per second.

AliRtcVideoDimensions

Defines the video dimensions.

Parameter

Type

Description

width

number

The width of the video frame in pixels.

height

number

The height of the video frame in pixels.

AliRtcVideoEncoderConfiguration

The video encoder configuration.

Parameter

Type

Description

dimensions

AliRtcVideoDimensions

The video resolution, in pixels. Default: 640x480. Maximum: 1920x1080.

frameRate

AliRtcFrameRate

The video frame rate, in frames per second (fps). Default: 15. Maximum: 30.

bitrate

number

The video encoding bitrate, in Kbps.

min_bitrate

number

The minimum video encoding bitrate, in Kbps. Default: 0.

keyFrameInterval

number

The keyframe interval, in milliseconds (ms). Default: 0, which lets the SDK control the keyframe interval.

forceStrictKeyFrameInterval

number

Whether to force the encoder to generate keyframes at the configured interval. Default: false.

orientationMode

AliRtcVideoEncoderOrientationMode

The video output orientation.

mirrorMode

AliRtcVideoMirrorMode

The stream mirroring mode.

rotationMode

AliRtcRotationMode

The stream rotation mode.

encodeCodecType

AliRtcVideoEncodeCodecType

The encoding type.

codecType

AliRtcVideoCodecType

The encoding mode.

seiForceFrontIFrame

number

Whether to use Supplemental Enhancement Information (SEI) to force an I-frame. Default: false.

enableDynamicEncode

number

Whether to enable dynamic encoding.

disableDipenseResolutionChange

number

Whether to enable pre-encoding scaling.

enableDowngrade

number

Whether to allow resolution or stream downgrade.

enableH264BFrame

number

Whether to enable B-frames for H.264 encoding.

enableHevcBFrame

number

Whether to enable B-frames for HEVC encoding.

AliRtcVideoDecoderConfiguration

Defines the video decoding configuration for a camera stream.

Parameter

Type

Description

codecType

AliRtcVideoCodecType

The codec type.

enableHardwareDecoderBframe

number

Enables hardware decoding for B-frames. Required if the sender enables B-frames; otherwise, the video stream fails to decode.

textureBindContext

number

The context to bind for texture decoding.

AliRtcScreenShareEncoderConfiguration

Specifies the encoding configuration for screen sharing.

Parameter

Type

Description

dimensions

AliRtcVideoDimensions

The video resolution, in pixels. Default: 640 x 480. Maximum: 1920 x 1080.

frameRate

AliRtcFrameRate

The video frame rate, in frames per second (fps). Default: 15. Maximum: 30.

bitrate

number

The video bitrate, in kbps.

keyFrameInterval

number

The keyframe interval, in milliseconds (ms). Default: 0, which lets the SDK control the keyframe interval.

forceStrictKeyFrameInterval

boolean

Specifies whether to force the encoder to strictly follow the specified keyframe interval. Default: false.

rotationMode

AliRtcRotationMode

The stream rotation mode.

AliRtcVideoCanvas

Defines the video rendering canvas.

Parameter

Type

Description

surfaceId

string

The display view. This is the ID of the XComponent.

width

number

The width of the third-party OpenGL ES texture.

height

number

The height of the third-party OpenGL ES texture.

textureId

number

The ID of the third-party OpenGL ES texture.

rotation

AliRtcRotationMode

The rotation angle. Defaults to AliRtcRotationMode_0.

mirrorMode

AliRtcRenderMirrorMode

The mirror mode. Defaults to AliRtcRenderMirrorModeOnlyFront.

renderMode

AliRtcRenderMode

The render mode. Defaults to AliRtcRenderModeAuto.

backgroundColor

number

The RGB hexadecimal value for the background color.

displayView

AliRtcSurfaceView | undefined

The surface view.

AliRtcCameraCaptureConfiguration

Configuration for camera capture.

Parameter

Type

Description

preference

AliRtcCaptureOutputPreference

The capture preference.

cameraDirection

AliRtcCameraDirection

The camera direction.

fps

number

The frame rate in frames per second (fps).

cameraCaptureProfile

AliRtcCameraCaptureProfile

The resolution for video capture.

disableVideoCaptureReverse

number

Whether to disable flipping the captured video frame based on the aspect ratio. Valid values: -1 (default), 0 (disabled), 1 (enabled).

captureObserverOriginal

number

Whether to trigger a callback for the original video frame data. Valid values: -1 (default), 0 (disabled), 1 (enabled).

textureEncode

number

Whether to enable texture encoding. Valid values: -1 (default), 0 (disabled), 1 (enabled).

cameraTextureCapture

number

Whether to enable texture capture from the camera. Valid values: -1 (default), 0 (disabled), 1 (enabled).

AliRtcVideoExternalEncoderParameter

Specifies QoS feedback parameters for an external encoder.

Parameter

Type

Description

width

number

Video frame width, in pixels.

height

number

Video frame height, in pixels.

frame_rate

number

Video frame rate, in frames per second (fps).

bitrate_bps

number

Encoding bitrate, in bits per second (bps).

AliRtcEncoderNotifyInfo

Contains information about encoder usage.

Parameter

Type

Description

videoTrack

AliRtcVideoTrack

The video track associated with this notification.

encoderManufacturer

AliRtcVideoCodecManufacturer

The manufacturer of the encoder.

videoFormat

AliRtcVideoFormat

The format of the video stream.

AliRtcDecoderNotifyInfo

Information about decoder usage.

Parameter

Type

Description

uid

string

The user ID.

videoTrack

AliRtcVideoTrack

The video stream type.

decoderManufacturer

AliRtcVideoCodecManufacturer

The codec manufacturer.

AliRtcStats

Overall session statistics for the call.

Parameter

Type

Description

availableSendBitrate

number

The available uplink bitrate, in kbps.

sentKBitrate

number

The total uplink bitrate, in kbps.

rcvdKBitrate

number

The total downlink bitrate, in kbps.

sentBytes

number

Total bytes sent.

rcvdBytes

number

Total bytes received.

videoRcvdKBitrate

number

The downlink video bitrate, in kbps.

videoSentKBitrate

number

The uplink video bitrate, in kbps.

systemCpu

number

The system CPU utilization (%).

appCpu

number

The application CPU utilization (%).

callDuration

number

The call duration, in seconds.

sentLossRate

number

The uplink packet loss rate (%).

sentLossPkts

number

The number of packets lost on the uplink.

sentExpectedPkts

number

The total number of packets expected on the uplink.

rcvdLossRate

number

The downlink packet loss rate (%).

rcvdLossPkts

number

The number of packets lost on the downlink.

rcvdExpectedPkts

number

The total number of packets expected on the downlink.

lastmileDelay

number

The last-mile uplink latency, in ms.

AliRtcEngineAuthInfo

Contains the engine authentication information.

Parameter

Type

Description

channelId

string

The channel ID.

userId

string

The user ID.

appId

string

The application ID.

nonce

string

The nonce.

token

string

The token.

role

string

The role of the user. Valid values are pub (publisher) and sub (subscriber).

timestamp

number

The timestamp.

AliRtcDataChannelMsg

A message from the data channel.

Parameter

Type

Description

type

AliRtcDataMsgType

The message type.

networkTime

number

The NTP time the message was sent. Used only when type is AliRtcDataMsgType.AliRtcDataChannelProgress.

progress

number

The current progress (ms). Used only when type is AliRtcDataMsgType.AliRtcDataChannelProgress.

data

ArrayBuffer

The custom message data.

AliRtcLiveTranscodingSingleParam

Parameters for a single stream in a live transcoding task.

Parameter

Type

Description

userId

string

The user ID.

streamType

AliRtcLiveTranscodingStreamType

The stream type.

sourceType

AliRtcLiveTranscodingSourceType

The input source type for live transcoding.

AliRtcLiveTranscodingEncodeParam

Defines the encoding parameters for live stream transcoding.

Parameter

Type

Description

videoWidth

number

The video width in pixels. Range: (0, 1920].

videoHeight

number

The video height in pixels. Range: (0, 1920].

videoFramerate

number

The video frame rate in frames per second (fps). Range: [1, 60].

videoBitrate

number

The video bitrate in kilobits per second (kbps). Range: [1, 10000].

videoGop

number

The keyframe interval (GOP) in frames. Range: [1, 60].

videoCodec

AliRtcLiveTranscodingVideoCodec

The video codec.

audioSamplerate

AliRtcLiveTranscodingAudioSampleRate

The audio sample rate in hertz (Hz).

audioBitrate

number

The audio bitrate in kbps. Range: [8, 500].

audioChannels

number

The number of audio channels. Valid values are 1 (mono) and 2 (stereo).

AliRtcLiveTranscodingClockWidget

Specifies the properties of a clock widget overlay for a live transcoding stream.

Parameter

Type

Description

x

number

The x-coordinate of the widget, in pixels.

y

number

The y-coordinate of the widget, in pixels.

fontType

AliRtcLiveTranscodingFontType

The font type.

fontSize

number

The font size.

fontColor

number

The font color.

zOrder

number

The stacking order (z-order). A higher value places the widget on top of one with a lower value. The value 0 represents the bottom layer.

AliRtcLiveTranscodingImage

Describes the properties of an image overlay in a live transcoding stream.

Parameter

Type

Description

url

string

The image URL.

alpha

number

The opacity of the image, where 0.0 is fully transparent and 1.0 is fully opaque.

display

AliRtcLiveTranscodingImageDisplayType

The display mode of the image.

x

number

The x-coordinate of the image, in pixels.

y

number

The y-coordinate of the image, in pixels.

width

number

The width of the image, in pixels.

height

number

The height of the image, in pixels.

zOrder

number

The z-order of the image, where 0 is the bottom layer. A higher value places the image on top of other overlays with lower values.

AliRtcLiveTranscodingText

Defines the properties of a text overlay in a live stream transcoding task.

Parameter

Type

Description

text

string

The text to display.

x

number

The x-coordinate of the text, in pixels.

y

number

The y-coordinate of the text, in pixels.

zOrder

number

The Z-order of the text. A value of 0 represents the bottom layer. A higher value places the text above other elements.

fontType

AliRtcLiveTranscodingFontType

The font type.

fontSize

number

The font size.

fontColor

number

The font color.

AliRtcLiveTranscodingUser

Specifies the properties of a user's pane in a live transcoding layout.

Parameter

Type

Description

userId

string

The user ID.

x

number

The X coordinate of the pane, in pixels.

y

number

The Y coordinate of the pane, in pixels.

width

number

The width of the pane, in pixels.

height

number

The height of the pane, in pixels.

zOrder

number

The stacking order of the user's pane. Higher values are displayed on top of lower values. The value 0 represents the bottom layer.

streamType

AliRtcLiveTranscodingStreamType

The live transcoding stream type.

sourceType

AliRtcLiveTranscodingSourceType

The live transcoding video source type.

segmentType

AliRtcLiveTranscodingSegmentType

The live transcoding input type.

images

Array

The image list.

texts

Array

The text list.

AliRtcLiveTranscodingMixParam

Parameters for a live transcoding and stream mixing task.

Parameter

Type

Description

taskProfile

AliRtcLiveTranscodingTaskProfile

The task profile.

encodeParam

AliRtcLiveTranscodingEncodeParam

The custom encoding parameters.

users

Array

The user list.

backgroundColor

number

The background color.

backgrounds

Array

The background images.

watermarks

Array

The watermarks.

clockWidgets

Array

The clock widgets.

cropMode

AliRtcLiveTranscodingCropMode

The crop mode.

mediaProcessMode

AliRtcLiveTranscodingMediaProcessMode

The media processing mode.

AliRtcLiveTranscodingParam

Specifies the parameters for a live transcoding task.

Parameter

Type

Description

mixMode

AliRtcLiveTranscodingMixMode

The stream mixing mode.

singleParam

AliRtcLiveTranscodingSingleParam

Parameters for the single-stream mode.

mixParam

AliRtcLiveTranscodingMixParam

Parameters for the stream mixing mode.

AliRtcSDKChannelParam

The parameters for joining a channel.

Parameter

Type

Description

channelId

string

Optional. The unique identifier for the channel. This value must match the channelId used to generate the authentication token. If not specified, the SDK defaults to the channelId in the token.

userId

string

Optional. The unique identifier for the user. This value must match the userId used to generate the authentication token. If not specified, the SDK defaults to the userId in the token.

userName

string

Optional. An arbitrary string used for display purposes, which is distinct from the userId. If not provided, the userName is not set.

capabilityProfile

AliRtcCapabilityProfile

The user capability profile. This parameter is required for the AI real-time interaction scenario and the call scenario. For all other scenarios, it defaults to AliRtcCapabilityProfileDefault.

AliRtcSDKAIAgentParam

Parameters for joining an AI room.

Parameter

Type

Description

agentId

string

The AI agent ID.

region

string

The AI agent region.

action

string

Specifies the action to start the AI agent.

params

string

Parameters required to start the AI agent.

AliRtcRecordAudioConfig

Configures audio recording.

Parameter

Type

Description

sampleRate

number

Specifies the audio sample rate in Hz. The default value is 16000. Supported values include 8000, 16000, 32000, 44100, and 48000.

quality

AliRtcRecordAudioQuality

Specifies the audio recording quality. The default value is AliRtcRecordAudioQualityHigh.

enableRecordExternalRenderPCM

boolean

Specifies whether to record the render data from an external PCM input. The default value is false.

enableRecordExternalCapturePCM

boolean

Specifies whether to record the capture data from an external PCM input. The default value is true.

AliRtcRecordVideoConfig

Specifies the video recording configuration.

Parameter

Type

Description

quality

AliRtcRecordVideoQuality

The video quality. The default value is AliRtcRecordVideoQualityDefault.

AliRtcNetworkProbeResult

The network quality probe result.

Parameter

Type

Description

rtt

number

The round-trip time (RTT), in milliseconds (ms).

uplinkLoss

number

The uplink packet loss rate, as a percentage (0-100).

uplinkJitter

number

The uplink jitter, in milliseconds (ms).

uplinkBandWidth

number

The available uplink bandwidth, in kilobits per second (kbps).

downlinkLoss

number

The downlink packet loss rate, as a percentage (0-100).

downlinkJitter

number

The downlink jitter, in milliseconds (ms).

downlinkBandWidth

number

The available downlink bandwidth, in kilobits per second (kbps).

AliRtcNetworkProbeConfig

Defines the configuration for a network probe.

Parameter

Type

Description

probeUplink

boolean

Whether to probe the uplink. Default value: false.

probeDownlink

boolean

Whether to probe the downlink. Default value: false. Currently not supported.

upLinkBandWidth

number

The peak bandwidth for the uplink probe, in kbps. Default value: 10000.

downLinkBandWidth

number

The peak bandwidth for the downlink probe, in kbps. Default value: 1000. Currently not supported.

Enumeration

AliRtcCameraDirection

Specifies the camera direction.

Value

Description

AliRtcCameraDirectionBack

Back camera

AliRtcCameraDirectionFront

Front camera

AliRtcCameraCaptureProfile

Specifies the camera capture resolution.

Value

Description

AliRtcCameraCaptureProfileDefault

Default capture resolution.

AliRtcCameraCaptureProfile1080P

Sets the camera capture resolution to 1080p.

AliRtcCaptureOutputPreference

Defines the camera capture preference.

Value

Description

AliRtcCaptureOutputPreferenceAuto

Automatically adjusts the capture parameters.

AliRtcCaptureOutputPreferencePerformance

Prioritizes device performance. The SDK selects the camera output parameters closest to those you specify in setVideoProfile.

AliRtcCaptureOutputPreferencePreview

Prioritizes video preview quality. The SDK selects higher camera output parameters for a better preview.

AliRtcCapturePipelineScaleMode

Specifies when video scaling occurs in the capture pipeline.

Value

Description

AliRtcCapturePipelineScaleModePre

Scales the video immediately after capture. (Default)

AliRtcCapturePipelineScaleModePost

Scales the video during encoding.

AliRtcVideoTrack

An enumeration of video track types.

Value

Description

AliRtcVideoTrackNo

No video stream

AliRtcVideoTrackCamera

Camera stream

AliRtcVideoTrackScreen

Screen sharing stream

AliRtcVideoTrackBoth

Both camera and screen sharing streams

AliRtcVideoStreamType

The camera video stream type.

Value

Description

AliRtcVideoStreamTypeNone

No video stream

AliRtcVideoStreamTypeHigh

High stream

AliRtcVideoStreamTypeLow

Low stream

AliRtcVideoEncodeCodecType

Specifies the video encoding format.

Value

Description

AliRtcVideoEncodeCodecDefault

Default

AliRtcVideoEncodeCodecH264

H.264

AliRtcVideoEncodeCodecHevc

HEVC

AliRtcVideoCodecType

Specifies the video codec type.

Value

Description

AliRtcVideoCodecDefault

The SDK automatically selects the optimal encoding method.

AliRtcVideoCodecSoftware

Software encoding.

AliRtcVideoCodecHardware

Hardware encoding.

AliRtcVideoCodecHardwareTexture

Hardware encoding with texture input.

AliRtcFrameRate

Defines the video frame rate in frames per second (fps).

Value

Description

AliRtcFrameRateFps5

5 fps

AliRtcFrameRateFps10

10 fps

AliRtcFrameRateFps15

15 fps

AliRtcFrameRateFps20

20 fps

AliRtcFrameRateFps25

25 fps

AliRtcFrameRateFps30

30 fps

AliRtcFrameRateFps60

60 fps

AliRtcVideoEncoderOrientationMode

Specifies the video encoder orientation mode.

Value

Description

AliRtcVideoEncoderOrientationModeAdaptive

Adaptive. The output video orientation adapts to the capture orientation.

AliRtcVideoEncoderOrientationModeFixedLandscape

Fixed landscape mode. The output video is always in landscape mode, regardless of the capture orientation.

AliRtcVideoEncoderOrientationModeFixedPortrait

Fixed portrait mode. The output video is always in portrait mode, regardless of the capture orientation.

AliRtcVideoMirrorMode

The video mirror mode.

Value

Description

AliRtcVideoMirrorModeDisabled

Disables mirroring.

AliRtcVideoMirrorModeEnable

Enables mirroring.

AliRtcVideoFormat

Defines the video format.

Value

Description

AliRtcVideoFormatUnknow

Unknown format.

AliRtcVideoFormatBGRA

BGRA format.

AliRtcVideoFormatI420

I420 format.

AliRtcVideoFormatNV21

NV21 format.

AliRtcVideoFormatNV12

NV12 format.

AliRtcVideoFormatRGBA

RGBA format.

AliRtcVideoFormatI422

I422 format.

AliRtcVideoFormatARGB

ARGB format.

AliRtcVideoFormatABGR

ABGR format.

AliRtcVideoFormatRGB24

RGB24 format.

AliRtcVideoFormatBGR24

BGR24 format.

AliRtcVideoFormatRGB565

RGB565 format.

AliRtcVideoFormatTextureOES

TextureOES format.

AliRtcVideoFormatTexture2D

Texture2D format.

AliRtcVideoFormatH264

H.264 format.

AliRtcVideoFormatFile

File format.

AliRtcBufferType

Specifies the video data format.

Value

Description

AliRtcBufferTypeRawData

Raw data format.

AliRtcBufferTypeTexture

Texture format.

AliRtcRotationMode

Sets the video rotation angle.

Value

Description

AliRtcRotationMode_0

No rotation.

AliRtcRotationMode_90

Rotation of 90 degrees.

AliRtcRotationMode_180

Rotation of 180 degrees.

AliRtcRotationMode_270

Rotation of 270 degrees.

AliRtcVideoState

Represents the state of a video stream.

Value

Description

AliRtcVideoStateClose

The video stream is closed.

AliRtcVideoStateOpen

The video stream is open.

AliRtcVideoStateInterrupt

The video stream is interrupted.

AliRtcVideoReason

Indicates the reason for the change in the video stream state.

Value

Description

AliRtcVideoReasonChangeByClient

The state was changed by the client.

AliRtcVideoReasonChangeByServer

The state was changed by the server.

AliRtcVideoEncodedFrameType

Specifies the frame type requested by Quality of Service (QoS) feedback for an external encoder.

Value

Description

AliRtcVideoEncodedFrameNULL

Default. No frame type specified.

AliRtcVideoEncodedFrameIDR

IDR frame. A frame that can be decoded without referencing other frames.

AliRtcVideoEncodedFrameLTR

LTR frame. A long-term reference frame for error resilience.

AliRtcVideoEncodedFrameB

B-frame. A bi-directionally predicted frame that references both previous and future frames to improve compression.

AliRtcVideoCodecManufacturer

Specifies the codec manufacturer.

Value

Description

AliRtcVideoCodecManufacturerOpenH264

OpenH264

AliRtcVideoCodecManufacturerX264

X264

AliRtcVideoCodecManufacturerX265

X265

AliRtcVideoCodecManufacturerS265

S265

AliRtcVideoCodecManufacturerFFMPEG

FFmpeg

AliRtcVideoCodecManufacturerQsvIntel

QsvIntel

AliRtcVideoCodecManufacturerNvidia

NVIDIA

AliRtcVideoCodecManufacturerAMD

AMD

AliRtcVideoCodecManufacturerMicrosoft

Microsoft

AliRtcVideoCodecManufacturerVideoToolbox

VideoToolbox

AliRtcVideoCodecManufacturerMediaCodec

MediaCodec

AliRtcVideoCodecManufacturerAVCodec

AVCodec

AliRtcVideoCodecManufacturerUnknown

Unknown

AliRtcVideoCodecKindType

Specifies the video codec type.

Value

Description

AliRtcVideoCodecKindEncoder

The encoder.

AliRtcVideoCodecKindDecoder

The decoder.

AliRtcRenderMode

Defines the video render modes.

Value

Description

AliRtcRenderModeAuto

Auto. The SDK automatically selects the optimal render mode.

AliRtcRenderModeStretch

Stretch. Stretches the video to fill the view without preserving its aspect ratio, which may cause distortion.

AliRtcRenderModeFill

Fill. Scales the video uniformly to fit the view while preserving its aspect ratio. Black bars may be added to fill empty space.

AliRtcRenderModeCrop

Crop. Scales the video uniformly to fill the view while preserving its aspect ratio, and crops any part of the video that exceeds the view's boundaries.

AliRtcRenderMirrorMode

Specifies the mirror mode for the video preview.

Value

Description

AliRtcRenderMirrorModeOnlyFrontMirror

Mirrors the local preview for the front camera, but not for the rear camera.

AliRtcRenderMirrorModeAllMirror

Mirrors the local preview for both the front and rear cameras.

AliRtcRenderMirrorModeAllNoMirror

Does not mirror the local preview for the front or rear camera.

AliRtcVideoPipelineMirrorMode

Defines the video pipeline mirror mode.

Value

Description

AliRtcVideoPipelineMirrorModeNoMirror

Disables mirroring for both preview and encoding.

AliRtcVideoPipelineMirrorModeBothMirror

Enables mirroring for both preview and encoding.

AliRtcVideoPipelineMirrorModeOnlyPreviewMirror

Enables mirroring for preview only.

AliRtcVideoPipelineMirrorModeOnlyPublishMirror

Enables mirroring for publishing only.

AliRtcAudioTrack

The audio track type.

Value

Description

AliRtcAudioTrackNo

No audio track

AliRtcAudioTrackMic

Microphone audio track

AliRtcAudioTrackDual

Secondary audio track

AliRtcAudioTrackBoth

Microphone and secondary audio tracks

AliRtcAudioProfile

Specifies the audio profile.

Value

Description

AliRtcLowQualityMode

Low-quality audio mode. Defaults to an 8 kHz sampling rate, mono, and a maximum encoding bitrate of 12 kbps.

AliRtcBasicQualityMode

Standard quality audio mode (default). Defaults to a 16 kHz sampling rate, mono, and a maximum encoding bitrate of 24 kbps.

AliRtcHighQualityMode

High-quality audio mode. Defaults to a 48 kHz sampling rate, mono, and a maximum encoding bitrate of 48 kbps.

AliRtcStereoHighQualityMode

Stereo high-quality audio mode. Defaults to a 48 kHz sampling rate, stereo, and a maximum encoding bitrate of 64 kbps.

AliRtcSuperHighQualityMode

Super-high-quality audio mode. Defaults to a 48 kHz sampling rate, mono, and a maximum encoding bitrate of 96 kbps.

AliRtcStereoSuperHighQualityMode

Stereo super-high-quality audio mode. Defaults to a 48 kHz sampling rate, stereo, and a maximum encoding bitrate of 128 kbps.

AliRtcAudioScenario

Specifies the audio scenario modes.

Value

Description

AliRtcSceneDefaultMode

(Default) The default scenario for general-purpose audio and video calls.

AliRtcSceneMusicMode

The music scenario. This mode provides high-fidelity audio and is recommended for use cases that require high music quality, such as instrument lessons.

AliRtcAudioSampleRate

Defines the audio sample rate.

Value

Description

AliRtcAudioSampleRate_8000

8000 Hz

AliRtcAudioSampleRate_11025

11025 Hz

AliRtcAudioSampleRate_16000

16000 Hz

AliRtcAudioSampleRate_22050

22050 Hz

AliRtcAudioSampleRate_32000

32000 Hz

AliRtcAudioSampleRate_44100

44100 Hz

AliRtcAudioSampleRate_48000

48000 Hz

AliRtcAudioSampleRate_Unknown

Unknown sample rate

AliRtcAudioNumChannel

Specifies the audio channel configuration.

Value

Description

AliRtcMonoAudio

Single-channel audio.

AliRtcStereoAudio

Dual-channel audio.

AliRtcAudioSource

Specifies the audio data type.

Value

Description

AliRtcAudioSourceCaptured

Captured audio data.

AliRtcAudioSourceProcessCaptured

Audio data after 3A processing.

AliRtcAudioSourcePub

Audio data for stream publishing.

AliRtcAudioSourcePlayback

Audio data for playback.

AliRtcAudioSourceMixedAll

Mixed audio data from both stream publishing and playback.

AliRtcAudioSourceRemoteUser

Audio data received from a remote user.

AliRtcAudioRouteType

Specifies the audio route type.

Value

Description

AliRtcAudioRouteTypeDefault

The default audio route selected by the system.

AliRtcAudioRouteTypeHeadset

A headset, which typically includes a microphone.

AliRtcAudioRouteTypeEarpiece

The device's built-in earpiece.

AliRtcAudioRouteTypeHeadsetNoMic

A headset without a microphone.

AliRtcAudioRouteTypeSpeakerphone

The device's built-in speakerphone.

AliRtcAudioRouteTypeLoudSpeaker

A connected external loudspeaker.

AliRtcAudioRouteTypeBlueTooth

A connected Bluetooth headset.

AliRtcAudioFocusType

Specifies the types of audio focus.

Value

Description

AliRtcAudioFocusTypeNone

No audio focus has been gained, lost, or requested.

AliRtcAudioFocusTypeGain

Indicates a gain of or request for audio focus for an unknown duration.

AliRtcAudioFocusTypeGainTransient

Indicates a temporary gain of or request for audio focus for a short duration.

AliRtcAudioFocusTypeGainTransientMayDuck

Indicates a temporary request for audio focus for a short duration, allowing other audio applications to continue playing at a reduced volume (ducking).

AliRtcAudioFocusTypeGainTransientExclusive

Indicates a temporary, exclusive request for audio focus for a short duration, preventing other applications or system components from playing audio.

AliRtcAudioFocusTypeLoss

Indicates a loss of audio focus for an unknown duration.

AliRtcAudioFocusTypeLossTransient

Indicates a temporary loss of audio focus.

AliRtcAudioFocusTypeLossCanDuck

Indicates a temporary loss of audio focus that allows the previous owner to continue playing at a reduced volume (ducking), as the new owner does not require other audio to be silenced.

AliRtcAudioAccompanyStateCode

The audio accompaniment playback state.

Value

Description

AliRtcAudioAccompanyStarted

Started.

AliRtcAudioAccompanyStopped

Stopped.

AliRtcAudioAccompanyPaused

Paused.

AliRtcAudioAccompanyResumed

Resumed.

AliRtcAudioAccompanyEnded

Ended.

AliRtcAudioAccompanyBuffering

Buffering.

AliRtcAudioAccompanyBufferingEnd

Buffering finished.

AliRtcAudioAccompanyFailed

Failed.

AliRtcAudioAccompanyErrorCode

Error codes for audio accompaniment playback.

Value

Description

AliRtcAudioAccompanyNoError

No error occurred.

AliRtcAudioAccompanyOpenFailed

Failed to open the file.

AliRtcAudioAccompanyDecodeFailed

Failed to decode the file.

AliRtcAudioEffectVoiceChangerMode

Defines the preset voice changer effects.

Value

Description

AliRtcAudioEffectVoiceChangerOff

Disables the voice changer effect and uses the original voice.

AliRtcAudioEffectVoiceChangerOldMan

Old Man

AliRtcAudioEffectVoiceChangerBabyBoy

Baby Boy

AliRtcAudioEffectVoiceChangerBabGirl

Baby Girl

AliRtcAudioEffectVoiceChangerRobot

Robot

AliRtcAudioEffectVoiceChangerDaimo

Demon

AliRtcAudioEffectVoiceChangerKTV

KTV

AliRtcAudioEffectVoiceChangerEcho

Echo

AliRtcAudioEffectVoiceChangerDialect

Dialect

AliRtcAudioEffectVoiceChangerHow

Howl

AliRtcAudioEffectVoiceChangerElectroinc

Electronic

AliRtcAudioEffectVoiceChangerPhonograph

Phonograph

AliRtcAudioEffectReverbMode

Defines the preset audio effect reverb modes.

Value

Description

AliRtcAudioEffectReverbOff

Disables the reverb effect.

AliRtcAudioEffectReverbVocal_I

A reverb style tailored for vocals.

AliRtcAudioEffectReverbVocal_II

An alternative reverb style tailored for vocals.

AliRtcAudioEffectReverbBathroom

Simulates the acoustics of a bathroom.

AliRtcAudioEffectReverbSmallRoomBright

Simulates the acoustics of a small, bright room.

AliRtcAudioEffectReverbSmallRoomDark

Simulates the acoustics of a small, dark room.

AliRtcAudioEffectReverbMediumRoom

Simulates the acoustics of a medium-sized room.

AliRtcAudioEffectReverbLargeRoom

Simulates the acoustics of a large room.

AliRtcAudioEffectReverbChurchHall

Simulates the acoustics of a church hall.

AliRtcAudioEffectBeautifyMode

Preset voice beautification modes.

Value

Description

AliRtcAudioEffectBeautifyOff

Off. Disables the voice beautifier.

AliRtcAudioEffectBeautifyVigorous

Deep. Adds depth and richness to the voice.

AliRtcAudioEffectBeautifyRinging

Sonorous. Adds brightness and resonance to the voice.

AliRtcAudioEffectReverbParamType

Specifies the parameters for the reverb audio effect.

Value

Description

AliRtcAudioEffectReverbParamRoomSize

The room size. Value range: [0, 100].

AliRtcAudioEffectReverbParamPreDelay

The pre-delay, in milliseconds (ms). Value range: [0, 200].

AliRtcAudioEffectReverbParamReverberance

The reverberance. Value range: [0, 100].

AliRtcAudioEffectReverbParamHfDamping

The high-frequency (HF) damping. Value range: [0, 100].

AliRtcAudioEffectReverbParamToneLow

The low tone. Value range: [0, 100].

AliRtcAudioEffectReverbParamToneHigh

The high tone. Value range: [0, 100].

AliRtcAudioEffectReverbParamDryGain

The gain applied to the original, unprocessed signal (dry signal). Value range: [-20, 10].

AliRtcAudioEffectReverbParamWetGain

The gain applied to the reverberated signal (wet signal). Value range: [-20, 10].

AliRtcAudioEffectEqualizationBandFrequency

The center frequencies of the audio equalization bands.

Value

Description

AliRtcAudioEffectEqualizationBand_31

31 Hz

AliRtcAudioEffectEqualizationBand_62

62 Hz

AliRtcAudioEffectEqualizationBand_125

125 Hz

AliRtcAudioEffectEqualizationBand_250

250 Hz

AliRtcAudioEffectEqualizationBand_500

500 Hz

AliRtcAudioEffectEqualizationBand_1K

1 kHz

AliRtcAudioEffectEqualizationBand_2K

2 kHz

AliRtcAudioEffectEqualizationBand_4K

4 kHz

AliRtcAudioEffectEqualizationBand_8K

8 kHz

AliRtcAudioEffectEqualizationBand_16K

16 kHz

AliRtcMuteLocalAudioMode

Defines the local audio mute mode.

Value

Description

AliRtcMuteLocalAudioModeDefault

Default mode. Mutes all audio sources, including the microphone and external audio input.

AliRtcMuteLocalAudioModeMuteAll

Mutes all audio sources, including the microphone and external audio input.

AliRtcMuteLocalAudioModeMuteOnlyMic

Mutes only the microphone.

AliRtcChannelProfile

Defines the channel profile.

Value

Description

AliRtcCommunication

Communication mode. In this mode, all users in the channel can publish and subscribe to streams. This profile is for one-to-one or group calls.

AliRtcInteractiveLive

Interactive live mode. In this mode, users are either hosts or audience members. A host can publish and subscribe to streams, while an audience member can only subscribe. This profile is optimized for interactive live streaming.

AliRtcClientRole

Defines the user roles in an interactive live streaming channel.

Value

Description

AliRtcClientRoleInteractive

The broadcaster role. A user in this role can publish and subscribe to streams.

AliRtcClientRoleLive

The audience role. A user in this role can only subscribe to streams.

AliRtcCapabilityProfile

Specifies roles for different scenarios.

Value

Description

AliRtcCapabilityProfileDefault

The default profile.

AliRtcCapabilityProfileHuman

The configuration for the human user in an AI agent call.

AliRtcCapabilityProfileRobot

The configuration for the robot in an AI agent call.

AliRtcUserOfflineReason

Indicates why a user went offline.

Value

Description

AliRtcUserOfflineQuit

The user quit the channel.

AliRtcUserOfflineDropped

The user was dropped due to a connection timeout caused by a lack of incoming data packets.

AliRtcUserOfflineBecomeAudience

The user role changed from broadcaster to audience.

AliRtcOnByeType

Defines the reasons a user is forced to leave a channel.

Value

Description

AliRtcOnByeBeKickOut

The user is kicked from the channel.

AliRtcOnByeChannelTerminated

The channel is terminated. The user is required to leave the meeting.

AliRtcOnByeUserReplaced

The user is disconnected because another device joined the channel using the same user ID.

AliRtcConnectionStatus

Network connection states.

Value

Description

AliRtcConnectionInit

Initialized.

AliRtcConnectionDisconnected

Disconnected.

AliRtcConnectionConnecting

Connecting.

AliRtcConnectionConnected

Connected.

AliRtcConnectionReconnecting

Reconnecting.

AliRtcConnectionFailed

Failed.

AliRtcConnectionStatusChangeReason

Reasons for a connection status change.

Value

Description

AliRtcConnectionChangedDummyReason

Unknown reason.

AliRtcConnectionMediaPathChanged

Media path change.

AliRtcConnectionSignalingHeartbeatTimeout

Heartbeat timeout.

AliRtcConnectionSignalingHeartbeatAlive

Heartbeat restored.

AliRtcConnectionSignalingHttpdnsResolved

DNS resolution successful.

AliRtcConnectionSignalingHttpdnsFailure

DNS resolution failed.

AliRtcConnectionSignalingGslbFailure

GSLB request failed.

AliRtcConnectionSignalingGslbSucccess

GSLB request successful.

AliRtcConnectionSignalingJoinChannelFailure

Failed to join channel.

AliRtcConnectionSignalingJoinChannelSuccess

Successfully joined channel.

AliRtcConnectionSignalingLeaveChannel

Left channel.

AliRtcConnectionSignalingConnecting

Establishing signaling connection.

AliRtcConnectionChangedNetworkInterrupted

Network connection interrupted.

AliRtcNetworkQuality

Describes the network quality levels.

Value

Description

AliRtcNetworkQualityExcellent

Excellent network quality. Audio and video are smooth and clear.

AliRtcNetworkQualityGood

The user experience is comparable to AliRtcNetworkQualityExcellent.

AliRtcNetworkQualityPoor

Users may experience minor audio and video degradation, but communication is largely unaffected.

AliRtcNetworkQualityBad

Video may freeze significantly, but audio remains usable.

AliRtcNetworkQualityVeryBad

Audio and video are severely impaired, making communication nearly impossible.

AliRtcNetworkQualityDisconnect

The network connection is lost.

AliRtcNetworkQualityUnknown

The network quality cannot be determined.

AliRtcPublishState

The publishing state.

Value

Description

AliRtcPublishStatePublishIdle

Initial state.

AliRtcPublishStateNoPublish

Not published.

AliRtcPublishStatePublishing

Publishing.

AliRtcPublishStatePublished

Published.

AliRtcSubscribeState

Indicates the subscription state.

Value

Description

AliRtcSubscribeStateSubscribeIdle

Initial state

AliRtcSubscribeStateNoSubscribe

Not subscribed

AliRtcSubscribeStateSubscribing

Subscribing

AliRtcSubscribeStateSubscribed

Subscribed

AliRtcLocalAudioState

Describes the state of local audio capture.

Value

Description

AliRtcLocalAudioStateStarting

The local audio capture is starting.

AliRtcLocalAudioStateStarted

The local audio capture is started.

AliRtcLocalAudioStateStopping

The local audio capture is stopping.

AliRtcLocalAudioStateStopped

The local audio capture is stopped.

AliRtcLocalVideoState

The state of the local video capture.

Value

Description

AliRtcLocalVideoStateStopped

The local video capture is stopped.

AliRtcLocalVideoStateStarted

The local video capture is running.

AliRtcLocalDeviceType

Specifies the local device type.

Value

Description

AliRtcLocalDeviceUnknown

Unknown device type.

AliRtcLocalDeviceMic

A microphone.

AliRtcLocalDeviceSpeaker

A speaker.

AliRtcLocalDeviceAudioDevice

An audio device.

AliRtcLocalDeviceCamera

A camera.

AliRtcLocalDeviceDisplay

A display.

AliRtcLocalDeviceVideoDevice

A video device.

AliRtcLocalDeviceExceptionType

Defines the local device exception types.

Value

Description

AliRtcLocalDeviceExceptionUnknown

An unknown exception.

AliRtcLocalDeviceExceptionMicOpenFail

The microphone failed to open.

AliRtcLocalDeviceExceptionMicInterrupt

The microphone was interrupted.

AliRtcLocalDeviceExceptionMicAuthFail

The application does not have permission to access the microphone.

AliRtcLocalDeviceExceptionMicNotAvailable

No microphone is available.

AliRtcLocalDeviceExceptionSpeakerOpenFail

The speaker failed to open.

AliRtcLocalDeviceExceptionSpeakerInterrupt

The speaker was interrupted.

AliRtcLocalDeviceExceptionSpeakerNotAvailable

No speaker is available.

AliRtcLocalDeviceExceptionAudioDeviceException

An audio device exception.

AliRtcLocalDeviceExceptionCameraOpenFail

The camera failed to open.

AliRtcLocalDeviceExceptionCameraInterrupt

The camera was interrupted.

AliRtcLocalDeviceExceptionCameraAuthFail

The application does not have permission to access the camera.

AliRtcLocalDeviceExceptionDisplayException

A display device exception.

AliRtcLocalDeviceExceptionVideoDeviceException

A video device exception.

AliRtcLiveTranscodingState

The state of the live transcoding task.

Value

Description

AliRtcLiveTranscodingState_IDLE

The live transcoding task is idle.

AliRtcLiveTranscodingState_CONNNECT

Connecting to the streaming server.

AliRtcLiveTranscodingState_RUNNING

The live transcoding task is running.

AliRtcLiveTranscodingState_RECOVERING

The live transcoding task is recovering.

AliRtcLiveTranscodingState_FAILURE

The live transcoding task failed.

AliRtcLiveTranscodingState_END

The live transcoding task ended.

AliRtcLiveTranscodingStreamType

Specifies the stream type for CDN live streaming.

Value

Description

AliRtcLiveTranscodingStreamOrigin

Pushes the original stream.

AliRtcLiveTranscodingStreamAudio

Pushes only the audio stream.

AliRtcLiveTranscodingStreamVideo

Pushes only the video stream.

AliRtcLiveTranscodingMixMode

Specifies the available bypass live streaming modes.

Value

Description

AliRtcLiveTranscodingMixModeSINGLE

Forwards the original single stream without stream mixing and transcoding. This mode does not require stream mixing and transcoding parameters.

AliRtcLiveTranscodingMixModeMIX

Mixes and transcodes multiple streams into a single stream. This is the default mode.

AliRtcLiveTranscodingSourceType

The video source type for live transcoding.

Value

Description

AliRtcLiveTranscodingSourceCamera

The camera stream.

AliRtcLiveTranscodingSourceShareScreen

The screen sharing stream.

AliRtcLiveTranscodingTaskProfile

Specifies the billing plan for CDN live streaming.

Value

Description

AliRtcLiveTranscodingTaskProfile_1IN_1080P

One input stream, 1080p output

AliRtcLiveTranscodingTaskProfile_1IN_720P

One input stream, 720p output

AliRtcLiveTranscodingTaskProfile_1IN_360P

One input stream, 360p output

AliRtcLiveTranscodingTaskProfile_2IN_1080P

Two input streams, 1080p output

AliRtcLiveTranscodingTaskProfile_2IN_720P

Two input streams, 720p output

AliRtcLiveTranscodingTaskProfile_2IN_360P

Two input streams, 360p output

AliRtcLiveTranscodingTaskProfile_4IN_1080P

Four input streams, 1080p output

AliRtcLiveTranscodingTaskProfile_4IN_720P

Four input streams, 720p output

AliRtcLiveTranscodingTaskProfile_4IN_360P

Four input streams, 360p output

AliRtcLiveTranscodingTaskProfile_9IN_1080P

Nine input streams, 1080p output

AliRtcLiveTranscodingTaskProfile_9IN_720P

Nine input streams, 720p output

AliRtcLiveTranscodingTaskProfile_9IN_360P

Nine input streams, 360p output

AliRtcLiveTranscodingTaskProfile_12IN_1080P

12 input streams, 1080p output

AliRtcLiveTranscodingTaskProfile_12IN_720P

12 input streams, 720p output

AliRtcLiveTranscodingTaskProfile_12IN_360P

12 input streams, 360p output

AliRtcLiveTranscodingTaskProfile_16IN_1080P

16 input streams, 1080p output

AliRtcLiveTranscodingTaskProfile_16IN_720P

16 input streams, 720p output

AliRtcLiveTranscodingTaskProfile_16IN_360P

16 input streams, 360p output

AliRtcLiveTranscodingTaskProfile_Mixed

Audio-only

AliRtcLiveTranscodingAudioSampleRate

Specifies the audio sample rate for live transcoding.

Value

Description

AliRtcLiveTranscodingAudioSampleRate_48000

48,000 Hz

AliRtcLiveTranscodingAudioSampleRate_44100

44,100 Hz

AliRtcLiveTranscodingAudioSampleRate_32000

32,000 Hz

AliRtcLiveTranscodingAudioSampleRate_16000

16,000 Hz

AliRtcLiveTranscodingAudioSampleRate_8000

8,000 Hz

AliRtcLiveTranscodingVideoCodec

The video codec for live transcoding.

Value

Description

AliRtcLiveTranscodingVideoCodec_H264

H264

AliRtcLiveTranscodingVideoCodec_H265

H265

AliRtcLiveTranscodingCropMode

Specifies the crop modes for live transcoding.

Value

Description

AliRtcLiveTranscodingCropModeCrop

The video is scaled uniformly to fill the view while preserving the aspect ratio. Video that extends beyond the view is cropped.

AliRtcLiveTranscodingCropModeFill

The video is scaled uniformly to fit within the view while preserving the aspect ratio. Black bars may be added to fill the remaining space.

AliRtcLiveTranscodingMediaProcessMode

The media processing mode for CDN live streaming.

Value

Description

AliRtcLiveTranscodingMediaProcessNormal

Normal mode

AliRtcLiveTranscodingMediaProcessVirtualBackground

Virtual background mode

AliRtcLiveTranscodingSegmentType

Specifies the body segmentation type for live transcoding.

Value

Description

AliRtcLiveTranscodingSegmentNoBody

No body segmentation.

AliRtcLiveTranscodingSegmentBody

Body segmentation.

AliRtcLiveTranscodingErrorCode

This enumeration lists the error codes for live transcoding.

Value

Description

AliRtcLiveTranscodingErrorPublishOk

The live transcoding task started successfully.

AliRtcLiveTranscodingErrorStreamNotFound

The specified stream publishing URL could not be found.

AliRtcLiveTranscodingErrorStreamAlreadyExist

The stream publishing task already exists.

AliRtcLiveTranscodingErrorInvalidParam

The stream publishing parameters are invalid.

AliRtcLiveTranscodingErrorInternalError

An internal error occurred during stream publishing.

AliRtcLiveTranscodingErrorRtmpServerError

An error occurred on the stream publishing server.

AliRtcLiveTranscodingErrorRtmpStreamUrlError

The RTMP stream URL is invalid.

AliRtcLiveTranscodingErrorPublishTimeout

The stream publishing task timed out.

AliRtcLiveTranscodingErrorNotAuthorized

The stream publishing operation is not authorized.

AliRtcLiveTranscodingTaskStatus

Indicates the status of a server-side live stream transcoding task.

Value

Description

AliRtcLiveTranscodingTaskStatusStart

The task has started.

AliRtcLiveTranscodingTaskStatusUpdate

The task has been updated.

AliRtcLiveTranscodingTaskStatusStop

The task has stopped.

AliRtcLiveTranscodingFontType

Specifies the font types for live transcoding.

Value

Description

AliRtcLiveTranscodingFont_NOTO_SERIF_CJKSC_REGULAR

Source Han Serif (Noto Serif CJK SC Regular)

AliRtcLiveTranscodingFont_ALIBABA_PUHUITI_REGULAR

Alibaba PuHuiTi Regular

AliRtcLiveTranscodingFont_ALIBABA_PUHUITI_BOLD

Alibaba PuHuiTi Bold

AliRtcLiveTranscodingFont_ALIBABA_PUHUITI_HEAVY

Alibaba PuHuiTi Heavy

AliRtcLiveTranscodingFont_ALIBABA_PUHUITI_LIGHT

Alibaba PuHuiTi Light

AliRtcLiveTranscodingFont_ALIBABA_PUHUITI_MEDIUM

Alibaba PuHuiTi Medium

AliRtcLiveTranscodingImageDisplayType

Specifies the image display modes for live transcoding.

Value

Description

AliRtcLiveTranscodingImageDisplay_NOT_DISPLAY

The image is not displayed.

AliRtcLiveTranscodingImageDisplay_ALWAYS

The image is always displayed.

AliRtcLiveTranscodingImageDisplay_WHEN_NO_VIDEO

Displayed only when no video stream is available.

AliRtcScreenShareMode

Defines the screen sharing modes.

Value

Description

AliRtcScreenShareNoneMode

Does not share audio or video.

AliRtcScreenShareOnlyVideoMode

Shares video only.

AliRtcScreenShareOnlyAudioMode

Shares audio only.

AliRtcScreenShareAllMode

Shares both audio and video.

AliRtcRecordType

Specifies the recording type.

Value

Description

AliRtcRecordTypeAudio

Records a single audio file.

AliRtcRecordTypeVideo

Records a single file that contains both audio and video.

AliRtcRecordFormat

The record format.

Value

Description

AliRtcRecordFormatAAC

Records an AAC file.

AliRtcRecordFormatWAV

Records a WAV file.

AliRtcRecordFormatMP4

Records an MP4 file.

AliRtcRecordAudioQuality

Defines the audio recording quality.

Value

Description

AliRtcRecordAudioQualityLow

Low quality. Optimizes for a small file size.

AliRtcRecordAudioQualityMedium

Standard quality. Offers a balance between file size and audio fidelity.

AliRtcRecordAudioQualityHigh

High quality. Optimizes for audio fidelity, resulting in a larger file size.

AliRtcRecordVideoQuality

Defines the video recording quality.

Value

Description

AliRtcRecordVideoQualityDefault

Default. Uses the same quality as the video capture.

AliRtcRecordEventCode

Lists the recording callback event types.

Value

Description

AliRtcRecordTimeOverLimit

Duration limit exceeded.

AliRtcRecordSizeOverLimit

File size limit exceeded.

AliRtcRecordOutOfSize

The file was split because it exceeded 2 GB.

AliRtcRecordWriteFailed

File write failed.

AliRtcRecordStart

Recording started.

AliRtcRecordStop

Recording stopped.

AliRtcDataMsgType

Message types for the DataChannel.

Value

Description

AliRtcDataChannelNone

None

AliRtcDataChannelProgress

Music playback progress

AliRtcDataChannelCustom

Custom message

AliRtcLogLevel

Defines the log level.

Value

Description

AliRtcLogLevelInfo

Info. Outputs informational messages.

AliRtcLogLevelWarn

Warning. Outputs warning messages.

AliRtcLogLevelError

Error. Outputs error messages.

AliRtcLogLevelFatal

Fatal. Outputs messages for fatal errors.

AliRtcLogLevelNone

None. Disables logging.