This topic describes the data types that are used in the ApsaraVideo Real-time Communication Android software development kit (SDK).
Contents
Data type | Description |
User volume information. | |
Raw audio data. | |
Video sample. | |
Video source type. | |
Channel mode. | |
User role. | |
Raw data stream type. | |
External video frame data. | |
Session statistics. | |
Local video statistics. | |
Remote video statistics. | |
Local audio statistics. | |
Remote audio statistics. | |
Video data output position. | |
Video data output format. | |
Network connection status. | |
Reason for a network connection status change. | |
Video stream type. | |
Stream ingest state. | |
Subscription state. | |
Reason why a user goes offline. | |
Camera high- and low-definition stream types. | |
Audio stream type. | |
Network quality. | |
Rendering mode. | |
Mirror mode. | |
Rotation angle. | |
Log level. | |
Audio channel type. | |
Audio sample rate type. | |
Recording type. | |
Recording format. | |
Audio quality of the recorded audio file. | |
Video quality of the recorded video file. | |
Audio quality mode. | |
Audio scenario mode. | |
Local mute mode. | |
Parameter settings for recording audio files. | |
Parameter settings for recording video files. | |
Enumeration of OnBye types. | |
Voice changer mode. | |
Reverb mode. | |
Reverb parameters. | |
Audio route type. | |
Remote user texture information. | |
Rendering canvas. | |
Bypass transcoding and ingest task status. | |
Position and size of the watermark image. | |
Watermark image settings. | |
Texture information. | |
Camera capture preference properties. | |
Camera capture preference. | |
Camera direction. | |
Specifies a specific resolution for video capture. | |
Video encoding frame rate. | |
Video encoding bitrate. | |
Encoded video mirror mode. | |
Encoded video rotation mode. | |
Video resolution. | |
Sets video encoding properties. | |
Video codec type. | |
Video decoder settings. | |
Encoder type. | |
Sets screen sharing encoding properties. | |
Authentication information. | |
Bypass live streaming configuration. | |
Remote user information. | |
Reason that triggers a change in the video stream state. | |
Change in the video stream state. | |
Bypass live stream ingest task status. | |
Bypass live stream ingest error codes. | |
Bypass live streaming state. | |
Bypass live streaming media processing mode. | |
Bypass live streaming crop mode. | |
Bypass live streaming font. | |
Bypass live streaming input type. | |
Bypass live streaming audio sample rate. | |
Bypass live streaming billing specifications. | |
Bypass live streaming video stream type. | |
Bypass live stream ingest type. | |
Bypass live streaming mode. | |
Raw data callback data alignment type. | |
Bypass live streaming encoding parameters. | |
Bypass live stream mixing parameters. | |
Bypass live streaming parameters. | |
Bypass live streaming single-stream parameters. | |
Bypass live streaming clock widget. | |
Bypass live streaming user information. | |
Bypass live streaming text information. | |
Bypass live streaming image information. | |
Image display mode. | |
Screen sharing type. | |
Feature aggregation parameter, used in channel joining parameters. | |
Channel joining parameters. | |
Parameter settings for network probing. | |
Network probing result. | |
Video stream mirror mode. | |
Video scaling timing. | |
Audio subscription type. | |
Audio data callback settings. | |
Callback audio data read/write mode. | |
Custom parameters for audio data callbacks. | |
Device orientation enumeration. | |
Music accompaniment playback error codes. | |
Configuration items for accompaniment playback. | |
External audio stream configuration. | |
Data channel message. | |
Data channel message type. | |
Struct for network change feedback parameters. | |
Frame type requested by the external encoder in response to QoS feedback. | |
Music accompaniment playback state. | |
Audio file information. | |
Local device type. | |
Voice retouching mode enumeration. | |
Enumeration of reverb parameter types. |
API details
AliRtcAudioVolume
User volume.
Parameter | Type | Description |
mUserId | String | The user ID. Valid values:
|
mVolume | int | The volume in the current callback. |
mSpeechstate | int | The speaking status of the user. Valid values:
|
AliRtcVideoSample
Video sample.
Parameter | Type | Description |
dataFrameY | long | Pointer to the Y component. |
dataFrameU | long | Pointer to the U component. |
dataFrameV | long | Pointer to the V component. |
data | byte[] | Pointer to the YUV data. |
format | The format of the video frame. | |
width | int | The width of the video frame. |
height | int | The height of the video frame. |
strideY | int | The row stride of the Y buffer in the YUV data. |
strideU | int | The row stride of the U buffer in the YUV data. |
strideV | int | The row stride of the V buffer in the YUV data. |
rotate | int | The rotation angle of the video frame. You can set this parameter to 0, 90, 180, or 270. |
extraData | long | An extra field. You can ignore this parameter if you do not require customization. |
textureid | long | The OpenGL texture ID. This is used to bind the texture. |
matrix | float[] | A 4x4 transformation matrix. This is used to control the rotation, scaling, or projection of the texture. |
glContex | long | A pointer to the OpenGL context. This is used to manage the GPU rendering state. |
AliRtcVideoSourceType
Video source type.
Enumeration name | Description |
AliRTCSdkVideoSourceCameraType | Camera stream. |
AliRTCSdkVideoSourceScreenShareType | Screen sharing stream. |
AliRTCSdkChannelProfile
Channel mode.
Enumeration name | Description |
AliRTCSdkCommunication | Communication mode. |
AliRTCSdkInteractiveLive | Interactive mode. |
AliRTCSdkInteractiveWithLowLatencyLive | Low-latency interactive live streaming mode. |
AliRTCSdkClientRole
User role.
Enumeration name | Description |
AliRTCSdkInteractive | Streamer role. |
AliRTCSdkLive | Viewer role. |
AliRtcRawDataStreamType
Raw data stream type.
Enumeration name | Description |
AliRTCSdkStreameTypeCapture | Camera stream. |
AliRTCSdkStreameTypeScreen | Screen stream. |
AliRtcRawDataFrame
External video frame data.
Parameter name | Type | Description |
format | AliRtcVideoFormat | The video data type. |
width | int | The width of the frame. |
height | int | The height of the frame. |
rotation | int | The rotation angle of the video frame. You can set this parameter to 0, 90, 180, or 270. |
videoFrameLength | int | The length of the frame. |
lineSize | int[] | The storage of the video frame. For more information, see the following table. |
frame | byte[] | The YUV byte data of the video. |
cropLeft | int | The number of pixels to crop from the left. |
cropTop | int | The number of pixels to crop from the top. |
cropRight | int | The number of pixels to crop from the right. |
cropBottom | int | The number of pixels to crop from the bottom. |
timeStamp | long | The timestamp of the frame in milliseconds. |
filePath | byte[] | The path of the video file. This is used when format is set to AliRtcVideoFormatFile. |
textureId | int | The texture ID of the frame. |
transformMatrix | float[] | Additional transformation for the texture frame. |
eglContext14 | EGLContext | The thread-related context variable for OpenGL. |
Video frame format | Video frame storage |
YUV |
|
RGBA |
|
AliRtcStats
Session statistics.
Parameter | Type | Description |
availableSendKbitrate | long | The available bandwidth in Kbps. |
sentKbitrate | long | The sending bitrate. |
rcvdKbitrate | long | The receiving bitrate. |
sentBytes | long | The number of bytes sent. |
rcvdBytes | long | The number of bytes received. |
systemCpuUsage | float | The system CPU usage. |
cpuUsage | float | The CPU usage of the RTC process. |
videoRcvdKbitrate | long | The video receiving bitrate. |
videoSentKbitrate | long | The video sending bitrate. |
callDuration | long | The call duration in seconds. |
sentLossRate | long | The packet loss rate from the client to the server. |
sentLossPkts | long | The number of lost packets from the client to the server. |
sentExpectedPkts | long | The total number of packets from the client to the server. |
rcvdLossRate | long | The downstream packet loss rate from the client to the server. |
rcvdLossPkts | long | The number of downstream lost packets from the client to the server. |
rcvdExpectedPkts | long | The total number of downstream packets from the client to the server. |
lastmileDelay | long | The latency in milliseconds. |
AliRtcLocalVideoStats
Local video statistics.
Parameter | Type | Description |
userId | String | The local user ID. |
track | The stream type. | |
captureWidth | int | The capture width. |
captureHeight | int | The capture height. |
encodeWidth | int | The encoding width. |
encodeHeight | int | The encoding height. |
sentBitrate | int | The publishing bitrate. |
captureFps | int | The capture frame rate. |
sentFps | int | The publishing frame rate. |
encodeFps | int | The encoding frame rate. |
targetEncodeBitrate | int | The target encoding bitrate. |
actualEncodeBitrate | int | The actual encoding bitrate. |
AliRtcRemoteVideoStats
Remote video statistics.
Parameter | Type | Description |
userId | String | The remote user ID. |
track | The video stream type. | |
width | int | The width of the video frame. |
height | int | The height of the video frame. |
decodeFps | int | The output frame rate of the encoder. |
renderFps | int | The output frame rate of the renderer. |
frozenTimes | int | The number of stutters. |
videoTotalFrozenTime | int | The total stuttering duration of video playback in milliseconds. |
videoTotalFrozenRate | int | The total stuttering rate of video playback in percentage. |
AliRtcLocalAudioStats
Local audio statistics.
Parameter | Type | Description |
track | The audio stream type. | |
sentBitrate | int | The sending bitrate. |
sentSamplerate | int | The sending sample rate. |
numChannel | int | The number of sound channels. |
sendLoss | int | The sending packet loss rate. |
AliRtcRemoteAudioStats
Remote audio statistics.
Parameter | Type | Description |
userId | String | The user ID. |
audioTrack | The audio stream type. | |
sampleRate | int | The sample rate. |
channels | int | The number of sound channels. |
quality | int | The audio quality. |
audioLossRate | int | The audio packet loss rate. |
rcvdBitrate | int | The receiving bitrate. |
network_transport_delay | int | The network latency from the audio sender to the receiver in milliseconds. |
jitter_buffer_delay | int | The network latency from the receiver to the jitter buffer in milliseconds. |
AliRtcVideoObserPosition
Video data output position.
Enumeration name | Description |
AliRtcPositionPostCapture | Collect data. |
AliRtcPositionPreRender | Stream pulling data. |
AliRtcPositionPreEncoder | Data before encoding. |
AliRtcVideoFormat
Video data output format.
Enumeration name | Description |
AliRtcVideoFormatUNKNOW | Unknown format. |
AliRtcVideoFormatBGRA | BGRA. |
AliRtcVideoFormatI420 | I420. |
AliRtcVideoFormatNV21 | NV21. |
AliRtcVideoFormatNV12 | NV12. |
AliRtcVideoFormatRGBA | RGBA. |
AliRtcVideoFormatI422 | I422. |
AliRtcVideoFormatARGB | ARGB. |
AliRtcVideoFormatABGR | ABGR. |
AliRtcVideoFormatRGB24 | RGB24. |
AliRtcVideoFormatBGR24 | BGR24. |
AliRtcVideoFormatRGB565 | RGB565. |
AliRtcVideoFormatTextureOES | TextureOES. |
AliRtcVideoFormatTexture2D | Texture2D. |
AliRtcVideoFormatH264 | H.264 encoded video stream format. |
AliRtcVideoFormatH265 | H.265 (HEVC) encoded video stream format. |
AliRtcVideoFormatFile | Indicates that the data is from a file. |
AliRtcConnectionStatus
Network connection status.
Enumeration name | Description |
AliRtcConnectionStatusInit | Initialization is complete. |
AliRtcConnectionStatusDisconnected | The network connection is disconnected. |
AliRtcConnectionStatusConnecting | Establishing a network connection. |
AliRtcConnectionStatusConnected | The network is connected. |
AliRtcConnectionStatusReconnecting | Re-establishing a network connection. |
AliRtcConnectionStatusFailed | The network connection failed. |
AliRtcConnectionStatusChangeReason
Reason for a network connection status change.
Enumeration name | Description |
AliRtcConnectionChangedDummyReason | Unknown reason. |
AliRtcConnectionMediaPathChanged | The media channel changed. |
AliRtcConnectionSignalingHeartbeatTimeout | Heartbeat timeout. |
AliRtcConnectionSignalingHeartbeatAlive | Heartbeat recovered. |
AliRtcConnectionSignalingHttpDnsResolved | DNS resolution succeeded. |
AliRtcConnectionSignalingHttpDnsFailure | DNS resolution failed. |
AliRtcConnectionSignalingGslbFailure | GSLB request failed. |
AliRtcConnectionSignalingGslbSucccess | GSLB request succeeded. |
AliRtcConnectionSignalingJoinRoomFailure | Failed to join the channel. |
AliRtcConnectionSignalingJoinRoomSuccess | Joined the channel successfully. |
AliRtcConnectionSignalingLeaveRoom | Left the channel. |
AliRtcConnectionSignalingConnecting | Establishing a signaling connection. |
AliRtcConnectionChangedNetworkInterrupted | The network connection is interrupted. |
AliRtcVideoTrack
Video stream type.
Enumeration name | Description |
AliRtcVideoTrackNo | No video stream. |
AliRtcVideoTrackCamera | Camera stream. |
AliRtcVideoTrackScreen | Screen sharing stream. |
AliRtcVideoTrackBoth | Camera and screen sharing. |
AliRtcPublishState
Stream ingest state.
Enumeration name | Description |
AliRtcStatsPublishIdle | Initial state. |
AliRtcStatsNoPublish | Not ingesting. |
AliRtcStatsPublishing | Ingesting. |
AliRtcStatsPublished | Ingested. |
AliRtcSubscribeState
Subscription state.
Enumeration name | Description |
AliRtcStatsSubscribeIdle | Initial state. |
AliRtcStatsNoSubscribe | Not subscribed. |
AliRtcStatsSubscribing | Subscribing. |
AliRtcStatsSubscribed | Subscribed. |
AliRtcUserOfflineReason
Reason why a user goes offline.
Enumeration name | Description |
AliRtcUserOfflineQuit | The user actively left. |
AliRtcUserOfflineDropped | The user was dropped due to a timeout because no data packets were received from the user for an extended period. |
AliRtcUserOfflineBecomeAudience | Triggered when the user role switches from streamer to viewer. |
AliRtcVideoStreamType
High-definition and low-definition camera stream types.
Enumeration name | Description |
AliRtcVideoStreamTypeNone | No video stream. |
AliRtcVideoStreamTypeHigh | Large stream |
AliRtcVideoStreamTypeLow | Substream. |
AliRtcAudioTrack
Audio stream type.
Enumeration name | Description |
AliRtcAudioTrackNo | No audio stream. |
AliRtcAudioTrackMic | Microphone stream. |
AliRtcAudioTrackDual | Second audio stream. |
AliRtcAudioTrackBoth | Microphone + second audio stream. |
AliRtcNetworkQuality
Network quality.
Enumeration name | Description |
AliRtcNetworkExcellent | Excellent network. The stream is smooth and has high definition. |
AliRtcNetworkGood | Good network. The stream quality is nearly as good as the Excellent level. |
AliRtcNetworkPoor | Poor network. Audio and video quality is slightly reduced, but communication is not affected. |
AliRtcNetworkBad | Bad network. Video stutters severely, but audio communication is still possible. |
AliRtcNetworkVeryBad | Very bad network. Communication is almost impossible. |
AliRtcNetworkDisconnected | The network is disconnected. |
AliRtcNetworkUnknow | Unknown. |
AliRtcRenderMode
Rendering mode.
Enumeration name | Description |
AliRtcRenderModeAuto | Automatic. |
AliRtcRenderModeStretch | Stretches to fill the view. The video aspect ratio is not maintained. |
AliRtcRenderModeFill | Scales while maintaining the video aspect ratio. Fills with black bars. |
AliRtcRenderModeClip | Scales while maintaining the video aspect ratio and crops to fit the view. |
AliRtcRenderModeNoChange | Renders without adjusting the aspect ratio of the input video. This is suitable for scenarios where the input video and target resolution are identical, or for custom adaptation logic. |
AliRtcRenderMirrorMode
Mirror mode.
Enumeration name | Description |
AliRtcRenderMirrorModeOnlyFront | Only the front camera preview is mirrored. Other views are not mirrored. |
AliRtcRenderMirrorModeAllEnabled | All views are mirrored. |
AliRtcRenderMirrorModeAllDisable | No views are mirrored. |
AliRtcRotationMode
Rotation angle.
Enumeration name | Description |
AliRtcRotationMode_0 | No rotation. |
AliRtcRotationMode_90 | Rotate 90 degrees. |
AliRtcRotationMode_180 | Rotate 180 degrees. |
AliRtcRotationMode_270 | Rotate 270 degrees. |
AliRtcLogLevel
Log level.
Enumeration name | Description |
AliRtcLogLevelInfo | Normal. |
AliRtcLogLevelWarn | Warning. |
AliRtcLogLevelError | Error. |
AliRtcLogLevelFatal | Fatal. |
AliRtcLogLevelNone | None. |
AliRtcAudioNumChannel
Audio channel type.
Enumeration name | Description |
AliRtcMonoAudio | Mono. |
AliRtcStereoAudio | Stereo. |
AliRtcAudioSampleRate
Audio sample rate type.
Enumeration name | Description |
AliRtcAudioSampleRate_8000 | Sample rate of 8000. |
AliRtcAudioSampleRate_11025 | Sample rate of 11025. |
AliRtcAudioSampleRate_16000 | Sample rate of 16000. |
AliRtcAudioSampleRate_22050 | Sample rate of 22050. |
AliRtcAudioSampleRate_32000 | Sample rate of 32000. |
AliRtcAudioSampleRate_44100 | Sample rate of 44100. |
AliRtcAudioSampleRate_48000 | Sample rate of 48000. |
AliRtcAudioSampleRate_Unknown | Unknown sample rate. |
AliRtcAudioSampleRate_Max | Boundary value. |
AliRtcRecordType
Recording type.
Enumeration name | Description |
AliRtcRecordTypeAudio | Records an audio-only file. |
AliRtcRecordTypeVideo | Records a video file. |
AliRtcRecordFormat
Recording format.
Enumeration name | Description |
AliRtcRecordFormatAAC | AAC file. |
AliRtcRecordFormatWAV | WAV file. |
AliRtcRecordFormatMP4 | MP4 file. |
AliRtcAudioQuality
Audio quality of the recorded audio file.
Enumeration name | Description |
AliRtcAudioQualityLow | Low. |
AliRtcAudioQualityMidium | Medium. |
AliRtcAudioQualityHigh | High. |
AliRtcVideoQuality
Video quality of the recorded video file.
Enumeration name | Description |
AliRtcVideoQualityDefault | The default quality is the same as the video capture quality. Video recording is not available on mobile clients. |
AliRtcAudioProfile
Audio quality mode.
Enumeration name | Description |
AliRtcEngineLowQualityMode | Low audio quality mode. |
AliRtcEngineBasicQualityMode | Standard audio quality mode. |
AliRtcEngineHighQualityMode | High audio quality mode. |
AliRtcEngineStereoHighQualityMode | Stereo high audio quality mode. |
AliRtcEngineSuperHighQualityMode | Super-high audio quality mode. |
AliRtcEngineStereoSuperHighQualityMode | Stereo super-high audio quality mode. |
AliRtcAudioScenario
Audio scenario mode.
Enumeration name | Description |
AliRtcSceneDefaultMode | Default scenario. Recommended for general audio and video communication scenarios. |
AliRtcSceneEducationMode | Education scenario. Prioritizes audio continuity and stability. |
AliRtcSceneMediaMode | Media scenario. Preserves human voice and music quality. Recommended for interactive live streaming channels. |
AliRtcSceneMusicMode | Music scenario. High-fidelity music quality. Recommended for scenarios with high music quality requirements, such as musical instrument lessons. |
AliRtcSceneChatroomMode | Chat room scenario. Suitable for chat scenarios with frequent microphone usage. The volume bar always indicates the voice call volume. |
AliRtcMuteLocalAudioMode
Local mute mode.
Enumeration name | Description |
AliRtcMuteAudioModeDefault | Default mode. Mutes all audio, including microphone and external audio input. |
AliRtcMuteAllAudioMode | Mutes all audio, including microphone and external audio input. |
AliRtcMuteOnlyMicAudioMode | Mutes only the microphone. |
AliRtcMuteLocalAudioMax | Placeholder. |
AliRtcRecordAudioConfig
Parameters for recording audio files.
Enumeration name | Description |
AliRtcAudioSampleRate | The sample rate of the recorded audio file. |
AliRtcAudioQuality | The quality of the recorded audio file. |
AliRtcRecordVideoConfig
Parameters for recording video files.
Enumeration name | Description |
AliRtcVideoQuality | The quality of the recorded video file. |
AliRtcOnByeType
Enumeration of OnBye types.
Enumeration name | Description |
AliRtcByeTypeKickOff | Kicked out. |
AliRtcByeTypeDelChannel | The channel was deleted. |
AliRtcByeTypeRestoreSession | A passive departure requires session recovery. |
AliRtcAudioEffectVoiceChangerMode
Voice changer mode.
Enumeration name | Description |
AliRtcSdk_AudioEffect_Voice_Changer_OFF | Off. |
AliRtcSdk_AudioEffect_Voice_Changer_Oldman | Old man. |
AliRtcSdk_AudioEffect_Voice_Changer_Babyboy | Baby boy. |
AliRtcSdk_AudioEffect_Voice_Changer_Babygirl | Baby girl. |
AliRtcSdk_AudioEffect_Voice_Changer_Robot | Robot. |
AliRtcSdk_AudioEffect_Voice_Changer_Daimo | Devil. |
AliRtcSdk_AudioEffect_Voice_Changer_Ktv | KTV. |
AliRtcSdk_AudioEffect_Voice_Changer_Echo | Echo. |
AliRtcSdk_AudioEffect_Voice_Changer_Dialect | Dialect. |
AliRtcSdk_AudioEffect_Voice_Changer_Howl | Howl. |
AliRtcSdk_AudioEffect_Voice_Changer_Electronic | Electronic. |
AliRtcSdk_AudioEffect_Voice_Changer_Phonograph | Phonograph. |
AliRtcSdk_AudioEffect_Voice_Changer_MAX | Placeholder. No meaning. |
AliRtcAudioEffectReverbMode
Reverb mode.
Enumeration name | Description |
AliRtcAudioEffectReverb_Off | Off. |
AliRtcAudioEffectReverb_Vocal_I | Vocal I. |
AliRtcAudioEffectReverb_Vocal_II | Vocal II. |
AliRtcAudioEffectReverb_Bathroom | Bathroom. |
AliRtcAudioEffectReverb_Small_Room_Bright | Bright small room. |
AliRtcAudioEffectReverb_Small_Room_Dark | Dark small room. |
AliRtcAudioEffectReverb_Medium_Room | Medium room. |
AliRtcAudioEffectReverb_Large_Room | Large room. |
AliRtcAudioEffectReverb_Church_Hall | Church hall. |
AliRtcAudioEffectReverbParamType
Reverb parameters.
Enumeration name | Description |
AliRtcAudioEffectReverb_Room_Size | Room size. Value range: [0, 100]. |
AliRtcAudioEffectReverb_Pre_Delay | Pre-delay in milliseconds. Value range: [0, 200]. |
AliRtcAudioEffectReverb_Revetberance | Reverberance. Value range: [0, 100]. |
AliRtcAudioEffectReverb_Hf_Damping | Damping. Value range: [0, 100]. |
AliRtcAudioEffectReverb_Tone_Low | Low tone. Value range: [0, 100]. |
AliRtcAudioEffectReverb_Tone_High | High tone. Value range: [0, 100]. |
AliRtcAudioEffectReverb_Dry_Gain | Dry gain. Value range: [-20, 10]. |
AliRtcAudioEffectReverb_Wet_Gain | Wet gain. Value range: [-20, 10]. |
AliRtcAudioRouteType
Audio route.
Enumeration name | Description |
AliRtcAudioRouteType_Default | Default audio route. |
AliRtcAudioRouteType_Headset | Headset. |
AliRtcAudioRouteType_Earpiece | Earpiece. |
AliRtcAudioRouteType_HeadsetNoMic | Headphones without a microphone. |
AliRtcAudioRouteType_Speakerphone | Phone speaker. |
AliRtcAudioRouteType_LoudSpeaker | External speaker. |
AliRtcAudioRouteType_BlueTooth | Bluetooth headset. |
AliRtcRemoteTextureInfo
Remote user texture information.
Parameter | Type | Description |
aliVideoCanvas | The rendering canvas. | |
userId | String | The remote user ID. |
videoTrack | int | The video stream type. |
AliRtcVideoCanvas
Rendering canvas.
Parameter | Type | Description |
textureId | int | The texture ID of the video data. |
textureWidth | int | The texture width. |
textureHeight | int | The texture height. |
sharedContext | long | The thread-related context variable for OpenGL. |
enableBeauty | boolean | Specifies whether to enable retouching. Valid values:
The default value is false. |
view | View | The video display view. The view must be a SurfaceView rendering view created by calling the createRenderSurfaceView A SurfaceView rendering view, or the view returned by createRenderTextureView The TextureView rendering view is created. |
renderMode | The view rendering mode. The default value is AliRtcRenderModeAuto. | |
mirrorMode | The view mirror mode. The default value is AliRtcRenderMirrorModeOnlyFront. | |
rotationMode | The view rotation angle. The default value is AliRtcRotationMode_0. | |
backgroundColor | int | The background color of the view. |
AliRtcMpuState
Status of bypass transcoding and stream ingest tasks.
Enumeration name | Description |
AliRtcMpuStateStart | The bypass task is starting. |
AliRtcMpuStateUpdate | The bypass task is updating. |
AliRtcMpuStateStop | The bypass task is stopping. |
AliRtcMpuStateEnd | The bypass task has ended. |
AliRtcMpuStateConnect | The bypass task is connecting. |
AliRtcMpuStateRunning | The bypass task is running. |
AliRtcMpuStateRecovering | The bypass task is recovering. |
AliRtcMpuStateFailed | The bypass task failed. |
AliRtcMpuStateUnknow | The bypass task is in an unknown state. |
AliRtcRectPosition
Position and size of the watermark image.
Parameter name | Type | Description |
x | float | The horizontal offset of the top-left corner. |
y | float | The vertical offset of the top-left corner. |
width | float | The width of the watermark image. |
height | float | The height of the watermark image. |
AliRtcWatermarkConfig
Watermark image settings.
Parameter name | Type | Description |
visibleInPreview | boolean | Specifies whether the watermark is visible in the local preview. |
positionInLandscapeMode | The watermark coordinates in landscape mode. | |
positionInPortraitMode | The watermark coordinates in portrait mode. | |
alpha | float | The transparency. |
normalized | boolean | Normalization. |
AliRtcTextureInfo
Texture information.
Parameter | Type | Description |
textureId | int | The texture ID. |
mirrorMode | The mirror mode. |
AliEngineCameraCapturerConfiguration
Camera capture preferences.
Parameter | Type | Description |
preference | The capture preference. | |
cameraDirection | The camera direction. This parameter is supported only on Android and iOS. | |
fps | int | The frame rate of the encoder. The default internal frame rate is 15. |
cameraCaptureProfile | Specifies a specific resolution for video capture. | |
disableVideoCaptureReverse | int | Setting to disable flipping of captured video frames based on aspect ratio. |
captureObserverOriginal | int | Specifies whether to call back the original video frame data. |
textureEncode | int | Specifies whether to use texture encoding. |
cameraTextureCapture | int | Specifies whether to enable texture capture for the camera. |
AliRtcCaptureOutputPreference
Camera capture preference.
Enumeration name | Description |
CAPTURER_OUTPUT_PREFERENCE_AUTO | Automatically adjusts capture parameters. |
CAPTURER_OUTPUT_PREFERENCE_PERFORMANCE | Prioritizes device performance. Selects the camera output parameters that are closest to the parameters set by setVideoProfile. |
CAPTURER_OUTPUT_PREFERENCE_PREVIEW | Prioritizes video preview quality. Selects higher camera output parameters. |
AliRtcCameraDirection
Camera direction.
Enumeration name | Description |
CAMERA_INVALID | Invalid. |
CAMERA_REAR | Use the rear camera. |
CAMERA_FRONT | Use the front camera. |
AliRtcCameraCaptureProfile
Specifies the resolution for video capture.
Enumeration name | Description |
ALIRTC_CAMERA_CAPTURER_PROFILE_DEFAULT | Default. |
ALIRTC_CAMERA_CAPTURER_PROFILE_1080P | Used for 1080p video. When enabled, the camera captures at 1080p resolution. |
AliRtcVideoEncoderFrameRate
Video encoding frame rate.
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
Video encoding bitrate.
Enumeration name | Description |
AliRtcVideoEncoderStandardBitrate | Standard bitrate mode. |
AliRtcVideoEncoderMirrorMode
Encoded video mirror mode.
Enumeration name | Description |
AliRtcVideoEncoderMirrorModeDisabled | Encoded video is mirrored. |
AliRtcVideoEncoderMirrorModeEnabled | Encoded video is not mirrored. |
AliRtcVideoEncoderOrientationMode
Encoded video rotation mode.
Enumeration name | Description |
AliRtcVideoEncoderOrientationModeAdaptive | Adaptive. The angle is the same as the captured video. |
AliRtcVideoEncoderOrientationModeFixedLandscape | Fixed landscape. |
AliRtcVideoEncoderOrientationModeFixedPortrait | Fixed portrait. |
AliRtcVideoDimensions
Video resolution.
Parameter name | Type | Description |
width | int | The video width. |
height | int | The video height. |
AliRtcVideoEncoderConfiguration
Video encoder configuration.
Parameter name | Type | Description |
dimensions | The video resolution. The default value is 640x480. The maximum value is 1920x1080. | |
frameRate | int | The video encoding frame rate. The default value is 15. The maximum value is 30. |
bitrate | int | The video encoding bitrate in Kbps. The default value is 512. If you set this parameter to 0, the SDK automatically calculates a suitable bitrate based on the video resolution and frame rate. The bitrate must be within a reasonable range for the specified resolution and frame rate. If the value is outside the valid range, the SDK automatically adjusts the bitrate to a valid value. |
minBitrate | NSInteger | The minimum video encoding bitrate in Kbps. The default value is 0. |
keyFrameInterval | int | The keyframe interval in milliseconds. The default value is 0, which means the SDK controls the keyframe interval. |
forceStrictKeyFrameInterval | boolean | Specifies whether to force the encoder to generate keyframes at the specified interval. The default value is false.
|
mirrorMode | The encoded video mirror mode. | |
orientationMode | The encoded video rotation mode. | |
rotationMode | The video rotation angle. | |
codecType | The codec type. | |
encodeCodecType | The video encoding type. | |
seiForceFrontIFrame | int | Forces an I-frame before sending SEI. -1 indicates the default value, 0 indicates not to force, and 1 indicates to force (default). |
enableDynamicEncode | int | Enables dynamic encoding. Creates both hardware and software encoders simultaneously. If the hardware encoder fails, it downgrades to the software encoder. -1 indicates the default value, 0 indicates not to create both types of encoders, and 1 indicates to create both. |
disableDipenseResolutionChange | int | Disables the ability of QoS to reduce resolution. When QoS detects that the real-time bandwidth is insufficient for the current resolution, it reduces the video encoding resolution. -1 indicates the default value, 0 allows reduction, and 1 disallows QoS from reducing the resolution. |
enableDowngrade | int | Allows QoS to reduce the video encoding bitrate based on the actual detected bandwidth. -1 indicates the default value, 0 disallows reducing the bitrate, and 1 allows reducing the bitrate. |
enableH264BFrame | int | Specifies whether to enable H.264 B-frame support. -1 indicates the default value, 0 disables B-frame support, and 1 enables B-frame support. Important If you enable this feature, you must also enable B-frame support on the decoder side. |
enableHevcBFrame | int | Specifies whether to enable HEVC B-frame support. -1 indicates the default value, 0 disables B-frame support, and 1 enables B-frame support. Important If you enable this feature, you must also enable B-frame support on the decoder side. |
AliRtcVideoCodecType
Video codec type.
Enumeration name | Description |
AliRtcVideoCodecTypeDefault | Not set. The default value (hardware encoding) is used. |
AliRtcVideoCodecTypeSoftware | Software video codec. |
AliRtcVideoCodecTypeHardware | Hardware video codec. |
AliRtcVideoCodecTypeHardwareTexture | Hardware texture codec. |
AliRtcVideoDecoderConfiguration
Video decoder settings.
Parameter | Type | Description |
codecType | The codec type. The default value is AliRtcVideoCodecTypeDefault, which uses the system's default settings. | |
enableDecoderBframe | int | Specifies whether to enable B-frames for the decoder. The default value is -1. Set to 0 to disable B-frames, and 1 to enable B-frames. |
textureBindContext | int | Specifies whether to support texture decoding with context binding. The default value is -1. Set to 0 to disable, and 1 to enable the downgrade logic. |
AliRtcVideoEncodeCodecType
Encoder type.
Enumeration name | Description |
AliRtcVideoEncodeCodecTypeDefault | Not set. The default value (currently H.264) is used. |
AliRtcVideoEncodeCodecTypeH264 | H.264 encoding. |
AliRtcVideoEncodeCodecTypeHevc | HEVC encoding. |
AliRtcScreenShareEncoderConfiguration
Screen encoding configuration.
Parameter name | Type | Description |
dimensions | The video resolution. | |
frameRate | int | The video encoding frame rate. |
bitrate | int | The video encoding bitrate. |
rotationMode | The ingest rotation angle. | |
keyFrameInterval | int | The keyframe interval in milliseconds. The default value is 0, which means the SDK controls the keyframe interval. |
forceStrictKeyFrameInterval | boolean | Specifies whether to force the encoder to generate keyframes at the specified interval. The default value is false.
|
AliRtcAuthInfo
Authentication information.
Parameter name | Type | Description |
channelId | String | The channel ID. |
userId | String | The user ID. |
appId | String | The application ID. |
nonce | String | The nonce. |
timestamp | long | The timestamp. |
token | String | The token. |
AliRtcLiveTranscoding
Bypass live streaming configuration.
Parameter name | Type | Description |
mMixMode | int | The stream mixing mode. Valid values:
The default value is 1. |
mLayoutIds | List<String> | An array of layout IDs. |
mSubSpecUsers | List<TranscodingUser> | Specifies the list of users for stream mixing. |
mUserPanes | List<TranscodingUserPane> | A list of user panes. |
mLayouts | List<TranscodingLayout> | A list of custom user layouts. |
mTaskProfile | String | The task billing configuration. |
mBackgroundColor | int | The background color in RGB. The default value is 0 (black). The formula is R + G × 256 + B × 65536. The value range for R (red), G (green), and B (blue) is 0 to 255. |
mMediaEncode | int | The encoding options. |
mCropMode | int | The video cropping method. Valid values:
The default value is 2. |
mStreamType | int | The audio stream to ingest in single-stream ingest mode. Valid values:
The default value is 0. |
mSourceType | String | The user's video input stream in single-stream ingest mode. Valid values:
|
mExternalParam | String | An extension field. |
AliRtcRemoteUserInfo
Remote user information.
Parameter name | Type | Description |
userID | String | The ID of the remote user. |
sessionID | String | The session ID of the remote user. |
displayName | String | The name of the remote user. |
muteAudioPlaying | boolean | Specifies whether the local user has muted this remote user. |
isOnline | boolean | Specifies whether the remote user is online. |
cameraCanvas | The camera stream canvas. | |
screenCanvas | The screen stream canvas. | |
hasAudio | boolean | Specifies whether the remote user has ingested an audio stream. |
hasCameraMaster | boolean | Specifies whether the remote user has ingested a high-definition camera stream. |
hasCameraSlave | boolean | Specifies whether the remote user has ingested a low-definition camera stream. |
hasScreenSharing | boolean | Specifies whether the remote user has ingested a screen stream. |
subScribedAudio | boolean | Specifies whether the local user has pulled the audio stream of this remote user. |
subScribedCamearSlave | boolean | Specifies whether the local user has pulled the low-definition camera stream of this remote user. |
subScribedCameraMaster | boolean | Specifies whether the local user has pulled the high-definition camera stream of this remote user. |
subScribedScreenSharing | boolean | Specifies whether the local user has pulled the screen stream of this remote user. |
requestAudio | boolean | Specifies whether the local user has subscribed to the audio stream of this remote user. |
requestCameraSlave | boolean | Specifies whether the local user has subscribed to the low-definition camera stream of this remote user. |
requestCameraMaster | boolean | Specifies whether the local user has subscribed to the high-definition camera stream of this remote user. |
requestScreenSharing | boolean | Specifies whether the local user has subscribed to the screen stream of this remote user. |
preferCameraMaster | boolean | Specifies whether the remote user has prioritized the high-definition stream. |
hasCameraView | boolean | Specifies whether the local user has set the view for the camera stream of this remote user. |
hasScreenView | boolean | Specifies whether the local user has set the view for the screen stream of this remote user. |
AliRtcVideoReason
Reason for a change in the video stream state.
Enumeration name | Description |
AliRTCVideoChangedByClient | Client. |
AliRTCVideoChangedByServer | Server. |
AliRtcVideoState
Change in the video stream state.
Enumeration name | Description |
AliRtcVideoVideoClose | Close the video stream. |
AliRtcVideoVideoOpen | Resume the video stream. |
AliRtcTrascodingPublishTaskStatus
Status of a bypass live stream ingest task.
Enumeration name | Description |
AliRtcTrascodingPublishTaskStatusStart | The bypass live stream ingest task has started. |
AliRtcTrascodingPublishTaskStatusUpdate | The bypass live stream ingest task is updating. |
AliRtcTrascodingPublishTaskStatusStop | The bypass live stream ingest task has stopped. |
AliEngineLiveTranscodingErrorCode
Bypass live stream ingest error codes.
Enumeration name | Description |
AliEngineLiveTranscodingErrorPublishOk | Bypass live streaming is ready. |
AliEngineLiveTranscodingErrorStreamNotFound | The bypass live stream ingest URL was not found. |
AliEngineLiveTranscodingErrorStreamAlreadyExist | The requested stream already exists and cannot be created again. |
AliEngineLiveTranscodingErrorInvalidParam | The input parameters are invalid, such as incorrect format or missing values. |
AliEngineLiveTranscodingErrorInternalError | An unknown error occurred within the SDK. |
AliEngineLiveTranscodingErrorRtmpServerError | The RTMP server returned an error, such as connection failure or authentication failure. |
AliEngineLiveTranscodingErrorRtmpStreamUrlError | The RTMP stream URL format is incorrect, such as a missing protocol header or an incorrect domain name. |
AliEngineLiveTranscodingErrorPublishTimeout | The bypass ingest operation did not complete within the specified time. |
AliEngineLiveTranscodingErrorNotAuthorized | The user does not have permission to perform the current operation, such as an invalid or expired token. |
AliRtcLiveTranscodingState
Bypass live streaming state.
Enumeration name | Description |
AliRtcLiveTranscodingState_IDLE | Stream ingest is idle. |
AliRtcLiveTranscodingState_CONNNECT | Connecting to the ingest server. |
AliRtcLiveTranscodingState_RUNNING | Stream ingest is in progress. |
AliRtcLiveTranscodingState_RECOVERING | Recovering stream ingest. |
AliRtcLiveTranscodingState_FAILURE | Stream ingest failed. |
AliRtcLiveTranscodingState_END | Stream ingest has ended. |
AliRtcLiveTranscodingMediaProcessMode
Bypass live streaming media processing mode.
Enumeration name | Description |
AliRtcLiveTranscodingNormal | Normal mode. |
AliRtcLiveTranscodingVirtualBackground | Virtual background mode. |
AliRtcLiveTranscodingCropMode
Bypass live streaming crop mode.
Enumeration name | Description |
AliRtcLiveTranscodingCrop | Crop while maintaining the aspect ratio. |
AliRtcLiveTranscodingFill | Fill with black bars while maintaining the aspect ratio (default). |
AliRtcLiveTranscodingFontType
Bypass live streaming font.
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
Bypass live streaming input type.
Enumeration name | Description |
AliRtcLiveTranscodingNoBody | No portrait segmentation. |
AliRtcLiveTranscodingBody | Portrait segmentation. |
AliRtcLiveTranscodingAudioSampleRate
Bypass live streaming audio sample rate.
Enumeration name | Description |
AliRtcLiveTranscoding_HZ_48000 | Sample rate of 48000 Hz. |
AliRtcLiveTranscoding_HZ_44100 | Sample rate of 44100 Hz. |
AliRtcLiveTranscoding_HZ_32000 | Sample rate of 32000 Hz. |
AliRtcLiveTranscoding_HZ_16000 | Sample rate of 16000 Hz. |
AliRtcLiveTranscoding_HZ_8000 | Sample rate of 8000 Hz. |
AliRtcLiveTranscodingTaskProfile
Billing specifications for bypass live streaming.
Enumeration name | Description |
AliRtcLiveTranscoding_Profile_1IN_1080P | 1IN_1080P. |
AliRtcLiveTranscoding_Profile_1IN_720P | 1IN_720P. |
AliRtcLiveTranscoding_Profile_1IN_360P | 1IN_360P. |
AliRtcLiveTranscoding_Profile_2IN_1080P | 2IN_1080P. |
AliRtcLiveTranscoding_Profile_2IN_720P | 2IN_720P. |
AliRtcLiveTranscoding_Profile_2IN_360P | 2IN_360P. |
AliRtcLiveTranscoding_Profile_4IN_1080P | 4IN_1080P. |
AliRtcLiveTranscoding_Profile_4IN_720P | 4IN_720P. |
AliRtcLiveTranscoding_Profile_4IN_360P | 4IN_360P. |
AliRtcLiveTranscoding_Profile_9IN_1080P | 9IN_1080P. |
AliRtcLiveTranscoding_Profile_9IN_720P | 9IN_720P. |
AliRtcLiveTranscoding_Profile_9IN_360P | 9IN_360P. |
AliRtcLiveTranscoding_Profile_12IN_1080P | 12IN_1080P. |
AliRtcLiveTranscoding_Profile_12IN_720P | 12IN_720P. |
AliRtcLiveTranscoding_Profile_12IN_360P | 12IN_360P. |
AliRtcLiveTranscoding_Profile_16IN_1080P | 16IN_1080P. |
AliRtcLiveTranscoding_Profile_16IN_720P | 16IN_720P. |
AliRtcLiveTranscoding_Profile_16IN_360P | 16IN_360P. |
AliRtcLiveTranscoding_Profile_Mixed | Audio-only. |
AliRtcLiveTranscodingSourceType
Bypass live streaming video stream type.
Enumeration name | Description |
AliRtcLiveTranscodingCamera | Camera. |
AliRtcLiveTranscodingShareScreen | Screen sharing. |
AliRtcLiveTranscodingStreamType
Bypass live stream ingest type.
Enumeration name | Description |
AliRtcLiveTranscodingOrigin | Ingest the original stream. |
AliRtcLiveTranscodingAudio | Ingest only the audio stream. |
AliRtcLiveTranscodingVideo | Ingest only the video stream. |
AliRtcLiveTranscodingMixMode
Bypass live streaming mode.
Enumeration name | Description |
AliRtcLiveTranscodingSINGLE | Single-stream ingest. Only the original single stream is ingested without mixing or transcoding. No stream mixing or transcoding parameters need to be configured. |
AliRtcLiveTranscodingMIX | Stream mixing and transcoding (default). Supports mixed and transcoded output. |
AliRtcVideoObserAlignment
Data alignment type for raw data callbacks.
Enumeration name | Description |
AliRtcAlignmentDefault | No processing. The original data is called back directly. |
AliRtcAlignmentEven | The width is processed to be an even number. |
AliRtcAlignment4 | The width is processed to be a multiple of 4. |
AliRtcAlignment8 | The width is processed to be a multiple of 8. |
AliRtcAlignment16 | The width is processed to be a multiple of 16. |
AliRtcLiveTranscodingEncodeParam
Bypass live streaming encoding parameters.
Parameter | Type | Description |
videoWidth | int | The width. |
videoHeight | int | High |
videoFramerate | int | The frame rate. |
videoBitrate | int | The bitrate. |
videoGop | int | The GOP. |
videoCodec | AliRtcLiveTranscodingVideoCodec | The encoder type, H.264 or H.265. |
audioSamplerate | The bypass live streaming audio sample rate. | |
audioBitrate | int | The audio bitrate. |
audioChannels | int | The number of audio channels. |
AliRtcLiveTranscodingMixParam
Bypass live stream mixing parameters.
Parameter | Type | Description |
taskProfile | The bypass live streaming billing specifications. | |
encodeParam | The bypass live streaming encoding parameters. | |
users | List<TranscodingUser> | A list of bypass live streaming users. |
backgroundColor | int | The background color. |
backgrounds | List<TranscodingImage> | A list of background images. |
watermarks | List<TranscodingImage> | A list of watermark images. |
clockWidgets | List<TranscodingClockWidget> | A list of clock widgets. |
cropMode | The bypass live streaming crop mode. | |
mediaProcessMode | The bypass live streaming media processing mode. |
AliRtcLiveTranscodingParam
Bypass live streaming parameters.
Parameter | Type | Description |
mixMode | The bypass live streaming mode. | |
singleParam | The bypass live streaming single-stream parameters. | |
mixParam | The bypass live stream mixing parameters. |
AliRtcLiveTranscodingSingleParam
Bypass live streaming single-stream parameters.
Parameter | Type | Description |
userId | String | The user ID. |
streamType | The bypass live stream ingest type. | |
sourceType | The bypass live streaming video stream type. |
TranscodingClockWidget
Bypass live streaming clock widget.
Parameter | Type | Description |
mX | int | The X coordinate in pixels. |
mY | int | The Y coordinate in pixels. |
mFontSize | int | The bypass live streaming font size. |
mZorder | int | The stacking order. 0 is the bottom layer, 1 is above 0, and so on. |
mFontColor | int | The bypass live streaming font color. |
mFontType | The bypass live streaming font. |
TranscodingUser
Bypass live streaming user information.
Parameter | Type | Description |
mUserId | String | The user ID. |
x | int | The X coordinate in pixels. |
y | int | The Y coordinate in pixels. |
width | int | The pane width. |
height | int | The pane height. |
zOrder | int | The stacking order. 0 is the bottom layer, 1 is above 0, and so on. |
streamType | The bypass live stream ingest mode. | |
sourceType | The bypass live streaming video stream type. | |
segmentType | The bypass live streaming input type. | |
images | List<TranscodingImage> | A list of images. |
texts | List<TranscodingText> | A list of texts. |
TranscodingText
Bypass live streaming text information.
Parameter | Type | Description |
mText | String | The text information. |
mX | int | The X coordinate in pixels. |
mY | int | The Y coordinate in pixels. |
mFontSize | int | The font size. |
mZorder | int | The stacking order. 0 is the bottom layer, 1 is above 0, and so on. |
mFontColor | int | The font color. |
mFontType | The bypass live streaming font. |
TranscodingImage
Bypass live streaming image information.
Parameter | Type | Description | |
mUrl | String | The image URL. | |
mAlpha | float | The transparency. 0.0 is transparent, and 1.0 is completely opaque. | |
mDisplay | The image display. | ||
mX | int | The X coordinate in pixels. | |
mY | int | The Y coordinate in pixels. | |
mWidth | int | The pane width. | |
mHeight | int | The pane height. | |
mZorder | int | The stacking order. 0 is the bottom layer, 1 is above 0, and so on. |
DisplayType
Image display mode.
Enumeration name | Description |
NOT_DISPLAY | Do not display. |
ALWAYS | Always display. |
WHEN_NO_VIDEO | Display when there is no video. |
AliRtcScreenShareMode
Enumeration name | Description |
AliRtcScreenShareNoneMode | Do not share. |
AliRtcScreenShareOnlyVideoMode | Share the video stream. |
AliRtcScreenShareOnlyAudioMode | Share the app audio stream. |
AliRtcScreenShareAllMode | Share all audio and video streams. |
AliCapabilityProfile
Feature aggregation parameter used for joining a channel.
Enumeration name | Description |
AliCapabilityProfileDefault | Default value. No special requirements. |
AliCapabilityProfileAiHuman | Feature configuration for a real user in an AI agent call scenario. |
AliCapabilityProfileAiRobot | Feature configuration for a robot in an AI agent call scenario. |
AliRTCSdkChannelParam
Parameters for joining a channel.
Parameter | Type | Description |
channelId | String | The channel number. |
userId | String | The username for joining the channel. |
userName | String | Any display name for the user, not the User ID. This can be left empty to indicate no username. |
capabilityProfile | User properties. Requires special configuration in AI agent call scenarios. Use the default value for non-AI agent call scenarios. |
AlirtcNetworkQualityProbeConfig
Parameters for network probing.
Parameter | Type | Description |
probeUplink | boolean | Specifies whether to probe the upstream bandwidth. The default value is false. |
probeDownlink | boolean | Specifies whether to probe the downstream bandwidth. The default value is false. This is not currently supported. |
expectedUplinkBitrateKbps | int | The peak value for upstream bandwidth probing in Kbps. The default value is 1000. |
expectedDownlinkBitrateKbps | int | The peak value for downstream bandwidth probing in Kbps. This is not currently supported. The default value is 1000. |
AlirtcNetworkQualityProbeResult
Network probing result.
Parameter | Type | Description |
rtt | int | The RTT of the link in ms. |
uplinkPacketLossRate | int | The packet loss rate of the upstream network probe. The maximum value is 100%. |
upLinkJitter | int | The jitter of the upstream network probe in ms. |
upLinkAvailableBandwidth | int | The upstream network bandwidth in Kbps. |
downLinkPacketLossRate | int | The packet loss rate of the downstream network probe. The maximum value is 100%. This is not currently supported. |
downLinkJitter | int | The jitter of the downstream network probe in ms. This is not currently supported. |
downLinkAvailableBandwidth | int | The downstream network bandwidth in Kbps. This is not currently supported. |
AliRtcVideoPipelineMirrorMode
Video stream mirror mode.
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
Video scaling timing.
Enumeration name | Description |
AliRtcCapturePipelineScaleModePre | Scale immediately after capture. This is the default. |
AliRtcCapturePipelineScaleModePost | Scale during encoding. |
AliRtcAudioFrame
Raw audio data.
Parameter name | Type | Description |
dataPtr | long | The native pointer to the audio data. |
data | byte[] | The audio data. |
numSamples | int | The number of samples. |
bytesPerSample | int | The number of bytes per sample. |
numChannels | int | The number of sound channels. |
samplesPerSec | int | The number of samples per second. |
AliRtcAudioSource
Audio subscription type.
Enumeration name | Description |
AliRtcAudioSourceCaptured | Captured audio data. |
AliRtcAudioSourceProcessCaptured | Audio data after 3A processing. |
AliRtcAudioSourcePub | Ingested audio data. |
AliRtcAudioSourcePlayback | Playback audio data. |
AliRtcAudioSourceMixedAll | Audio data after mixing ingested and playback audio. |
AliRtcAudioSourceRemoteUser | Remote audio data from stream pulling. |
AliRtcAudioFrameObserverConfig
Audio data callback settings.
Parameter | Type | Description |
sampleRate | The callback audio sample rate enumeration. The default value is AliRtcAudioSampleRate_48000. | |
channels | The number of callback audio channels. Supports mono and stereo. The default value is mono (AliRtcMonoAudio). | |
mode | The callback mode. Includes read-only mode (0), write-only mode (1), and read-write mode (2). The default value is read-only mode (AliRtcAudioDataObserverOperationModeReadOnly). | |
userDefinedInfo | int | Custom user parameters. Used to set the stream mixing mode for the onMixedAllAudioFrame callback. The default is to mix externally rendered audio (AliRtcAudioFrameObserverUserDefinedInfoBitMaskMixExRender). |
AliRtcAudioFrameObserverOperationMode
Read/write mode for callback audio data.
Enumeration name | Description |
AliRtcAudioDataObserverOperationModeReadOnly | Read-only mode. |
AliRtcAudioDataObserverOperationModeWriteOnly | Write-only mode. |
AliRtcAudioDataObserverOperationModeReadWrite | Read-write mode. |
AliRtcAudioFrameObserverUserDefinedInfoBitMask
Custom parameters for audio data callbacks.
Enumeration name | Description |
AliRtcAudioFrameObserverUserDefinedInfoBitMaskMixExCapture | The onMixedAllAudioFrame callback mixes externally ingested audio. |
AliRtcAudioFrameObserverUserDefinedInfoBitMaskMixExRender | The onMixedAllAudioFrame callback mixes externally rendered audio. |
AliRtcOrientationMode
Device orientation enumeration.
Enumeration name | Description |
AliRtcOrientationModePortrait | Fixed portrait mode |
AliRtcOrientationModeLandscapeLeft | Fixed landscape left mode |
AliRtcOrientationModePortraitUpsideDown | Fixed upside-down mode |
AliRtcOrientationModeLandscapeRight | Fixed landscape right mode |
AliRtcOrientationModeAuto | Adaptive mode |
AliRtcAudioAccompanyErrorCode
Music accompaniment playback error codes.
Enumeration value | Description |
AliRtcAudioAccompanyNoError(0) | No error. Normal playback. |
AliRtcAudioAccompanyOpenFailed(-100) | Failed to open the audio file, such as an invalid path, insufficient permissions, or a corrupted file. |
AliRtcAudioAccompanyDecodeFailed(-101) | Failed to decode the audio file, such as an unsupported format or an encoding error. |
AliRtcAudioAccompanyConfig
Configuration for accompaniment playback.
Property | Type | Description |
onlyLocalPlay | boolean | Specifies whether to play only locally. The default value is false. |
replaceMic | boolean | Specifies whether to replace the microphone. The default value is false. |
loopCycles | int | The number of loops. You can set this to -1 for infinite loops or a positive integer greater than 0. Other values are invalid. The default value is -1. |
startPosMs | long | The starting position in ms. The default value is 0. |
publishVolume | int | The ingest volume. The value range is [0, 100]. The default value is 50. |
playoutVolume | int | The playback volume. The value range is [0, 100]. The default value is 50. |
AliRtcExternalAudioStreamConfig
External audio stream configuration.
Parameter name | Type | Description |
channels | int | The number of sound channels. The default value is 1. |
sampleRate | int | The sample rate. The default value is 48000. Supported sample rates are 8000, 12000, 16000, 24000, 32000, 44100, 48000, and 96000. |
playoutVolume | int | The playback volume. The value range is [0, 100]. The default value is 50. |
publishVolume | int | The ingest volume. The value range is [0, 100]. The default value is 50. |
publishStream | int | Specifies the bound audio stream.
|
enable3A | boolean | Specifies whether to apply 3A processing to the input PCM audio. The default value is false. |
AliRtcDataChannelMsg
Data channel message.
Parameter name | Type | Description |
type | The type of data channel message. It is recommended to set this to AliEngineDataMsgCustom. | |
networkTime | long | The NTP time when the message is sent. This is used only when type is AliEngineDataMsgMusicProgress and only in KTV scenarios. It does not need to be set for other scenarios. |
progress | int | The current progress in milliseconds. This is used only when type is AliEngineDataMsgMusicProgress and only in KTV scenarios. It does not need to be set for other scenarios. |
data | byte[] | The message content. This can be any data, including text, images, and more. |
AliRtcDataMsgType
Data channel message type.
Enumeration name | Description |
AliEngineDataMsgNone | No message. |
AliEngineDataMsgMusicProgress | Used in KTV scenarios. |
AliEngineDataMsgCustom | Normal message. It is recommended to set this type for other scenarios. |
AliRtcVideoExternalEncoderParameter
Structure for network change feedback parameters.
Parameter | Type | Description |
width | int | The width. |
height | int | The height. |
frame_rate | int | The frame rate. |
bitrate_bps | int | The bitrate in bps. |
AliRtcVideoEncodedFrameType
Frame type requested by the external encoder in response to Quality of Service (QoS) feedback.
Enumeration name | Description |
AliRtcVideoEncodedFrameNULL(0) | None. |
AliRtcVideoEncodedFrameIDR(1) | IDR frame. |
AliRtcVideoEncodedFrameLTR(2) | LTR frame. |
AliRtcVideoEncodedFrameB(3) | B-frame. |
AliRtcAudioAccompanyStateCode
Music accompaniment playback state.
Enumeration name | Description |
AliRtcAudioAccompanyStarted(100) | Accompaniment started playing. |
AliRtcAudioAccompanyStopped (101) | Accompaniment stopped playing. |
AliRtcAudioAccompanyPaused(102) | Accompaniment paused. |
AliRtcAudioAccompanyResumed(103) | Accompaniment resumed playing from a paused state. |
AliRtcAudioAccompanyEnded(104) | Accompaniment finished playing normally. |
AliRtcAudioAccompanyBuffering(105) | Accompaniment is buffering. This applies to network streams or large files. |
AliRtcAudioAccompanyBufferingEnd(106) | Buffering has ended and normal playback has started. |
AliRtcAudioAccompanyFailed(107) | Accompaniment playback failed. Check the error code for the specific reason. |
AliRtcAudioFileInfo
Audio file information.
Parameter | Type | Description |
filePath | String | The audio file path. |
durationMs | long | The duration of the audio file in ms. |
AliRtcEngineLocalDeviceType
Local device type.
Enumeration name | Description |
AliEngineLocalDeviceTypeUnknown | Unknown device type. |
AliEngineLocalDeviceTypeMic | Microphone device. |
AliEngineLocalDeviceTypeSpeaker | Speaker device. |
AliEngineLocalDeviceTypeAudioDevice | Audio device. |
AliEngineLocalDeviceTypeCamera | Camera device. |
AliEngineLocalDeviceTypeDisplay | Display device. |
AliEngineLocalDeviceTypeVideoDevice | Video device. |
AliRtcAudioEffectBeautifyMode
Voice retouching mode enumeration.
Enumeration value | Description |
AliRtcSdk_AudioEffect_Beautify_Off | Disables voice retouching effects. |
AliRtcSdk_AudioEffect_Beautify_Magnetic | Magnetic. |
AliRtcSdk_AudioEffect_Beautify_Fresh | Fresh. |
AliRtcSdk_AudioEffect_Beautify_Mode_Max | Placeholder. Represents the maximum value and cannot be used for actual settings. |
AliRtcAudioEffectEqualizationBandFrequency
An enumeration of reverb parameter types.
Enumeration 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 | |