This topic describes the data types involved in the Android SDK.

Table of contents

Data type Description Supported in the above version
AliRtcVideoTrack The type of the video track. 1.1
AliRtcAudioTrack The type of the audio track. 1.1
AliRTCCameraType The type of the camera. 1.1
AliRtcNetworkQuality Network quality. 1.1
AliRtcRenderMode The rendering mode. 1.1
AliRtcRenderMirrorMode The image mode. 1.11
AliRtcLogLevel The level of the log entry. 1.1
AliVideoCanvas Renders the canvas. 1.1
AliRtcAuthInfo The authentication information. 1.1
AliRtcVideoProfile The video quality parameters. 1.1
AliRtcRemoteUserInfo The remote user information. 1.1
AliRTCImageFormat Image format enumeration. 1.14
AliStatusInfo The information about the user. 1.14
AliStatusState The status of the convenience user. 1.14
AliDetectObserver Face Recognition preprocessing interfaces. 1.14
AliRtcChannelProfile The type of the channel. 1.15
AliAudioType Audio type enumeration. 1.17
AliRTCSDK_Client_Role The type of the role. 1.16
AliRtcStats Current channel call real-time data. 1.16
AliRtcAudioCodecQualityType Enumeration of recording file quality. 1.16
ErrorCodeEnum The type of the error that occurred. 1.16
AliRtcAudioPlayingStateCode Music accompaniment playing status. 1.16.2
AliRtcRecordAudioConfig Record audio settings. 1.17
RTCLocalVideoStats The statistics on local videos. 1.17
RTCRemoteVideoStats The statistics on remote videos. 1.17
AliRtcRecordType The recording format. 1.17
AliRtcRecordFormat The format of the recording. 1.17
AliRtcAudioSampleRate The type of the audio sample rate. 1.17
AliRtcAudioQuality The quality of the recording audio. 1.17
AliRTCSDK_AudioEffect_Reverb_Mode Reverberation sound mode. 1.17
AliRTCSDK_AudioEffect_Reverb_Param_Type The type of reverb sound effect. 1.17
AliVideoSourceType The type of the video source. 1.17
AliVideoSample The video sample class. 1.17
AliRtcBeautyConfig Beauty settings. 1.17.1
AliRtcAudioVolume The user volume information. 1.17.1
AliRtcAudioNumChannel The type of the audio channel. 1.17.13
AliRtcFeedbackType The type of the SDK feedback problem. 1.17.13
AliRtcOrientationMode The type of the horizontal screen. 1.17
AliRtcVideoEncoderMirrorMode The image mode of the encoded video. 1.17.31
AliRtcVideoEncoderConfiguration video encoding preferences. 1.17.31
AliRawDataStreamType The type of the video stream. 1.17

