LiteAVSDK
Tencent Cloud TRTC SDK, is a high availability components serving tens of thousands of enterprise customers, which is committed to helping you to minimize your research and development costs.
TRTCCloudDef

Detailed Description

Tencent Cloud TRTC Key Type Definition.

Module: TRTC key class definition Description: definitions of interfaceerated and constant values such as resolution and quality level


Data Structure Documentation

◆ com::tencent::trtc::TRTCCloudDef::TRTCParams

class com::tencent::trtc::TRTCCloudDef::TRTCParams

Public Member Functions

 TRTCParams ()
 
 TRTCParams (int sdkAppId, String userId, String userSig, int roomId, String privateMapKey, String businessInfo)
 
 TRTCParams (int sdkAppId, String userId, String userSig, String strRoomId, String privateMapKey, String businessInfo)
 
 TRTCParams (TRTCParams original)
 

Data Fields

int sdkAppId = 0
 
String userId = ""
 
String userSig = ""
 
int roomId = 0
 
String strRoomId = ""
 
int role = TRTCCloudDef.TRTCRoleAnchor
 
String streamId
 
String userDefineRecordId
 
String privateMapKey = ""
 
String businessInfo = ""
 

Constructor & Destructor Documentation

◆ TRTCParams() [1/4]

TRTCParams ( )
inline

◆ TRTCParams() [2/4]

TRTCParams ( int  sdkAppId,
String  userId,
String  userSig,
int  roomId,
String  privateMapKey,
String  businessInfo 
)
inline

◆ TRTCParams() [3/4]

TRTCParams ( int  sdkAppId,
String  userId,
String  userSig,
String  strRoomId,
String  privateMapKey,
String  businessInfo 
)
inline

◆ TRTCParams() [4/4]

TRTCParams ( TRTCParams  original)
inline

Field Documentation

◆ businessInfo

String businessInfo = ""

◆ privateMapKey

String privateMapKey = ""

◆ role

◆ roomId

int roomId = 0

◆ sdkAppId

int sdkAppId = 0

◆ streamId

String streamId

◆ strRoomId

String strRoomId = ""

◆ userDefineRecordId

String userDefineRecordId

◆ userId

String userId = ""

◆ userSig

String userSig = ""

◆ com::tencent::trtc::TRTCCloudDef::TRTCVideoEncParam

class com::tencent::trtc::TRTCCloudDef::TRTCVideoEncParam
Data Fields
boolean enableAdjustRes
int minVideoBitrate
int videoBitrate
int videoFps

Recommended value: 15 or 20 fps. If the frame rate is lower than 5 fps, there will be obvious lagging; if lower than 10 fps but higher than 5 fps, there will be slight lagging; if higher than 20 fps, the bandwidth will be wasted (the frame rate of movies is generally 24 fps). Note: the front cameras on certain Android phones do not support a capturing frame rate higher than 15 fps. For some Android phones that focus on beautification features, the capturing frame rate of the front cameras may be lower than 10 fps.

int videoResolution
int videoResolutionMode

◆ com::tencent::trtc::TRTCCloudDef::TRTCNetworkQosParam

class com::tencent::trtc::TRTCCloudDef::TRTCNetworkQosParam
Data Fields
int controlMode
int preference

◆ com::tencent::trtc::TRTCCloudDef::TRTCRenderParams

class com::tencent::trtc::TRTCCloudDef::TRTCRenderParams
Data Fields
int fillMode
int mirrorType
int rotation

◆ com::tencent::trtc::TRTCCloudDef::TRTCQuality

class com::tencent::trtc::TRTCCloudDef::TRTCQuality
Data Fields
int quality Network quality.
String userId User ID.

◆ com::tencent::trtc::TRTCCloudDef::TRTCVolumeInfo

class com::tencent::trtc::TRTCCloudDef::TRTCVolumeInfo
Data Fields
String userId userId of the speaker. An empty value indicates the local user.
int volume Volume of the speaker. Value range: 0–100.

◆ com::tencent::trtc::TRTCCloudDef::TRTCSpeedTestResult

class com::tencent::trtc::TRTCCloudDef::TRTCSpeedTestResult

Public Member Functions

String toString ()
 

Data Fields

String ip
 
int quality
 
float upLostRate
 
float downLostRate
 
int rtt
 

Member Function Documentation

◆ toString()

String toString ( )
inline

Field Documentation

◆ downLostRate

float downLostRate

Downstream packet loss rate between 0 and 1.0. For example, 0.2 indicates that 2 data packets may be lost in every 10 packets received from the server.

◆ ip

String ip

Server IP address.

◆ quality

int quality

Network quality, which is tested and calculated based on the internal evaluation algorithm. The better the network, the higher the score.

◆ rtt

int rtt

Delay in milliseconds, which is the round-trip time between the current device and TRTC server. The smaller the value, the better. The normal value range is 10–100 ms.

◆ upLostRate

float upLostRate

Upstream packet loss rate between 0 and 1.0. For example, 0.3 indicates that 3 data packets may be lost in every 10 packets sent to the server.

◆ com::tencent::trtc::TRTCCloudDef::TRTCTexture

class com::tencent::trtc::TRTCCloudDef::TRTCTexture

◆ com::tencent::trtc::TRTCCloudDef::TRTCVideoFrame

class com::tencent::trtc::TRTCCloudDef::TRTCVideoFrame
Data Fields
int height
long timestamp
int width

Field description:** video pixel format public int pixelFormat;

