TUICommonDefine

TUICommonDefine

StructType

FuncList
DESC
Network quality information.
Network Quality Information(Deprecated,recommend using 1.6 NetworkInfo).

EnumType

EnumType
DESC
Error code definition.
Network quality.
Extension type.
Audio Devices.
Front/Back Camera.

TUIError

TUIError

Error code definition.

Enum
Value
DESC
SUCCESS
0
Operate successfully.
FAILED
-1
Unclassified error.
FREQ_LIMIT
-2
The operation was frequence-limited, please try again later.
REPEAT_OPERATION
-3
Operation is repeated.
ROOM_MISMATCH
-4
Room ID mismatch. Please check if you have left or switched rooms.
SDKAPPID_NOT_FOUND
-1000
SDKAppID not found. Please confirm the application information in the TRTC console.
INVALID_PARAMETER
-1001
An invalid parameter was passed in when the API was called.
SDK_NOT_INITIALIZED
-1002
Not logged in, please login first.
PERMISSION_DENIED
-1003
Failed to get permission. Audio/video permissions are currently denied. Please check whether the device permissions are enabled. You can use the following error codes to handle in the Room scenarios:
The camera does not have system authorization: ERR_CAMERA_NOT_AUTHORIZED.
The microphone does not have system authorization: ERR_MICROPHONE_NOT_AUTHORIZED.
REQUIRE_PAYMENT
-1004
This function requires additional packages. Please activate the corresponding packages in the TRTC console.
INVALID_LICENSE
-1005
Error Description:
The SDK detected that the current license is invalid or expired, resulting in restricted playback functionality.
Root Causes:
1. The license is invalid or expired
2. The license does not include required feature permissions
3. License signature verification failed
Suggested Actions:
1. Verify the license validity period in the Tencent Cloud TUIControl console
2. Contact Tencent Cloud technical support to update or obtain a new license
CAMERA_START_FAIL
-1100
Failed to turn the camera on.
CAMERA_NOT_AUTHORIZED
-1101
No permission to access the camera. Please check the system authorization.
CAMERA_OCCUPIED
-1102
The camera is occupied. Please check whether there are other processes using the camera.
CAMERA_DEVICE_EMPTY
-1103
There is currently no camera available.
MICROPHONE_START_FAIL
-1104
Failed to turn the microphone on.
MICROPHONE_NOT_AUTHORIZED
-1105
No permission to access the microphone. Please check the system authorization.
MICROPHONE_OCCUPIED
-1106
The microphone is occupied. Please check whether there are other processes using the microphone.
MICROPHONE_DEVICE_EMPTY
-1107
There is currently no microphone available.
GET_SCREEN_SHARING_TARGET_FAILED
-1108
Failed to obtain the screen sharing source (screen or window). Please check the screen recording permission.
START_SCREEN_SHARING_FAILED
-1109
Failed to start screen sharing. Please check whether anyone in the room is sharing the screen.
OPERATION_INVALID_BEFORE_ENTER_ROOM
-2101
This operation is valid after entering the room.
EXIT_NOT_SUPPORTED_FOR_ROOM_OWNER
-2102
The owner can not leave room. Conference room type: You can transfer the owner first and then leaving room. Live room type: You can only dismiss the room.
OPERATION_NOT_SUPPORTED_IN_CURRENT_ROOM_TYPE
-2103
The current room type does not support the operation.
ROOM_ID_INVALID
-2105
The roomId is invalid. It's must be printable ASCII characters (0x20-0x7e) and the maximum length is 48 bytes.
ROOM_NAME_INVALID
-2107
The room name is invalid. The maximum length of the name is 30 bytes. If it contains Chinese, the character encoding must be UTF-8.
ALREADY_IN_OTHER_ROOM
-2108
The current user is already in other room and needs to leave room before joining a new room:
A single roomEngine instance only supports user entering one room. If you want to enter a different room, please leave room first or use a new roomEngine instance.
USER_NOT_EXIST
-2200
The user does not exist.
NEED_OWNER_PERMISSION
-2300
The opeation needs owner permission.
NEED_ADMIN_PERMISSION
-2301
The opeation needs owner or administrator permission.
REQUEST_NO_PERMISSION
-2310
The request does not have permission, such as canceling an request that was not requested by oneself.
REQUEST_ID_INVALID
-2311
The request ID is invalid or has been processed.
REQUEST_ID_REPEAT
-2312
The request is repeated.
MAX_SEAT_COUNT_LIMIT
-2340
The number of seats exceeds the maximum number of seats in your package.
SEAT_INDEX_NOT_EXIST
-2344
The seat number does not exist.
OPEN_MICROPHONE_NEED_SEAT_UNLOCK
-2360
The current seat audio is locked, and you can't push audio stream when using the microphone.
OPEN_MICROPHONE_NEED_PERMISSION_FROM_ADMIN
-2361
You need to apply the owner or administrator to open the microphone.
OPEN_CAMERA_NEED_SEAT_UNLOCK
-2370
The current seat video is locked, and you can't push video stream when using camera.
OPEN_CAMERA_NEED_PERMISSION_FROM_ADMIN
-2371
You need to apply to the owner or administrator to open the camera.
OPEN_SCREEN_SHARE_NEED_SEAT_UNLOCK
-2372
The current seat video is locked. The owner needs to unlock the seat before screen sharing can be enabled.
OPEN_SCREEN_SHARE_NEED_PERMISSION_FROM_ADMIN
-2373
You need to apply to the owner or administrator to enable screen sharing.
SEND_MESSAGE_DISABLED_FOR_ALL
-2380
All users can't send message in the current room.
SEND_MESSAGE_DISABLED_FOR_CURRENT
-2381
You can't send message in the current room.
ROOM_NOT_SUPPORT_PRELOADING
-4001
Current room does not support preloading.
CALL_IN_PROGRESS
-6001
Error Description:
A call is in progress. Device/stream-related APIs are not allowed.
Root Causes:
When you answer a call from TUICallEngine during a live streaming session using TUIRoomEngine, TUIRoomEngine will take the following actions to prevent the call’s audio/video data from being pulled by the live audience:
1. Pause video stream uplink: If you have set a placeholder image via setLocalVideoMuteImage during the live stream, the audience will see this image. The video stream will automatically resume after the TUICallEngine call ends.
2. Pause audio stream uplink: The audio stream will automatically resume after the TUICallEngine call ends.
During an active TUICallEngine call, this error will occur if you attempt to call device/stream-related APIs in the live room.
Suggested Actions:
You can display a pop-up notification to the user: "A call is in progress. Please hang up and try again."
SERVER_SYSTEM_ERROR
100001
Error Description:
An unknown internal server error occurred, causing the request to fail to be processed normally
Root Causes:
1. Server-side service exception or crash
2. Insufficient server resources or overload
3. Server configuration error
Suggested Actions:
1. Prompt user "Server busy, please try again later"
2. Check server logs to locate specific issues
3. Contact Tencent Cloud technical support to troubleshoot backend services
SERVER_INVALID_PARAMETER
100002
Error Description:
The server received illegal or incomplete request parameters, causing the request to fail to be processed
Root Causes:
1. Required parameters are missing or empty
2. Parameter format does not meet requirements
3. Parameter value exceeds allowed range
4. Parameter type mismatch
Suggested Actions:
1. Check if request parameters are complete
2. Verify parameter format and type comply with API documentation requirements
3. Ensure parameter values are within valid range
4. Refer to relevant API documentation to confirm parameter specifications
ROOM_ID_OCCUPIED
100003
The room ID is occuiped, please select another room ID.
ROOM_ID_NOT_EXIST
100004
The room does not exist when entering the room.
USER_NOT_ENTERED
100005
The user is not in the current room.
ROOM_USER_FULL
100008
The room is full of users.
NEED_PASSWORD
100018
The current room needs a password to enter.
WRONG_PASSWORD
100019
Error password for entering the room.
REQUEST_ID_CONFLICT
100102
The request conflict.
SEAT_LOCKED
100200
The current seat is locked.
SEAT_OCCUPIED
100210
The current seat is already occupied.
ALREADY_IN_SEAT
100203
The current user is already on the seat.
ALL_SEAT_OCCUPIED
100205
The number of people on the seat is full.
USER_NOT_IN_SEAT
100206
The current user is not on the seat.
SEAT_NOT_SUPPORT_LINK_MIC
100211
The current room does not support connect microphone before the seat is enabled.
ROOM_ALREADY_CONNECTED
100401
The room has been connected with current.
ROOM_CONNECTED_IN_OTHER
100403
The room has been connected with other room.
MAX_CONNECTED_COUNT_LIMIT
100404
The current room connection exceeds the maximum limit.
ROOM_METADATA_EXCEED_KEY_COUNT_LIMIT
100500
The number of room metadata keys exceeds the limit.
ROOM_METADATA_EXCEED_VALUE_SIZE_LIMIT
100501
The size of room metadata value exceeds the limit.
GIFT_ABILITY_NOT_ENABLED
102001
The gift ability not enabled.
GIFT_NOT_EXIST
102002
The gift id not exist.
GIFT_SERVER_PRE_VERIFICATION_FAILED
102004
Error Description:
Before sending a gift, the gift system will send a "gift sending confirmation request" to the callback server address configured in the console. Only when receiving a confirmation code of 0 from your server will the gift system actually send the gift.
Root Causes:
1. The gift system request to your server timed out (timeout is 2 seconds), such as:
Your server did not open the corresponding port
Firewall policy restricts external HTTP protocol access
2. Your server failed to parse the "gift sending confirmation request" data packet, causing your server to return a confirmation code that is not 0
Suggested Actions:
1. Check server port status and firewall settings
2. Ensure the server can correctly process JSON format verification requests