Description

  • AliRtcVideoTrack: the type of the video track.
    Enumeration Name Description
    AliRtcVideoTrackNo No video streams.
    AliRtcVideoTrackCamera The camera stream.
    AliRtcVideoTrackScreen Screen sharing stream.
    AliRtcVideoTrackBoth Camera stream and screen sharing stream.
  • AliRtcAudioTrack: the type of the audio track.
    Enumeration Name Description
    AliRtcAudioTrackNo No audio stream.
    AliRtcAudioTrackMic Microphone stream.
  • AliRTCCameraType: the camera type.
    Enumeration Name Description
    AliRTCCameraInvalid Invalid.
    AliRTCCameraBack Rear camera.
    AliRTCCameraFront Front camera.
  • AliRtcNetworkQuality: network quality.
    Enumeration Name Description
    Network_Excellent The network is excellent and the flow definition is good.
    Network_Good The network is good, the fluency definition are about the same as excellent.
    Network_Poor The network is poor, and the definition of audio and video fluency is flawed, which does not affect communication.
    Network_Bad The network is poor, the video is stuck seriously, and the audio can communicate normally.
    Network_VeryBad The network is extremely poor and basically unable to communicate.
    Network_Disconnected Network interruption.
    Network_Unknow The reason is unknown.
  • AliRtcRenderMode: rendering mode.
    Enumeration Name Description
    AliRtcRenderModeAuto Automatic.
    AliRtcRenderModeStretch Stretch the fill view without maintaining the video scale.
    AliRtcRenderModeFill Scale and fill black edges while maintaining the aspect ratio of the video.
    AliRtcRenderModeClip Zoom while maintaining the video aspect ratio and crop to fit the view.
  • AliRtcRenderMirrorMode: image mode.
    Enumeration Name Description
    AliRtcRenderMirrorModeOnlyFront Only the front camera previews the mirror image, and the rest are not mirrored.
    AliRtcRenderMirrorModeAllEnabled All images.
    AliRtcRenderMirrorModeAllDisable All images are not mirrored.
  • AliRtcLogLevel: the log level.
    Enumeration Name Description
    AliRtcLogLevelDump Full.
    AliRtcLogLevelDebug Debug the job data.
    AliRtcLogLevelVerbose Details.
    AliRtcLogLevelInfo Ordinary.
    AliRtcLogLevelWarn Warning.
    AliRtcLogLevelError The error information.
    AliRtcLogLevelFatal Serious.
    AliRtcLogLevelNone None
  • AliVideoCanvas: renders a canvas.
    Parameter Type Description
    surfaceView SophonSurfaceView Renders the Surface view.
    textureView SophonTextureView Renders the Texture view.
    renderMode AliRtcRenderMode The rendering mode.
    mirrorMode AliRtcRenderMirrorMode The image mode.
  • AliRtcAuthInfo: the authentication information.
    Notice The session id field is removed in 1.9 and later versions.
    Field Type Description
    mConferenceId String The ID of the channel.
    mUserId String The ID of the user.
    mAppid String The ID of the application.
    mNonce String A random string.
    mTimestamp long Timestamp.
    mToken String The token.
    mGslb String[] The GSLB address.
    mAgent String[] Specifies the address of the Agent server.
    mRole String The type of the role. The default value is empty, indicating that this feature is not involved. Valid values:
    • pub: the anchor role.
    • sub: the audience role.
    For more information, see How to perform role authentication.
  • AliRtcVideoProfile: the video quality parameters.
    Note Publish the video stream specification. The default value is AliRTCSDK_Video_Profile_Default. You can set it before or after you join the channel, but you must set it through the setVideoProfile method before you publish the local stream.
    Enumeration Name Description
    AliRTCSDK_Video_Profile_Default By default, the resolution is 480*640 and the frame rate is 15.
    AliRTCSDK_Video_Profile_180_240P_15 Resolution 180*240, frame rate 15.
    AliRTCSDK_Video_Profile_180_320P_15 Resolution 180*320, frame rate 15.
    AliRTCSDK_Video_Profile_180_320P_30 Resolution 180*320, frame rate 30.
    AliRTCSDK_Video_Profile_240_320P_15 Resolution 240*320, frame rate 15.
    AliRTCSDK_Video_Profile_360_480P_15 Resolution 360*480, frame rate 15.
    AliRTCSDK_Video_Profile_360_480P_30 Resolution 360*480, frame rate 30.
    AliRTCSDK_Video_Profile_360_640P_15 Resolution 360*640, frame rate 15.
    AliRTCSDK_Video_Profile_360_640P_30 Resolution 360*640, frame rate 30.
    AliRTCSDK_Video_Profile_480_640P_15 Resolution 480*640, frame rate 15.
    AliRTCSDK_Video_Profile_480_640P_30 Resolution 480*640, frame rate 30.
    AliRTCSDK_Video_Profile_720_960P_15 Resolution 720*960, frame rate 15.
    AliRTCSDK_Video_Profile_720_960P_30 Resolution 720*960, frame rate 30.
    AliRTCSDK_Video_Profile_720_1280P_15 Resolution 720*1280, frame rate 15.
    AliRTCSDK_Video_Profile_720_1280P_30 Resolution 720*1280, frame rate 30.
    AliRTCSDK_Video_Profile_360_640P_15_800Kb 360*640 resolution, frame rate 15,800Kb bit rate.
    AliRTCSDK_Video_Profile_480_840P_15_500Kb 480*840 resolution, frame rate 15,500Kb bit rate.
    AliRTCSDK_Video_Profile_480_840P_15_800Kb 480*840 resolution, frame rate 15,800Kb bit rate.
    AliRTCSDK_Video_Profile_540_960P_15_800Kb 540*960 resolution, frame rate 15,800Kb bit rate.
    AliRTCSDK_Video_Profile_540_960P_15_1200Kb 540*960 resolution, frame rate 15,120 0Kb bit rate.
    AliRTCSDK_Video_Profile_Max The placeholder value.
  • AliRtcRemoteUserInfo: remote user information.
    Field Type Description
    userID String The ID of the remote user.
    sessionID String The session ID of the remote user.
    callID String The callID of the remote user.
    displayName String The name of the remote user.
    streamLabel String The remote user flow label.
    firstSubscribe boolean Specifies whether to subscribe for the first time.
    muteAudioPlaying boolean Specifies whether to mute remote users.
    isOnline boolean Indicates whether the remote user is online.
    cameraCanvas AliVideoCanvas The camera stream displays the canvas.
    screenCanvas AliVideoCanvas The screen stream displays the canvas.
    hasAudio boolean Specifies whether the remote user pushes the audio stream.
    hasCameraMaster boolean Specifies whether the remote user pushes the camera stream.
    hasCameraSlave boolean Specifies whether the remote user pushes the camera stream.
    hasScreenSharing boolean Specifies whether the remote user pushes the screen stream.
    subAudio boolean Specifies whether to subscribe to audio streams of remote users.
    subCamera boolean Specifies whether to subscribe to camera streams for remote users.
    subCameraMaster boolean Specifies whether to subscribe to camera streams for remote users.
    subScreenSharing boolean Specifies whether to subscribe to screen streams for remote users.
    requestAudio boolean Specifies whether to request subscriptions to audio streams of remote users.
    requestCamera boolean Specifies whether to request a subscription to a remote user's camera stream.
    requestCameraMaster boolean Specifies whether to request a subscription to a remote user's camera stream.
    requestScreenSharing boolean Specifies whether to request subscriptions to screen streams for remote users.
  • AliRTCImageFormat: image format enumeration.
    Enumeration Name Description
    ALIRTC_IMAGE_FORMATUNKNOWN The format is unknown.
    ALIRTC_IMAGE_FORMATARGB Format ARGB.
    ALIRTC_IMAGE_FORMATBGRA Format BGRA.
    ALIRTC_IMAGE_FORMATRGBA Format RGBA.
    ALIRTC_IMAGE_FORMATYUV420P The format is YUV420P.
    ALIRTC_IMAGE_FORMATYUVYV12 The format is YUVYV12.
    ALIRTC_IMAGE_FORMATYUVNV21 The format is YUVNV21.
    ALIRTC_IMAGE_FORMATYUVNV12 Format YUVNV12.
    ALIRTC_IMAGE_FORMATYUVNV12_FULL_RANGE The format is YUVNV12_FULL_RANGE.
    ALIRTC_IMAGE_FORMATYUVJ420P The format is YUVJ420P.
    ALIRTC_IMAGE_FORMATYUV420SP The format is YUV420SP.
    ALIRTC_IMAGE_FORMATYUVJ420SP The format is YUVJ420SP.
    ALIRTC_IMAGE_FORMATYUVJ444P The format is YUVJ444P.
    ALIRTC_IMAGE_FORMATYUVJ422P The format is YUVJ422P.
    ALIRTC_IMAGE_FORMATYUV444P The format is YUV444P.
    ALIRTC_IMAGE_FORMATYUV2 Format YUV2.
    ALIRTC_IMAGE_FORMATMJPEG Format MJPEG.
    ALIRTC_IMAGE_FORMATTEXTURE_2D Format TEXTURE_2D.
    ALIRTC_IMAGE_FORMATTEXTURE_OES Format: TEXTURE_OES.
  • AliStatusInfo: the user information.
    Field Type Description
    user_id String The ID of the user.
    status AliStatusState The status of the O&M events.
  • AliStatusState: the user status.
    Field Type Description
    mic_open boolean Specifies whether the microphone is turned on.
    mic_interrupted boolean Whether the microphone is interrupted.
    cam_open boolean Whether the camera is turned on.
    audio_disabled boolean Indicates whether the audio is unavailable.
    video_disabled boolean Indicates whether the video is unavailable.
    background_mode boolean Specifies whether to specify the background mode.
  • AliDetectObserver: Face Recognition preprocessing interface.
    Method Name Description
    onData Face Recognition the callback interface.

    The following example shows the method.

    long onData(long dataFrameY, long dataFrameU, long dataFrameV, AliRtcEngine.AliRTCImageFormat aliRTCImageFormat, int width, int height, int strideY, int strideU, int strideV, int rotate, long extraData);
    Parameter Type Description
    dataFrameY long Y component pointer.
    dataFrameU long U component pointer.
    dataFrameV long V component pointer, NV12 and NV21 This pointer is null.
    aliRTCImageFormat AliRtcEngine.AliRTCImageFormat The image data format.
    width int The width of the image.
    height int The height of the image.
    strideY int The Y-component stride of the image.
    strideU int The image U component stride.
    strideV int The image V component stride.
    rotate int Image rotation angle.
    extraData long Additional fields (non-customized and negligible).
  • AliRtcChannelProfile: the channel type.
    Enumeration Name Description
    AliRTCSDK_Communication The communication mode.
    AliRTCSDK_Interactive_live Interactive mode.
  • AliAudioType: the audio type enumeration.
    Enumeration Name Description
    PUB_OBSERVER Audio data after audio 3A processing.
    SUB_OBSERVER The audio data that is remixed by the current subscribed remote user.
    RAW_DATA_OBSERVER Raw audio data collected locally.
  • AliRtcClientRole: the type of the role.
    Enumeration Name Description
    AliRTCSDK_Interactive Participate in interactive roles.
    AliRTCSDK_live Watch characters only.
  • AliRtcStats: the real-time call data of the current channel.

    Parameter Type Description
    sent_kbitrate long the total transmission bit rate. unit: kb.
    rcvd_kbitrate long The total received bitrate. Unit: kb.
    sent_bytes long The total amount of data sent. Unit: bytes.
    rcvd_bytes long The total amount of data received. Unit: bytes.
    cpu_usage long The CPU usage. Unit: %.
    sent_loss_rate short The packet loss rate from the client to the server. Unit: %.
    lastmile_delay long The latency from the client to the server. Unit: ms.
  • AliRtcAudioCodecQualityType: recording file quality enumeration.

    Enumeration Name Description
    AliRTCSDK_Audio_Codec_Quality_low Low-quality file recording, small file size, average sound quality.
    AliRTCSDK_Audio_Codec_Quality_midium Medium quality file recording, medium file volume, medium sound quality.
    AliRTCSDK_Audio_Codec_Quality_high High-quality file recording, large file volume and good sound quality.
  • ErrorCodeEnum: the type of the error.

    Parameter Enumeration Name Description
    Error codes ERR_JOIN_BAD_APPID The AppId (application ID) does not exist.
    ERR_JOIN_INVALID_APPID The AppId (application ID) is invalid.
    ERR_JOIN_BAD_CHANNEL The channel does not exist.
    ERR_JOIN_INVALID_CHANNEL The channel has expired.
    ERR_JOIN_BAD_TOKEN Token (authentication token) does not exist.
    ERR_JOIN_TIMEOUT Adding a channel timed out.
    ERR_JOIN_ERR_JOIN_BAD_PARAMBAD_CHANNEL The error message returned because the format of the specified parameter is invalid.
    Audio device error codes ERR_MIC_OPEN_FAIL The initialization of the collection device failed.
    ERR_SPEAKER_OPEN_FAIL The playback device failed to be initialized.
    ERR_MIC_INTERRUPT An exception occurred during collection.
    ERR_SPEAKER_INTERRUPT An exception occurs during playback.
    ERR_MIC_AUTH_FAIL The microphone device is not authorized.
    ERR_MIC_NOT_AVAILABLE No audio acquisition device is available.
    ERR_SPEAKER_NO_AVAILABLE No audio playback device is available.
    Video device error codes ERR_CAMERA_OPEN_FAIL The initialization of the collection device failed.
    ERR_CAMERA_INTERRUPT An exception occurred during collection.
    ERR_VIDEO_DISPLAY_INTERRUPT Failed to initialize the rendering device.
    AliRtcErrDisplayInterrupt An exception occurred during rendering.
    Network error codes ERR_ICE_CONNECTION_CONNECT_FAIL Media channel establishment failed.
    ERR_ICE_CONNECTION_RECONNECT_FAI Media channel reconnection failed.
    ERR_ICE_CONNECTION_HEARTBEAT_TIMEOUT Signaling heartbeat times out.
    Other error codes AliRtcErrSdkInvalidState The SDK status is incorrect.
    ERR_SESSION_REMOVED Session has been removed.
    AliRtcErrInner The error code returned because a hotword vocabulary error other than the preceding ones has occurred.
    ON_PERFORMANCE_LOW The current device performance is insufficient.
    ON_PERMORMANCE_RECOVERY The performance of the current device is restored.
  • AliRtcAudioPlayingStateCode: Music accompaniment playing status.

    Enumeration Name Description
    AliRtcAudioPlayingStarted Start the playback.
    AliRtcAudioPlayingStopped Stop the playback.
    AliRtcAudioPlayingPaused Indicates that the player pauses a video.
    AliRtcAudioPlayingResumed The playback is resumed.
    AliRtcAudioPlayingEnded Play finished.
    AliRtcAudioPlayingBuffering is buffering.
    AliRtcAudioPlayingBufferingEnd The buffer ends.
    AliRtcAudioPlayingFailed The error message returned because the playback failed.
  • AliRtcRecordAudioConfig: Record audio settings.

    Parameter Type Description
    sampleRate AliRtcAudioSampleRate Record the audio file sample rate.
    quality AliRtcAudioQuality The quality of the recorded audio file.
  • RTCLocalVideoStats: local video statistics.

    Parameter Type Description
    track_label String The type of the streams to query.
    sent_bitrate int The published bit rate.
    sent_fps int The release frame rate.
    encode_fps int The frame rate of video encoding.
  • RTCRemoteVideoStats: remote video statistics.

    Parameter Type Description
    track_label String The type of the streams to query.
    width int The width.
    height int High.
    decode_fps int The frame rate of video encoding.
    render_fps int The frame rate of video rendering.
    frozen_times int The number of interruptions.
    user_id String The ID of the user.
  • AliRtcRecordType: the recording type. Only audio files can be recorded.

    Enumeration Name Description
    AliRtcRecordTypeAudio The audio type.
  • AliRtcRecordFormat: the recording format.

    Enumeration Name Description
    AliRtcRecordFormatAAC The format of the recorded audio file is AAC.
    AliRtcRecordFormatWAV The format of the recorded audio file is WAV.
  • AliRtcAudioSampleRate: Record audio sample rate.

    Enumeration Name Description
    AliRtcAudioSampleRate_8000 8K.
    AliRtcAudioSampleRate_16000 16K.
    AliRtcAudioSampleRate_32000 32K.
    AliRtcAudioSampleRate_44100 44.1K.
    AliRtcAudioSampleRate_48000 48K.
    AliRtcAudioSampleRate_Max The placeholder value.
  • AliRtcAudioQuality: the quality of the recording audio.

    Enumeration Name Description
    AliRtcAudioQualityLow Low quality.
    AliRtcAudioQualityMidium Quality.
    AliRtcAudioQualityHigh High quality.
  • AliRTCSDK_AudioEffect_Reverb_Mode: reverb mode.

    Enumeration Name Description
    AliRTCSDK_AudioEffect_Reverb_Off Disabled
    AliRTCSDK_AudioEffect_Reverb_Vocal_I Vocal I.
    AliRTCSDK_AudioEffect_Reverb_Vocal_II Vocal II.
    AliRTCSDK_AudioEffect_Reverb_Bathroom The bathhouse.
    AliRTCSDK_AudioEffect_Reverb_Small_Room_Bright Bright little room.
    AliRTCSDK_AudioEffect_Reverb_Small_Room_Dark Dark little room.
    AliRTCSDK_AudioEffect_Reverb_Medium_Room Medium size room.
    AliRTCSDK_AudioEffect_Reverb_Large_Room Big room.
    AliRTCSDK_AudioEffect_Reverb_Church_Hall Church corridor.
    AliRTCSDK_AudioEffect_Reverb_Cathedral The cathedral.
  • AliRTCSDK_AudioEffect_Reverb_Param_Type: reverb sound effect type.

    Enumeration Name Description
    AliRTCSDK_AudioEffect_Reverb_Room_Size Room size, range:[0,100].
    AliRTCSDK_AudioEffect_Reverb_Pre_Delay The pre-delay. Unit: ms. Valid values:[0,200].
    AliRTCSDK_AudioEffect_Reverb_Reverberance Reverberation, range:[0,100].
    AliRTCSDK_AudioEffect_Reverb_Hf_Damping Muffling. Range:[0,100].
    AliRTCSDK_AudioEffect_Reverb_Tone_Low Bass tone, range:[0,100].
    AliRTCSDK_AudioEffect_Reverb_Tone_High High pitch, range:[0,100].
    AliRTCSDK_AudioEffect_Reverb_Dry_Gain Dry gain, range:[-20,10].
    AliRTCSDK_AudioEffect_Reverb_Wet_Gain Wet gain, range:[-20,10].
  • AliVideoSourceType: the type of the video source.
    Enumeration Name Description
    AliRTCSdk_Videosource_Camera_Large_Type Camera Stream Big Stream.
    AliRTCSdk_Videosource_Camera_Small_Type Camera Stream Small Stream.
    AliRTCSdk_Videosource_ScreenShare_Type Screen sharing stream.
  • AliVideoSample: the video sample class.
    Parameter Type Description
    dataFrameY long Y component pointer.
    dataFrameU long U component pointer.
    dataFrameV long V component pointer.
    format AliRTCImageFormat 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 span of the Y buffer in the YUV data.
    strideU int The row span of the U buffer in the YUV data.
    strideV int The row span of the V buffer in the YUV data.
    rotate int The rotation angle of the video frame.
    extraData long Additional fields (non-customized and negligible).
  • AliRtcBeautyConfig: the beauty settings.

    Parameter Type Description
    whiteningLevel float The larger the value of whitening [0,1], the better the whitening effect.
    smoothnessLevel float The larger the value of grinding [0,1], the better the grinding effect.
  • AliRtcAudioVolume: user volume information.

    Parameter Type Description
    mUserId String The uid of the current user. 0: indicates local, 1: indicates remote mixing, and others indicate remote users.
    mVolume int The volume of the current callback.
    mSpeechstate int 1: indicates that you are talking, 0: not speaking.
  • AliRtcAudioNumChannel: the audio channel type.

    Enumeration Name Description
    AliRtcMonoAudio = 1 Mono audio.
    AliRtcStereoAudio = 2 Stereo audio.
  • AliRtcFeedbackType: SDK feedback problem type.

    Enumeration Name Description
    AliRtcFeedbackVideoDeviceFail Video equipment issues.
    AliRtcFeedbackVideoNotRender The video has no picture.
    AliRtcFeedbackAudioDeviceFail Audio device problem.
    AliRtcFeedbackAudioNotRender The audio has no sound.
    AliRtcFeedbackAudioEchoError The audio echo is abnormal.
    AliRtcFeedbackChannelTypeError The meeting status is abnormal. The meeting status is abnormal. The meeting status is abnormal.
    AliRtcFeedbackSDKTypeError Other status of the SDK is abnormal.
    AliRtcFeedbackNetworkUnfluent Network Catton problem.
    AliRtcFeedbackVideoBlurring Video clarity issues.
    AliRtcFeedbackUnkonw The unknown type.
  • AliRtcOrientationMode: the horizontal screen type.

    Enumeration Name Description
    AliRtcOrientationModePortrait Fixed vertical screen mode.
    AliRtcOrientationModeLandscapeLeft Fixed the left horizontal screen mode.
    AliRtcOrientationModeLandscapeRight Fixed right horizontal screen mode.
    AliRtcOrientationModeAuto Adaptive horizontal and vertical screen mode.
  • AliRtcVideoEncoderMirrorMode: Encoded video image mode.
    Enumeration Name Description
    AliRtcVideoEncoderMirrorModeDisabled Encode the video image.
    AliRtcVideoEncoderMirrorModeEnabled The encoded video is not mirrored.
  • AliRtcVideoEncoderConfiguration: video encoding preferences.
    Parameter Type Description
    mirrorMode AliRtcVideoEncoderMirrorMode The image mode of the encoded video.
  • AliRawDataStreamType: the type of the video stream.
    Enumeration Name Description
    AliRTCSdk_Streame_Type_Capture The camera stream.
    AliRTCSdk_Streame_Type_Screen Screen stream.