/**Field description:** video data structure type public int bufferType;

/**Field description:** video data when bufferType is TRTCCloudDef#TRTC_VIDEO_PIXEL_FORMAT_Texture_2D, which carries the texture data used for OpenGL rendering. public TRTCTexture texture;

/**Field description:** video data when bufferType is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY, which carries the byte array used for the Java layer. public byte[] data;

/**Field description:** video data when bufferType is TRTCCloudDef#TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER, which carries the Direct Buffer used for the JNI layer. public ByteBuffer buffer;

/****Field description:** video width Recommended value: please enter the width of the video data passed in.

◆ com::tencent::trtc::TRTCCloudDef::TRTCAudioFrame

class com::tencent::trtc::TRTCCloudDef::TRTCAudioFrame

◆ com::tencent::trtc::TRTCCloudDef::TRTCMixUser

class com::tencent::trtc::TRTCCloudDef::TRTCMixUser

Public Member Functions

 TRTCMixUser ()
 
 TRTCMixUser (String userId, int x, int y, int width, int height, int zOrder)
 
 TRTCMixUser (TRTCMixUser original)
 
String toString ()
 

Data Fields

boolean pureAudio
 
int inputType
 

Constructor & Destructor Documentation

◆ TRTCMixUser() [1/3]

TRTCMixUser ( )
inline

◆ TRTCMixUser() [2/3]

TRTCMixUser ( String  userId,
int  x,
int  y,
int  width,
int  height,
int  zOrder 
)
inline

◆ TRTCMixUser() [3/3]

TRTCMixUser ( TRTCMixUser  original)
inline

Member Function Documentation

◆ toString()

String toString ( )
inline

Field Documentation

◆ inputType

int inputType

◆ pureAudio

boolean pureAudio

Field description:** user ID public String userId;

/**Field description:** ID of the room where this audio/video stream is located (an empty value indicates the local room ID) public String roomId;

/**Field description:** specify the X coordinate of this video image in px public int x;

/**Field description:** specify the Y coordinate of this video image in px public int y;

/**Field description:** specify the width of this video image in px public int width;

/**Field description:** specify the height of this video image in px public int height;

/**Field description:** specify the level of this video image (value range: 1–15; the value must be unique) public int zOrder;

/**Field description:** specify whether this video image is the primary stream image (TRTCVideoStreamTypeBig) or substream image (TRTCVideoStreamTypeSub). public int streamType;

/****Field description:** specify whether this stream mixes audio only Recommended value: default value: NO Note: this field has been disused. We recommend you use the new field inputType introduced in v8.5.

◆ com::tencent::trtc::TRTCCloudDef::TRTCTranscodingConfig

class com::tencent::trtc::TRTCCloudDef::TRTCTranscodingConfig

Public Member Functions

 TRTCTranscodingConfig ()
 
 TRTCTranscodingConfig (TRTCTranscodingConfig original)
 
String toString ()
 

Data Fields

int mode
 
int appId
 
int bizId
 
int videoWidth
 
int videoHeight
 
int videoBitrate
 
int videoFramerate
 
int videoGOP
 
int backgroundColor
 
String backgroundImage
 
int audioSampleRate
 
int audioBitrate
 
int audioChannels
 
ArrayList< TRTCMixUsermixUsers
 
String streamId
 

Constructor & Destructor Documentation

◆ TRTCTranscodingConfig() [1/2]

◆ TRTCTranscodingConfig() [2/2]

Member Function Documentation

◆ toString()

String toString ( )
inline

Field Documentation

◆ appId

int appId

◆ audioBitrate

int audioBitrate

◆ audioChannels

int audioChannels

◆ audioSampleRate

int audioSampleRate

◆ backgroundColor

int backgroundColor

◆ backgroundImage

String backgroundImage

◆ bizId

int bizId

◆ mixUsers

ArrayList<TRTCMixUser> mixUsers

◆ mode

int mode

◆ streamId

String streamId

◆ videoBitrate

int videoBitrate

◆ videoFramerate

int videoFramerate

◆ videoGOP

int videoGOP

◆ videoHeight

int videoHeight

◆ videoWidth

int videoWidth

◆ com::tencent::trtc::TRTCCloudDef::TRTCPublishCDNParam

class com::tencent::trtc::TRTCCloudDef::TRTCPublishCDNParam
Data Fields
int appId
int bizId
String url

◆ com::tencent::trtc::TRTCCloudDef::TRTCAudioRecordingParams

class com::tencent::trtc::TRTCCloudDef::TRTCAudioRecordingParams
Data Fields
String filePath
int recordingContent

◆ com::tencent::trtc::TRTCCloudDef::TRTCLocalRecordingParams

class com::tencent::trtc::TRTCCloudDef::TRTCLocalRecordingParams
Data Fields
String filePath

◆ com::tencent::trtc::TRTCCloudDef::TRTCAudioEffectParam

class com::tencent::trtc::TRTCCloudDef::TRTCAudioEffectParam

Public Member Functions

 TRTCAudioEffectParam (int effectId, String path)
 

Data Fields

int effectId
 
int loopCount
 
boolean publish
 
int volume
 

Constructor & Destructor Documentation

◆ TRTCAudioEffectParam()

TRTCAudioEffectParam ( int  effectId,
String  path 
)
inline

Field Documentation

◆ effectId

int effectId

◆ loopCount

int loopCount

Field description:** sound effect file path. Supported file formats include AAC, MP3, and M4A. public String path;

/****Field description:** number of times the sound effect is looped Valid values: 0 or any positive integer. 0 (default) indicates that the sound effect is played once, 1 twice, and so on.

◆ publish

boolean publish

◆ volume

int volume

◆ com::tencent::trtc::TRTCCloudDef::TRTCSwitchRoomConfig

class com::tencent::trtc::TRTCCloudDef::TRTCSwitchRoomConfig

Public Member Functions

 TRTCSwitchRoomConfig ()
 

Data Fields

int roomId
 
String strRoomId
 
String userSig
 
String privateMapKey
 

Constructor & Destructor Documentation

◆ TRTCSwitchRoomConfig()

Field Documentation

◆ privateMapKey

String privateMapKey

◆ roomId

int roomId

◆ strRoomId

String strRoomId

◆ userSig

String userSig

◆ com::tencent::trtc::TRTCCloudDef::TRTCAudioFrameCallbackFormat

class com::tencent::trtc::TRTCCloudDef::TRTCAudioFrameCallbackFormat

Public Member Functions

 TRTCAudioFrameCallbackFormat ()
 

Data Fields

int sampleRate
 
int channel
 
int samplesPerCall
 

Constructor & Destructor Documentation

◆ TRTCAudioFrameCallbackFormat()

Field Documentation

◆ channel

int channel

◆ sampleRate

int sampleRate

◆ samplesPerCall

int samplesPerCall

◆ com::tencent::trtc::TRTCCloudDef::TRTCScreenShareParams

class com::tencent::trtc::TRTCCloudDef::TRTCScreenShareParams
Data Fields
View floatingView

◆ com::tencent::trtc::TRTCCloudDef

class com::tencent::trtc::TRTCCloudDef

Static Public Attributes

static final String TRTC_SDK_VERSION = "0.0.0.0"
 

TRTCVideoResolution

[VIEW] Rendering control that renders the video image

There are many APIs in TRTC that need to manipulate the video image, for which you should specify the video rendering control. On Android, you can use the TXCloudVideoView provided by us as the video rendering control, which supports two rendering schemes: SurfaceView and TextureView.

  • When rendering the local video image, TXCloudVideoView uses SurfaceView preferably. This scheme has better performance, but it does not support animation or transformation effects on the View.
  • When rendering the remote video image, TXCloudVideoView uses TextureView preferably. This scheme is highly flexible and supports animation and transformation effects.

If you want to force the use of a certain scheme, you can write the code as follows: Usage 1. Force the use of TextureView:

TXCloudVideoView localView = findViewById(R.id.trtc_tc_cloud_view_main);
localView.addVideoView(new TextureView(context));
mTRTCCloud.startLocalPreview(true, localView);

Usage 2. Force the use of SurfaceView:

SurfaceView surfaceView = new SurfaceView(this);
TXCloudVideoView localView = new TXCloudVideoView(surfaceView);
mTRTCCloud.startLocalPreview(true, localView);

Video resolution

Here, only the landscape resolution (e.g., 640x360) is defined. If the portrait resolution (e.g., 360x640) needs to be used, Portrait must be selected for TRTCVideoResolutionMode.

static final int TRTC_VIDEO_RESOLUTION_120_120 = 1
 
static final int TRTC_VIDEO_RESOLUTION_160_160 = 3
 
static final int TRTC_VIDEO_RESOLUTION_270_270 = 5
 
static final int TRTC_VIDEO_RESOLUTION_480_480 = 7
 
static final int TRTC_VIDEO_RESOLUTION_160_120 = 50
 
static final int TRTC_VIDEO_RESOLUTION_240_180 = 52
 
static final int TRTC_VIDEO_RESOLUTION_280_210 = 54
 
static final int TRTC_VIDEO_RESOLUTION_320_240 = 56
 
static final int TRTC_VIDEO_RESOLUTION_400_300 = 58
 
static final int TRTC_VIDEO_RESOLUTION_480_360 = 60
 
static final int TRTC_VIDEO_RESOLUTION_640_480 = 62
 
static final int TRTC_VIDEO_RESOLUTION_960_720 = 64
 
static final int TRTC_VIDEO_RESOLUTION_160_90 = 100
 
static final int TRTC_VIDEO_RESOLUTION_256_144 = 102
 
static final int TRTC_VIDEO_RESOLUTION_320_180 = 104
 
static final int TRTC_VIDEO_RESOLUTION_480_270 = 106
 
static final int TRTC_VIDEO_RESOLUTION_640_360 = 108
 
static final int TRTC_VIDEO_RESOLUTION_960_540 = 110
 
static final int TRTC_VIDEO_RESOLUTION_1280_720 = 112
 
static final int TRTC_VIDEO_RESOLUTION_1920_1080 = 114
 

TRTCVideoResolutionMode

Video aspect ratio mode

Only the landscape resolution (e.g., 640x360) is defined in TRTCVideoResolution. If the portrait resolution (e.g., 360x640) needs to be used, Portrait must be selected for TRTCVideoResolutionMode.

static final int TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE = 0
 
static final int TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT = 1
 

TRTCVideoStreamType

Video stream type

TRTC provides three different video streams, including:

  • HD big image: it is generally used to transfer video data from the camera.
  • Smooth small image: it has the same content as the big image, but with lower resolution and bitrate and thus lower definition.
  • Substream image: it is generally used for screen sharing. Only one user in the room is allowed to publish the substream video image at any time, while other users must wait for this user to close the substream before they can publish their own substream.
    Attention
    The SDK does not support enabling the smooth small image alone, which must be enabled together with the big image. It will automatically set the resolution and bitrate of the small image.
static final int TRTC_VIDEO_STREAM_TYPE_BIG = 0
 
static final int TRTC_VIDEO_STREAM_TYPE_SMALL = 1
 
static final int TRTC_VIDEO_STREAM_TYPE_SUB = 2
 
static final int TRTC_VIDEO_RENDER_MODE_FILL = 0
 
static final int TRTC_VIDEO_RENDER_MODE_FIT = 1
 

TRTCVideoRotation

Video image rotation direction

TRTC provides rotation angle setting APIs for local and remote images. The following rotation angles are all clockwise.

static final int TRTC_VIDEO_ROTATION_0 = 0
 
static final int TRTC_VIDEO_ROTATION_90 = 1
 
static final int TRTC_VIDEO_ROTATION_180 = 2
 
static final int TRTC_VIDEO_ROTATION_270 = 3
 

TRTCBeautyStyle

Beauty (skin smoothing) filter algorithm

TRTC has multiple built-in skin smoothing algorithms. You can select the one most suitable for your product.

static final int TRTC_BEAUTY_STYLE_SMOOTH = 0
 
static final int TRTC_BEAUTY_STYLE_NATURE = 1
 
static final int TRTC_BEAUTY_STYLE_PITU = 2
 

TRTCVideoPixelFormat

Video pixel format

TRTC provides custom video capturing and rendering features.

  • For the custom capturing feature, you can use the following interfaceerated values to describe the pixel format of the video you capture.
  • For the custom rendering feature, you can specify the pixel format of the video you expect the SDK to call back.
static final int TRTC_VIDEO_PIXEL_FORMAT_UNKNOWN = 0
 
static final int TRTC_VIDEO_PIXEL_FORMAT_I420 = 1
 
static final int TRTC_VIDEO_PIXEL_FORMAT_Texture_2D = 2
 
static final int TRTC_VIDEO_PIXEL_FORMAT_TEXTURE_EXTERNAL_OES = 3
 
static final int TRTC_VIDEO_PIXEL_FORMAT_NV21 = 4
 
static final int TRTC_VIDEO_PIXEL_FORMAT_RGBA = 5
 

TRTCVideoBufferType

Video data transfer method

For custom capturing and rendering features, you need to use the following interfaceerated values to specify the method of transferring video data:

  • Method 1. This method uses memory buffer to transfer video data. It is efficient on iOS but inefficient on Android. It is the only method supported on Windows currently.
  • Method 2. This method uses texture to transfer video data. It is efficient on both iOS and Android but is not supported on Windows. To use this method, you should have a general familiarity with OpenGL programming.
static final int TRTC_VIDEO_BUFFER_TYPE_UNKNOWN = 0
 
static final int TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER = 1
 
static final int TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY = 2
 
static final int TRTC_VIDEO_BUFFER_TYPE_TEXTURE = 3
 

TRTCVideoMirrorType

Video mirror type

Video mirroring refers to the left-to-right flipping of the video image, especially for the local camera preview image. After mirroring is enabled, it can bring anchors a familiar "look into the mirror" experience.

static final int TRTC_VIDEO_MIRROR_TYPE_AUTO = 0
 
static final int TRTC_VIDEO_MIRROR_TYPE_ENABLE = 1
 
static final int TRTC_VIDEO_MIRROR_TYPE_DISABLE = 2
 

TRTCAppScene

Use cases

TRTC features targeted optimizations for common audio/video application scenarios to meet the differentiated requirements in various verticals. The main scenarios can be divided into the following two categories:

  • Live streaming scenario (LIVE): including LIVE (audio + video) and VoiceChatRoom (pure audio). In the live streaming scenario, users are divided into two roles: "anchor" and "audience". A single room can sustain up to 100,000 concurrent online users. This is suitable for live streaming to a large audience.
  • Real-Time scenario (RTC): including VideoCall (audio + video) and AudioCall (pure audio). In the real-time scenario, there is no role difference between users, but a single room can sustain only up to 300 concurrent online users. This is suitable for small-scale real-time communication.
static final int TRTC_APP_SCENE_VIDEOCALL = 0
 
static final int TRTC_APP_SCENE_LIVE = 1
 
static final int TRTC_APP_SCENE_AUDIOCALL = 2
 
static final int TRTC_APP_SCENE_VOICE_CHATROOM = 3
 

TRTCRoleType

Role

Role is applicable only to live streaming scenarios (TRTCAppSceneLIVE and TRTCAppSceneVoiceChatRoom). Users are divided into two roles:

  • Anchor, who can publish their audio/video streams. There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room.
  • Audience, who can only listen to or watch audio/video streams of anchors in the room. If they want to publish their streams, they need to switch to the "anchor" role first through switchRole. One room can sustain up to 100,000 concurrent online users in the audience role.
static final int TRTCRoleAnchor = 20
 
static final int TRTCRoleAudience = 21
 

TRTCQosControlMode

QoS control mode (disused)

static final int VIDEO_QOS_CONTROL_CLIENT = 0
 
static final int VIDEO_QOS_CONTROL_SERVER = 1
 

TRTCVideoQosPreference

Image quality preference

TRTC has two control modes in weak network environments: "ensuring clarity" and "ensuring smoothness". Both modes will give priority to the transfer of audio data.

static final int TRTC_VIDEO_QOS_PREFERENCE_SMOOTH = 1
 
static final int TRTC_VIDEO_QOS_PREFERENCE_CLEAR = 2
 

TRTCQuality

Network quality

TRTC evaluates the current network quality once every two seconds. The evaluation results are divided into six levels: Excellent indicates the best, and Down indicates the worst.

static final int TRTC_QUALITY_UNKNOWN = 0
 
static final int TRTC_QUALITY_Excellent = 1
 
static final int TRTC_QUALITY_Good = 2
 
static final int TRTC_QUALITY_Poor = 3
 
static final int TRTC_QUALITY_Bad = 4
 
static final int TRTC_QUALITY_Vbad = 5
 
static final int TRTC_QUALITY_Down = 6
 

TRTCAVStatusType

Audio/Video playback status

This interfaceerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the current video status.

static final int TRTCAVStatusStopped = 0
 
static final int TRTCAVStatusPlaying = 1
 
static final int TRTCAVStatusLoading = 2
 

TRTCAVStatusChangeReason

Reasons for playback status changes

This interfaceerated type is used in the video status changed API onRemoteVideoStatusUpdated to specify the reason for the current video status change.

static final int TRTCAVStatusChangeReasonInternal = 0
 
static final int TRTCAVStatusChangeReasonBufferingBegin = 1
 
static final int TRTCAVStatusChangeReasonBufferingEnd = 2
 
static final int TRTCAVStatusChangeReasonLocalStarted = 3
 
static final int TRTCAVStatusChangeReasonLocalStopped = 4
 
static final int TRTCAVStatusChangeReasonRemoteStarted = 5
 
static final int TRTCAVStatusChangeReasonRemoteStopped = 6
 

TRTCAudioSampleRate

Audio sample rate

The audio sample rate is used to measure the audio fidelity. A higher sample rate indicates higher fidelity. If there is music in the use case, TRTCAudioSampleRate48000 is recommended.

static final int TRTCAudioSampleRate16000 = 16000
 
static final int TRTCAudioSampleRate32000 = 32000
 
static final int TRTCAudioSampleRate44100 = 44100
 
static final int TRTCAudioSampleRate48000 = 48000
 

TRTCAudioQuality

Sound quality

TRTC provides three well-tuned modes to meet the differentiated requirements for sound quality in various verticals:

  • Speech mode (Speech): it is suitable for application scenarios that focus on human communication. In this mode, the audio transfer is more resistant, and TRTC uses various voice processing technologies to ensure the optimal smoothness even in weak network environments.
  • Music mode (Music): it is suitable for scenarios with demanding requirements for music. In this mode, the amount of transferred audio data is very large, and TRTC uses various technologies to ensure that the high-fidelity details of music signals can be restored in each frequency band.
  • Default mode (Default): it is between Speech and Music. In this mode, the reproduction of music is better than that in Speech mode, and the amount of transferred data is much lower than that in Music mode; therefore, this mode has good adaptability to various scenarios.
static final int TRTC_AUDIO_QUALITY_SPEECH = 1
 
static final int TRTC_AUDIO_QUALITY_DEFAULT = 2
 
static final int TRTC_AUDIO_QUALITY_MUSIC = 3
 

TRTCAudioRoute

Audio route (i.e., audio playback mode)

"Audio route" determines whether the sound is played back from the speaker or receiver of a mobile device; therefore, this API is applicable only to mobile devices such as phones. Generally, a phone has two speakers: one is the receiver at the top, and the other is the stereo speaker at the bottom.

  • If the audio route is set to the receiver, the volume is relatively low, and the sound can be heard clearly only when the phone is put near the ear. This mode has a high level of privacy and is suitable for answering calls.
  • If the audio route is set to the speaker, the volume is relatively high, so there is no need to put the phone near the ear. Therefore, this mode can implement the "hands-free" feature.
static final int TRTC_AUDIO_ROUTE_SPEAKER = 0
 
static final int TRTC_AUDIO_ROUTE_EARPIECE = 1
 

TRTCReverbType

Audio reverb mode

This interfaceerated value is used to set the audio reverb mode in the live streaming scenario and is often used in show live streaming.

static final int TRTC_REVERB_TYPE_0 = 0
 
static final int TRTC_REVERB_TYPE_1 = 1
 
static final int TRTC_REVERB_TYPE_2 = 2
 
static final int TRTC_REVERB_TYPE_3 = 3
 
static final int TRTC_REVERB_TYPE_4 = 4
 
static final int TRTC_REVERB_TYPE_5 = 5
 
static final int TRTC_REVERB_TYPE_6 = 6
 
static final int TRTC_REVERB_TYPE_7 = 7
 

TRTCVoiceChangerType

Voice changing type

This interfaceerated value is used to set the voice changing mode in the live streaming scenario and is often used in show live streaming.

static final int TRTC_VOICE_CHANGER_TYPE_0 = 0
 
static final int TRTC_VOICE_CHANGER_TYPE_1 = 1
 
static final int TRTC_VOICE_CHANGER_TYPE_2 = 2
 
static final int TRTC_VOICE_CHANGER_TYPE_3 = 3
 
static final int TRTC_VOICE_CHANGER_TYPE_4 = 4
 
static final int TRTC_VOICE_CHANGER_TYPE_5 = 5
 
static final int TRTC_VOICE_CHANGER_TYPE_6 = 6
 
static final int TRTC_VOICE_CHANGER_TYPE_7 = 7
 
static final int TRTC_VOICE_CHANGER_TYPE_8 = 8
 
static final int TRTC_VOICE_CHANGER_TYPE_9 = 9
 
static final int TRTC_VOICE_CHANGER_TYPE_10 = 10
 
static final int TRTC_VOICE_CHANGER_TYPE_11 = 11
 

TRTCSystemVolumeType

System volume type (only for mobile devices)

Smartphones usually have two types of system volume: call volume and media volume.

  • Call volume is designed for call scenarios. It comes with acoustic echo cancellation (AEC) and supports audio capturing by Bluetooth earphones, but its sound quality is average. If you cannot turn the volume down to 0 (i.e., mute the phone) using the volume buttons, then your phone is using call volume.
  • Media volume is designed for media scenarios such as music playback. AEC does not work when media volume is used, and Bluetooth earphones cannot be used for audio capturing. However, media volume delivers better music listening experience. If you are able to mute your phone using the volume buttons, then your phone is using media volume. The SDK offers three system volume control modes: auto, call volume, and media volume.
static final int TRTCSystemVolumeTypeAuto = 0
 
static final int TRTCSystemVolumeTypeMedia = 1
 
static final int TRTCSystemVolumeTypeVOIP = 2
 

TRTCAudioFrameFormat

Audio frame content format

static final int TRTC_AUDIO_FRAME_FORMAT_PCM = 1
 

TRTCAudioCapabilityType

Audio capability type supported by the system (only for Android devices)

The SDK currently provides two types of system audio capabilities to query whether they are supported: low-latency chorus capability and low-latency earmonitor capability.

static final int TRTCAudioCapabilityLowLatencyChorus = 1
 
static final int TRTCAudioCapabilityLowLatencyEarMonitor = 2
 

TRTCLogLevel

Log level

Different log levels indicate different levels of details and number of logs. We recommend you set the log level to TRTCLogLevelInfo generally.

static final int TRTC_LOG_LEVEL_VERBOSE = 0
 
static final int TRTC_LOG_LEVEL_DEBUG = 1
 
static final int TRTC_LOG_LEVEL_INFO = 2
 
static final int TRTC_LOG_LEVEL_WARN = 3
 
static final int TRTC_LOG_LEVEL_ERROR = 4
 
static final int TRTC_LOG_LEVEL_FATAL = 5
 
static final int TRTC_LOG_LEVEL_NULL = 6
 

TRTCGSensorMode

G-sensor switch (for mobile devices only)

static final int TRTC_GSENSOR_MODE_DISABLE = 0
 
static final int TRTC_GSENSOR_MODE_UIAUTOLAYOUT = 1
 
static final int TRTC_GSENSOR_MODE_UIFIXLAYOUT = 2
 

TRTCTranscodingConfigMode

Layout mode of On-Cloud MixTranscoding

TRTC's On-Cloud MixTranscoding service can mix multiple audio/video streams in the room into one stream. Therefore, you need to specify the layout scheme of the video images. The following layout modes are provided:

static final int TRTC_TranscodingConfigMode_Unknown = 0
 
static final int TRTC_TranscodingConfigMode_Manual = 1
 
static final int TRTC_TranscodingConfigMode_Template_PureAudio = 2
 
static final int TRTC_TranscodingConfigMode_Template_PresetLayout = 3
 
static final int TRTC_TranscodingConfigMode_Template_ScreenSharing = 4
 

TRTCRecordType

Media recording type

This interfaceerated type is used in the local media recording API startLocalRecording to specify whether to record audio/video files or pure audio files.

static final int TRTC_RECORD_TYPE_AUDIO = 0
 
static final int TRTC_RECORD_TYPE_VIDEO = 1
 
static final int TRTC_RECORD_TYPE_BOTH = 2
 

TRTCMixInputType

Stream mix input type

static final int TRTC_MixInputType_Undefined = 0
 
static final int TRTC_MixInputType_AudioVideo = 1
 
static final int TRTC_MixInputType_PureVideo = 2
 
static final int TRTC_MixInputType_PureAudio = 3
 

TRTCDebugViewLevel

Do not display debugging information in the rendering control

static final int TRTC_DEBUG_VIEW_LEVEL_GONE = 0
 
static final int TRTC_DEBUG_VIEW_LEVEL_STATUS = 1
 
static final int TRTC_DEBUG_VIEW_LEVEL_ALL = 2
 

TRTCAudioRecordingContent

Audio recording content type

This interfaceerated type is used in the audio recording API startAudioRecording to specify the content of the recorded audio.

static final int TRTC_AudioRecordingContent_All = 0
 
static final int TRTC_AudioRecordingContent_Local = 1
 
static final int TRTC_AudioRecordingContent_Remote = 2
 

Field Documentation

◆ TRTC_APP_SCENE_AUDIOCALL

final int TRTC_APP_SCENE_AUDIOCALL = 2
static

Audio call scenario, where the SPEECH sound quality is used by default. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously. Use cases: [one-to-one audio call], [audio conferencing with up to 300 participants], [audio chat], [online Werewolf], etc.

◆ TRTC_APP_SCENE_LIVE

final int TRTC_APP_SCENE_LIVE = 1
static

In the interactive video live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms. Use cases: [low-latency interactive live streaming], [big class], [anchor competition], [video dating room], [online interactive classroom], [remote training], [large-scale conferencing], etc.

Note
In this scenario, you must use the role field in TRTCParams to specify the role of the current user.

◆ TRTC_APP_SCENE_VIDEOCALL

final int TRTC_APP_SCENE_VIDEOCALL = 0
static

In the video call scenario, 720p and 1080p HD image quality is supported. A single room can sustain up to 300 concurrent online users, and up to 50 of them can speak simultaneously. Use cases: [one-to-one video call], [video conferencing with up to 300 participants], [online medical diagnosis], [small class], [video interview], etc.

◆ TRTC_APP_SCENE_VOICE_CHATROOM

final int TRTC_APP_SCENE_VOICE_CHATROOM = 3
static

In the interactive audio live streaming scenario, mic can be turned on/off smoothly without waiting for switchover, and the anchor latency is as low as less than 300 ms. Live streaming to hundreds of thousands of concurrent users in the audience role is supported with the playback latency down to 1,000 ms. Use cases: [audio club], [online karaoke room], [music live room], [FM radio], etc.

Note
In this scenario, you must use the role field in TRTCParams to specify the role of the current user.

◆ TRTC_AUDIO_FRAME_FORMAT_PCM

final int TRTC_AUDIO_FRAME_FORMAT_PCM = 1
static

Audio data in PCM format.

◆ TRTC_AUDIO_QUALITY_DEFAULT

final int TRTC_AUDIO_QUALITY_DEFAULT = 2
static

Default mode: sample rate: 48 kHz; mono channel; bitrate: 50 Kbps. This mode is between the speech mode and the music mode as the default mode in the SDK and is recommended.

◆ TRTC_AUDIO_QUALITY_MUSIC

final int TRTC_AUDIO_QUALITY_MUSIC = 3
static

Music mode: sample rate: 48 kHz; full-band stereo; bitrate: 128 Kbps. This mode is suitable for scenarios where Hi-Fi music transfer is required, such as online karaoke and music live streaming.

◆ TRTC_AUDIO_QUALITY_SPEECH

final int TRTC_AUDIO_QUALITY_SPEECH = 1
static

Speech mode: sample rate: 16 kHz; mono channel; bitrate: 16 Kbps. This mode has the best resistance among all modes and is suitable for audio call scenarios, such as online meeting and audio call.

◆ TRTC_AUDIO_ROUTE_EARPIECE

final int TRTC_AUDIO_ROUTE_EARPIECE = 1
static

Earpiece: the receiver at the top is used for playback. With relatively low volume, it is suitable for call scenarios that require privacy.

◆ TRTC_AUDIO_ROUTE_SPEAKER

final int TRTC_AUDIO_ROUTE_SPEAKER = 0
static

Speakerphone: the speaker at the bottom is used for playback (hands-free). With relatively high volume, it is used to play music out loud.

◆ TRTC_AudioRecordingContent_All

final int TRTC_AudioRecordingContent_All = 0
static

Record both local and remote audio.

◆ TRTC_AudioRecordingContent_Local

final int TRTC_AudioRecordingContent_Local = 1
static

Record local audio only.

◆ TRTC_AudioRecordingContent_Remote

final int TRTC_AudioRecordingContent_Remote = 2
static

Record remote audio only.

◆ TRTC_BEAUTY_STYLE_NATURE

final int TRTC_BEAUTY_STYLE_NATURE = 1
static

Natural style, which retains more facial details for more natural effect and is suitable for most live streaming use cases.

◆ TRTC_BEAUTY_STYLE_PITU

final int TRTC_BEAUTY_STYLE_PITU = 2
static

Pitu style, which is provided by YouTu Lab. Its skin smoothing effect is between the smooth style and the natural style, that is, it retains more skin details than the smooth style and has a higher skin smoothing degree than the natural style.

◆ TRTC_BEAUTY_STYLE_SMOOTH

final int TRTC_BEAUTY_STYLE_SMOOTH = 0
static

Smooth style, which uses a more radical algorithm for more obvious effect and is suitable for show live streaming.

◆ TRTC_DEBUG_VIEW_LEVEL_ALL

final int TRTC_DEBUG_VIEW_LEVEL_ALL = 2
static

Display audio/video statistics and key historical events in the rendering control.

◆ TRTC_DEBUG_VIEW_LEVEL_GONE

final int TRTC_DEBUG_VIEW_LEVEL_GONE = 0
static

◆ TRTC_DEBUG_VIEW_LEVEL_STATUS

final int TRTC_DEBUG_VIEW_LEVEL_STATUS = 1
static

Display audio/video statistics in the rendering control.

◆ TRTC_GSENSOR_MODE_DISABLE

final int TRTC_GSENSOR_MODE_DISABLE = 0
static

Do not adapt to G-sensor orientation This mode is the default value for desktop platforms. In this mode, the video image published by the current user is not affected by the change of the G-sensor orientation.

◆ TRTC_GSENSOR_MODE_UIAUTOLAYOUT

final int TRTC_GSENSOR_MODE_UIAUTOLAYOUT = 1
static

Adapt to G-sensor orientation This mode is the default value on mobile platforms. In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, while the orientation of the local preview image remains unchanged. One of the adaptation modes currently supported by the SDK is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees. If the UI layer of your application has enabled G-sensor adaption, we recommend you use the UIFixLayout mode.

◆ TRTC_GSENSOR_MODE_UIFIXLAYOUT

final int TRTC_GSENSOR_MODE_UIFIXLAYOUT = 2
static

Adapt to G-sensor orientation In this mode, the video image published by the current user is adjusted according to the G-sensor orientation, and the local preview image will also be rotated accordingly. One of the features currently supported is as follows: when the phone or tablet is upside down, in order to ensure that the screen orientation seen by the remote user is normal, the SDK will automatically rotate the published video image by 180 degrees. If the UI layer of your application doesn't support G-sensor adaption, but you want the video image in the SDK to adapt to the G-sensor orientation, we recommend you use the UIFixLayout mode.

◆ TRTC_LOG_LEVEL_DEBUG

final int TRTC_LOG_LEVEL_DEBUG = 1
static

Output logs at the DEBUG, INFO, WARNING, ERROR, and FATAL levels.

◆ TRTC_LOG_LEVEL_ERROR

final int TRTC_LOG_LEVEL_ERROR = 4
static

Output logs at the ERROR and FATAL levels.

◆ TRTC_LOG_LEVEL_FATAL

final int TRTC_LOG_LEVEL_FATAL = 5
static

Output logs at the FATAL level.

◆ TRTC_LOG_LEVEL_INFO

final int TRTC_LOG_LEVEL_INFO = 2
static

Output logs at the INFO, WARNING, ERROR, and FATAL levels.

◆ TRTC_LOG_LEVEL_NULL

final int TRTC_LOG_LEVEL_NULL = 6
static

Do not output any SDK logs.

◆ TRTC_LOG_LEVEL_VERBOSE

final int TRTC_LOG_LEVEL_VERBOSE = 0
static

Output logs at all levels.

◆ TRTC_LOG_LEVEL_WARN

final int TRTC_LOG_LEVEL_WARN = 3
static

Output logs at the WARNING, ERROR, and FATAL levels.

◆ TRTC_MixInputType_AudioVideo

final int TRTC_MixInputType_AudioVideo = 1
static

Mix both audio and video.

◆ TRTC_MixInputType_PureAudio

final int TRTC_MixInputType_PureAudio = 3
static

Mix audio only.

◆ TRTC_MixInputType_PureVideo

final int TRTC_MixInputType_PureVideo = 2
static

Mix video only.

◆ TRTC_MixInputType_Undefined

final int TRTC_MixInputType_Undefined = 0
static

Unspecified. The SDK will determine the stream mix input type according to the value of the pureAudio parameter.

◆ TRTC_QUALITY_Bad

final int TRTC_QUALITY_Bad = 4
static

The current network is bad.

◆ TRTC_QUALITY_Down

final int TRTC_QUALITY_Down = 6
static

The current network cannot meet the minimum requirements of TRTC.

◆ TRTC_QUALITY_Excellent

final int TRTC_QUALITY_Excellent = 1
static

The current network is excellent.

◆ TRTC_QUALITY_Good

final int TRTC_QUALITY_Good = 2
static

The current network is good.

◆ TRTC_QUALITY_Poor

final int TRTC_QUALITY_Poor = 3
static

The current network is fair.

◆ TRTC_QUALITY_UNKNOWN

final int TRTC_QUALITY_UNKNOWN = 0
static

Undefined.

◆ TRTC_QUALITY_Vbad

final int TRTC_QUALITY_Vbad = 5
static

The current network is very bad.

◆ TRTC_RECORD_TYPE_AUDIO

final int TRTC_RECORD_TYPE_AUDIO = 0
static

Record audio only.

◆ TRTC_RECORD_TYPE_BOTH

final int TRTC_RECORD_TYPE_BOTH = 2
static

Record both audio and video.

◆ TRTC_RECORD_TYPE_VIDEO

final int TRTC_RECORD_TYPE_VIDEO = 1
static

Record video only.

◆ TRTC_REVERB_TYPE_0

final int TRTC_REVERB_TYPE_0 = 0
static

Disable reverb.

◆ TRTC_REVERB_TYPE_1

final int TRTC_REVERB_TYPE_1 = 1
static

KTV.

◆ TRTC_REVERB_TYPE_2

final int TRTC_REVERB_TYPE_2 = 2
static

Small room.

◆ TRTC_REVERB_TYPE_3

final int TRTC_REVERB_TYPE_3 = 3
static

Hall.

◆ TRTC_REVERB_TYPE_4

final int TRTC_REVERB_TYPE_4 = 4
static

Deep.

◆ TRTC_REVERB_TYPE_5

final int TRTC_REVERB_TYPE_5 = 5
static

Resonant.

◆ TRTC_REVERB_TYPE_6

final int TRTC_REVERB_TYPE_6 = 6
static

Metallic.

◆ TRTC_REVERB_TYPE_7

final int TRTC_REVERB_TYPE_7 = 7
static

Husky.

◆ TRTC_SDK_VERSION

final String TRTC_SDK_VERSION = "0.0.0.0"
static

◆ TRTC_TranscodingConfigMode_Manual

final int TRTC_TranscodingConfigMode_Manual = 1
static

Manual layout mode In this mode, you need to specify the precise position of each video image. This mode has the highest degree of freedom, but its ease of use is the worst:

  • You need to enter all the parameters in TRTCTranscodingConfig, including the position coordinates of each video image (TRTCMixUser).
  • You need to listen on the onUserVideoAvailable() and onUserAudioAvailable() event callbacks in TRTCCloudDelegate and constantly adjust the mixUsers parameter according to the audio/video status of each user with mic on in the current room.

◆ TRTC_TranscodingConfigMode_Template_PresetLayout

final int TRTC_TranscodingConfigMode_Template_PresetLayout = 3
static

Preset layout mode This is the most popular layout mode, because it allows you to set the position of each video image in advance through placeholders, and then the SDK automatically adjusts it dynamically according to the number of video images in the room. In this mode, you still need to set the mixUsers parameter, but you can set userId as a "placeholder". Placeholder values include:

  • "$PLACE_HOLDER_REMOTE$": image of remote user. Multiple images can be set.
  • "$PLACE_HOLDER_LOCAL_MAIN$": local camera image. Only one image can be set.
  • "$PLACE_HOLDER_LOCAL_SUB$": local screen sharing image. Only one image can be set. In this mode, you don't need to listen on the onUserVideoAvailable() and onUserAudioAvailable() callbacks in TRTCCloudDelegate to make real-time adjustments. Instead, you only need to call setMixTranscodingConfig() once after successful room entry. Then, the SDK will automatically populate the placeholders you set with real userId values.

◆ TRTC_TranscodingConfigMode_Template_PureAudio

final int TRTC_TranscodingConfigMode_Template_PureAudio = 2
static

Pure audio mode This mode is suitable for pure audio scenarios such as audio call (AudioCall) and audio chat room (VoiceChatRoom).

  • You only need to set it once through the setMixTranscodingConfig() API after room entry, and then the SDK will automatically mix the audio of all mic-on users in the room into the current user's live stream.
  • You don't need to set the mixUsers parameter in TRTCTranscodingConfig; instead, you only need to set the audioSampleRate, audioBitrate and audioChannels parameters.

◆ TRTC_TranscodingConfigMode_Template_ScreenSharing

final int TRTC_TranscodingConfigMode_Template_ScreenSharing = 4
static

Screen sharing mode This mode is suitable for screen sharing-based use cases such as online education and supported only by the SDKs for Windows and macOS. In this mode, the SDK will first build a canvas according to the target resolution you set (through the videoWidth and videoHeight parameters).

  • Before the teacher enables screen sharing, the SDK will scale up the teacher's camera image and draw it onto the canvas.
  • After the teacher enables screen sharing, the SDK will draw the video image shared on the screen onto the same canvas. The purpose of this layout mode is to ensure consistency in the output resolution of the mixtranscoding module and avoid problems with blurred screen during course replay and webpage playback (web players don't support adjustable resolution). Meanwhile, the audio of mic-on students will be mixed into the teacher's audio/video stream by default. br> Video content is primarily the shared screen in teaching mode, and it is a waste of bandwidth to transfer camera image and screen image at the same time. Therefore, the recommended practice is to directly draw the camera image onto the current screen through the setLocalVideoRenderCallback API. In this mode, you don't need to set the mixUsers parameter in TRTCTranscodingConfig, and the SDK will not mix students' images so as not to interfere with the screen sharing effect. br> You can set width x height in TRTCTranscodingConfig to 0 px x 0 px, and the SDK will automatically calculate a suitable resolution based on the aspect ratio of the user's current screen.
  • If the teacher's current screen width is less than or equal to 1920 px, the SDK will use the actual resolution of the teacher's current screen.
  • If the teacher's current screen width is greater than 1920 px, the SDK will select one of the three resolutions of 1920x1080 (16:9), 1920x1200 (16:10), and 1920x1440 (4:3) according to the current screen aspect ratio.

◆ TRTC_TranscodingConfigMode_Unknown

final int TRTC_TranscodingConfigMode_Unknown = 0
static

Undefined.

◆ TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY

final int TRTC_VIDEO_BUFFER_TYPE_BYTE_ARRAY = 2
static

Use memory buffer to transfer video data. iOS: more compact memory block in NSData type after additional processing; Android: byte[] for Java layer. This transfer method has a lower efficiency than other methods.

◆ TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER

final int TRTC_VIDEO_BUFFER_TYPE_BYTE_BUFFER = 1
static

Use memory buffer to transfer video data. iOS: PixelBuffer; Android: Direct Buffer for JNI layer; Windows: memory data block.

◆ TRTC_VIDEO_BUFFER_TYPE_TEXTURE

final int TRTC_VIDEO_BUFFER_TYPE_TEXTURE = 3
static

Use texture to transfer video data.

◆ TRTC_VIDEO_BUFFER_TYPE_UNKNOWN

final int TRTC_VIDEO_BUFFER_TYPE_UNKNOWN = 0
static

Undefined transfer method.

◆ TRTC_VIDEO_MIRROR_TYPE_AUTO

final int TRTC_VIDEO_MIRROR_TYPE_AUTO = 0
static

Auto mode: mirror the front camera's image but not the rear camera's image (for mobile devices only).

◆ TRTC_VIDEO_MIRROR_TYPE_DISABLE

final int TRTC_VIDEO_MIRROR_TYPE_DISABLE = 2
static

Disable mirroring for both the front and rear cameras.

◆ TRTC_VIDEO_MIRROR_TYPE_ENABLE

final int TRTC_VIDEO_MIRROR_TYPE_ENABLE = 1
static

Mirror the images of both the front and rear cameras.

◆ TRTC_VIDEO_PIXEL_FORMAT_I420

final int TRTC_VIDEO_PIXEL_FORMAT_I420 = 1
static

YUV420P (I420) format.

◆ TRTC_VIDEO_PIXEL_FORMAT_NV21

final int TRTC_VIDEO_PIXEL_FORMAT_NV21 = 4
static

NV21 format.

◆ TRTC_VIDEO_PIXEL_FORMAT_RGBA

final int TRTC_VIDEO_PIXEL_FORMAT_RGBA = 5
static

RGBA format.

◆ TRTC_VIDEO_PIXEL_FORMAT_Texture_2D

final int TRTC_VIDEO_PIXEL_FORMAT_Texture_2D = 2
static

OpenGL 2D texture format.

◆ TRTC_VIDEO_PIXEL_FORMAT_TEXTURE_EXTERNAL_OES

final int TRTC_VIDEO_PIXEL_FORMAT_TEXTURE_EXTERNAL_OES = 3
static

OES external texture format (for Android)

◆ TRTC_VIDEO_PIXEL_FORMAT_UNKNOWN

final int TRTC_VIDEO_PIXEL_FORMAT_UNKNOWN = 0
static

Undefined format.

◆ TRTC_VIDEO_QOS_PREFERENCE_CLEAR

final int TRTC_VIDEO_QOS_PREFERENCE_CLEAR = 2
static

Ensuring clarity (default value): in this mode, when the current network is unable to transfer a clear and smooth video image, the clarity of the image will be given priority, but there will be lags.

◆ TRTC_VIDEO_QOS_PREFERENCE_SMOOTH

final int TRTC_VIDEO_QOS_PREFERENCE_SMOOTH = 1
static

Ensuring smoothness: in this mode, when the current network is unable to transfer a clear and smooth video image, the smoothness of the image will be given priority, but there will be blurs.

◆ TRTC_VIDEO_RENDER_MODE_FILL

final int TRTC_VIDEO_RENDER_MODE_FILL = 0
static

Fill mode: the video image will be centered and scaled to fill the entire display area, where parts that exceed the area will be cropped. The displayed image may be incomplete in this mode.

Video image fill mode

If the aspect ratio of the video display area is not equal to that of the video image, you need to specify the fill mode:

◆ TRTC_VIDEO_RENDER_MODE_FIT

final int TRTC_VIDEO_RENDER_MODE_FIT = 1
static

Fit mode: the video image will be scaled based on its long side to fit the display area, where the short side will be filled with black bars. The displayed image is complete in this mode, but there may be black bars.

◆ TRTC_VIDEO_RESOLUTION_120_120

final int TRTC_VIDEO_RESOLUTION_120_120 = 1
static

Aspect ratio: 1:1; resolution: 120x120; recommended bitrate (VideoCall): 80 Kbps; recommended bitrate (LIVE): 120 Kbps.

◆ TRTC_VIDEO_RESOLUTION_1280_720

final int TRTC_VIDEO_RESOLUTION_1280_720 = 112
static

Aspect ratio: 16:9; resolution: 1280x720; recommended bitrate (VideoCall): 1200 Kbps; recommended bitrate (LIVE): 1800 Kbps.

◆ TRTC_VIDEO_RESOLUTION_160_120

final int TRTC_VIDEO_RESOLUTION_160_120 = 50
static

Aspect ratio: 4:3; resolution: 160x120; recommended bitrate (VideoCall): 100 Kbps; recommended bitrate (LIVE): 150 Kbps.

◆ TRTC_VIDEO_RESOLUTION_160_160

final int TRTC_VIDEO_RESOLUTION_160_160 = 3
static

Aspect ratio: 1:1; resolution: 160x160; recommended bitrate (VideoCall): 100 Kbps; recommended bitrate (LIVE): 150 Kbps.

◆ TRTC_VIDEO_RESOLUTION_160_90

final int TRTC_VIDEO_RESOLUTION_160_90 = 100
static

Aspect ratio: 16:9; resolution: 160x90; recommended bitrate (VideoCall): 150 Kbps; recommended bitrate (LIVE): 250 Kbps.

◆ TRTC_VIDEO_RESOLUTION_1920_1080

final int TRTC_VIDEO_RESOLUTION_1920_1080 = 114
static

Aspect ratio: 16:9; resolution: 1920x1080; recommended bitrate (VideoCall): 2000 Kbps; recommended bitrate (LIVE): 3000 Kbps.

◆ TRTC_VIDEO_RESOLUTION_240_180

final int TRTC_VIDEO_RESOLUTION_240_180 = 52
static

Aspect ratio: 4:3; resolution: 240x180; recommended bitrate (VideoCall): 150 Kbps; recommended bitrate (LIVE): 250 Kbps.

◆ TRTC_VIDEO_RESOLUTION_256_144

final int TRTC_VIDEO_RESOLUTION_256_144 = 102
static

Aspect ratio: 16:9; resolution: 256x144; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.

◆ TRTC_VIDEO_RESOLUTION_270_270

final int TRTC_VIDEO_RESOLUTION_270_270 = 5
static

Aspect ratio: 1:1; resolution: 270x270; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.

◆ TRTC_VIDEO_RESOLUTION_280_210

final int TRTC_VIDEO_RESOLUTION_280_210 = 54
static

Aspect ratio: 4:3; resolution: 280x210; recommended bitrate (VideoCall): 200 Kbps; recommended bitrate (LIVE): 300 Kbps.

◆ TRTC_VIDEO_RESOLUTION_320_180

final int TRTC_VIDEO_RESOLUTION_320_180 = 104
static

Aspect ratio: 16:9; resolution: 320x180; recommended bitrate (VideoCall): 250 Kbps; recommended bitrate (LIVE): 400 Kbps.

◆ TRTC_VIDEO_RESOLUTION_320_240

final int TRTC_VIDEO_RESOLUTION_320_240 = 56
static

Aspect ratio: 4:3; resolution: 320x240; recommended bitrate (VideoCall): 250 Kbps; recommended bitrate (LIVE): 375 Kbps.

◆ TRTC_VIDEO_RESOLUTION_400_300

final int TRTC_VIDEO_RESOLUTION_400_300 = 58
static

Aspect ratio: 4:3; resolution: 400x300; recommended bitrate (VideoCall): 300 Kbps; recommended bitrate (LIVE): 450 Kbps.

◆ TRTC_VIDEO_RESOLUTION_480_270

final int TRTC_VIDEO_RESOLUTION_480_270 = 106
static

Aspect ratio: 16:9; resolution: 480x270; recommended bitrate (VideoCall): 350 Kbps; recommended bitrate (LIVE): 550 Kbps.

◆ TRTC_VIDEO_RESOLUTION_480_360

final int TRTC_VIDEO_RESOLUTION_480_360 = 60
static

Aspect ratio: 4:3; resolution: 480x360; recommended bitrate (VideoCall): 400 Kbps; recommended bitrate (LIVE): 600 Kbps.

◆ TRTC_VIDEO_RESOLUTION_480_480

final int TRTC_VIDEO_RESOLUTION_480_480 = 7
static

Aspect ratio: 1:1; resolution: 480x480; recommended bitrate (VideoCall): 350 Kbps; recommended bitrate (LIVE): 500 Kbps.

◆ TRTC_VIDEO_RESOLUTION_640_360

final int TRTC_VIDEO_RESOLUTION_640_360 = 108
static

Aspect ratio: 16:9; resolution: 640x360; recommended bitrate (VideoCall): 500 Kbps; recommended bitrate (LIVE): 900 Kbps.

◆ TRTC_VIDEO_RESOLUTION_640_480

final int TRTC_VIDEO_RESOLUTION_640_480 = 62
static

Aspect ratio: 4:3; resolution: 640x480; recommended bitrate (VideoCall): 600 Kbps; recommended bitrate (LIVE): 900 Kbps.

◆ TRTC_VIDEO_RESOLUTION_960_540

final int TRTC_VIDEO_RESOLUTION_960_540 = 110
static

Aspect ratio: 16:9; resolution: 960x540; recommended bitrate (VideoCall): 850 Kbps; recommended bitrate (LIVE): 1300 Kbps.

◆ TRTC_VIDEO_RESOLUTION_960_720

final int TRTC_VIDEO_RESOLUTION_960_720 = 64
static

Aspect ratio: 4:3; resolution: 960x720; recommended bitrate (VideoCall): 1000 Kbps; recommended bitrate (LIVE): 1500 Kbps.

◆ TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE

final int TRTC_VIDEO_RESOLUTION_MODE_LANDSCAPE = 0
static

Landscape resolution, such as TRTCVideoResolution_640_360 + TRTCVideoResolutionModeLandscape = 640x360.

◆ TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT

final int TRTC_VIDEO_RESOLUTION_MODE_PORTRAIT = 1
static

Portrait resolution, such as TRTCVideoResolution_640_360 + TRTCVideoResolutionModePortrait = 360x640.

◆ TRTC_VIDEO_ROTATION_0

final int TRTC_VIDEO_ROTATION_0 = 0
static

No rotation.

◆ TRTC_VIDEO_ROTATION_180

final int TRTC_VIDEO_ROTATION_180 = 2
static

Clockwise rotation by 180 degrees.

◆ TRTC_VIDEO_ROTATION_270

final int TRTC_VIDEO_ROTATION_270 = 3
static

Clockwise rotation by 270 degrees.

◆ TRTC_VIDEO_ROTATION_90

final int TRTC_VIDEO_ROTATION_90 = 1
static

Clockwise rotation by 90 degrees.

◆ TRTC_VIDEO_STREAM_TYPE_BIG

final int TRTC_VIDEO_STREAM_TYPE_BIG = 0
static

HD big image: it is generally used to transfer video data from the camera.

◆ TRTC_VIDEO_STREAM_TYPE_SMALL

final int TRTC_VIDEO_STREAM_TYPE_SMALL = 1
static

Smooth small image: it has the same content as the big image, but with lower resolution and bitrate and thus lower definition.

◆ TRTC_VIDEO_STREAM_TYPE_SUB

final int TRTC_VIDEO_STREAM_TYPE_SUB = 2
static

Substream image: it is generally used for screen sharing. Only one user in the room is allowed to publish the substream video image at any time, while other users must wait for this user to close the substream before they can publish their own substream.

◆ TRTC_VOICE_CHANGER_TYPE_0

final int TRTC_VOICE_CHANGER_TYPE_0 = 0
static

Disable voice changing.

◆ TRTC_VOICE_CHANGER_TYPE_1

final int TRTC_VOICE_CHANGER_TYPE_1 = 1
static

Child.

◆ TRTC_VOICE_CHANGER_TYPE_10

final int TRTC_VOICE_CHANGER_TYPE_10 = 10
static

Robot.

◆ TRTC_VOICE_CHANGER_TYPE_11

final int TRTC_VOICE_CHANGER_TYPE_11 = 11
static

Ethereal.

◆ TRTC_VOICE_CHANGER_TYPE_2

final int TRTC_VOICE_CHANGER_TYPE_2 = 2
static

Girl.

◆ TRTC_VOICE_CHANGER_TYPE_3

final int TRTC_VOICE_CHANGER_TYPE_3 = 3
static

Middle-Aged man.

◆ TRTC_VOICE_CHANGER_TYPE_4

final int TRTC_VOICE_CHANGER_TYPE_4 = 4
static

Heavy metal.

◆ TRTC_VOICE_CHANGER_TYPE_5

final int TRTC_VOICE_CHANGER_TYPE_5 = 5
static

Nasal.

◆ TRTC_VOICE_CHANGER_TYPE_6

final int TRTC_VOICE_CHANGER_TYPE_6 = 6
static

Punk.

◆ TRTC_VOICE_CHANGER_TYPE_7

final int TRTC_VOICE_CHANGER_TYPE_7 = 7
static

Trapped beast.

◆ TRTC_VOICE_CHANGER_TYPE_8

final int TRTC_VOICE_CHANGER_TYPE_8 = 8
static

Otaku.

◆ TRTC_VOICE_CHANGER_TYPE_9

final int TRTC_VOICE_CHANGER_TYPE_9 = 9
static

Electronic.

◆ TRTCAudioCapabilityLowLatencyChorus

final int TRTCAudioCapabilityLowLatencyChorus = 1
static

low-latency chorus capability

◆ TRTCAudioCapabilityLowLatencyEarMonitor

final int TRTCAudioCapabilityLowLatencyEarMonitor = 2
static

low-latency earmonitor capability

◆ TRTCAudioSampleRate16000

final int TRTCAudioSampleRate16000 = 16000
static

16 kHz sample rate

◆ TRTCAudioSampleRate32000

final int TRTCAudioSampleRate32000 = 32000
static

32 kHz sample rate

◆ TRTCAudioSampleRate44100

final int TRTCAudioSampleRate44100 = 44100
static

44.1 kHz sample rate

◆ TRTCAudioSampleRate48000

final int TRTCAudioSampleRate48000 = 48000
static

48 kHz sample rate

◆ TRTCAVStatusChangeReasonBufferingBegin

final int TRTCAVStatusChangeReasonBufferingBegin = 1
static

The stream enters the "Loading" state due to network congestion.

◆ TRTCAVStatusChangeReasonBufferingEnd

final int TRTCAVStatusChangeReasonBufferingEnd = 2
static

The stream enters the "Playing" state after network recovery.

◆ TRTCAVStatusChangeReasonInternal

final int TRTCAVStatusChangeReasonInternal = 0
static

Default value.

◆ TRTCAVStatusChangeReasonLocalStarted

final int TRTCAVStatusChangeReasonLocalStarted = 3
static

As a start-related API was directly called locally, the stream enters the "Playing" state.

◆ TRTCAVStatusChangeReasonLocalStopped

final int TRTCAVStatusChangeReasonLocalStopped = 4
static

As a stop-related API was directly called locally, the stream enters the "Stopped" state.

◆ TRTCAVStatusChangeReasonRemoteStarted

final int TRTCAVStatusChangeReasonRemoteStarted = 5
static

As the remote user started (or resumed) publishing the video stream, the stream enters the "Loading" or "Playing" state.

◆ TRTCAVStatusChangeReasonRemoteStopped

final int TRTCAVStatusChangeReasonRemoteStopped = 6
static

As the remote user stopped (or paused) publishing the video stream, the stream enters the "Stopped" state.

◆ TRTCAVStatusLoading

final int TRTCAVStatusLoading = 2
static

Loading.

◆ TRTCAVStatusPlaying

final int TRTCAVStatusPlaying = 1
static

Playing.

◆ TRTCAVStatusStopped

final int TRTCAVStatusStopped = 0
static

Stopped.

◆ TRTCRoleAnchor

final int TRTCRoleAnchor = 20
static

An anchor can publish their audio/video streams. There is a limit on the number of anchors. Up to 50 anchors are allowed to publish streams at the same time in one room.

◆ TRTCRoleAudience

final int TRTCRoleAudience = 21
static

Audience can only listen to or watch audio/video streams of anchors in the room. If they want to publish their streams, they need to switch to the "anchor" role first through switchRole. One room can sustain up to 100,000 concurrent online users in the audience role.

◆ TRTCSystemVolumeTypeAuto

final int TRTCSystemVolumeTypeAuto = 0
static

Auto: In the auto mode, call volume is used for anchors, and media volume for audience. This mode is suitable for live streaming scenarios. If the scenario you select during enterRoom is TRTCAppSceneLIVE or TRTCAppSceneVoiceChatRoom, the SDK will automatically use this mode.

◆ TRTCSystemVolumeTypeMedia

final int TRTCSystemVolumeTypeMedia = 1
static

Media volume: In this mode, media volume is used in all scenarios. It is rarely used, mainly suitable for music scenarios with demanding requirements on audio quality. Use this mode if most of your users use peripheral devices such as audio cards. Otherwise, it is not recommended.

◆ TRTCSystemVolumeTypeVOIP

final int TRTCSystemVolumeTypeVOIP = 2
static

Call volume: In this mode, the audio module does not change its work mode when users switch between anchors and audience, enabling seamless mic on/off. This mode is suitable for scenarios where users need to switch frequently between anchors and audience. If the scenario you select during enterRoom is TRTCAppSceneVideoCall or TRTCAppSceneAudioCall, the SDK will automatically use this mode.

◆ VIDEO_QOS_CONTROL_CLIENT

final int VIDEO_QOS_CONTROL_CLIENT = 0
static

Client-based control, which is for internal debugging of SDK and shall not be used by users.

◆ VIDEO_QOS_CONTROL_SERVER

final int VIDEO_QOS_CONTROL_SERVER = 1
static

On-cloud control, which is the default and recommended mode.