TUINetworkQuality

TUINetworkQuality

Network quality.

Enum
Value
DESC
UNKNOWN
0
Undefine.
EXCELLENT
1
The current network is excellent.
GOOD
2
The current network is good.
POOR
3
The current network is poor.
BAD
4
The current network is bad.
VERY_BAD
5
The current network is very bad.
DOWN
6
The current network does not meet TRTC's minimum requirements.

TUIExtensionType

TUIExtensionType

Extension type.

Enum
Value
DESC
DEVICE_MANAGER
1
Device management extension.
LIVE_LIST_MANAGER
2
Live management extension.
CONFERENCE_LIST_MANAGER
3
Conference list extensions.
CONFERENCE_INVITATION_MANAGER
4
Conference invitation extensions.
LIVE_LAYOUT_MANAGER
5
Live layout extensions.
LIVE_GIFT_MANAGER
6
Live gift extensions.

TUIAudioPlaybackDevice

TUIAudioPlaybackDevice

Audio Devices.

Enum
Value
DESC
Speakerphone
0
Speakerphone.
Earpiece
1
Earpiece.

TUICamera

TUICamera

Front/Back Camera.

Enum
Value
DESC
Front
0
Front Camera.
Back
1
Back Camera.

TUINetworkInfo

TUINetworkInfo

Network quality information.

EnumType
DESC
delay
Network delay(ms).
downLoss
Downlink packet loss rate, unit (%). The smaller the value, the better the network.
If downLoss is 0%, it means that the network quality of the downlink is very good and the data packets received from the cloud are basically not lost.
If downLoss is 30%, it means that 30% of the audio and video data packets transmitted from the cloud to the SDK will be lost in the transmission link.
quality
Network quality.
upLoss
Uplink packet loss rate, unit (%). The smaller the value, the better the network.
If upLoss is 0%, it means that the network quality of the uplink is very good and the data packets uploaded to the cloud are basically not lost.
If upLoss is 30%, it means that 30% of the audio and video data packets sent by the SDK to the cloud will be lost in the transmission link.
userId
User ID.

TUINetworkQualityInfo

TUINetworkQualityInfo

Network Quality Information(Deprecated,recommend using 1.6 {@link NetworkInfo}).

EnumType
DESC
quality
Network Quality.
userId
User ID.