TUICommonDefine

TUICommonDefine

StructType

FuncList
DESC
Network quality information.

EnumType

EnumType
DESC
Error code definition.
Network quality.
Extension type.

TUIError

TUIError

Error code definition.

Enum
Value
DESC
TUIErrorSuccess
0
Operate successfully.
TUIErrorFailed
-1
Unclassified error.
TUIErrorFreqLimit
-2
The operation was frequence-limited, please try again later.
TUIErrorRepeatOperation
-3
Operation is repeated.
TUIErrorSDKAppIDNotFound
-1000
SDKAppID not found. Please confirm the application information in the TRTC console.
TUIErrorInvalidParameter
-1001
An invalid parameter was passed in when the API was called.
TUIErrorSdkNotInitialized
-1002
Not logged in, please login first.
TUIErrorPermissionDenied
-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.
TUIErrorRequirePayment
-1004
This function requires additional packages. Please activate the corresponding packages in the TRTC console.
TUIErrorCameraStartFail
-1100
Failed to turn the camera on.
TUIErrorCameraNotAuthorized
-1101
No permission to access the camera. Please check the system authorization.
TUIErrorCameraOccupied
-1102
The camera is occupied. Please check whether there are other processes using the camera.
TUIErrorCameraDeviceEmpty
-1103
There is currently no camera available.
TUIErrorMicrophoneStartFail
-1104
Failed to turn the microphone on.
TUIErrorMicrophoneNotAuthorized
-1105
No permission to access the microphone. Please check the system authorization.
TUIErrorMicrophoneOccupied
-1106
The microphone is occupied. Please check whether there are other processes using the microphone.
TUIErrorMicrophoneDeviceEmpty
-1107
There is currently no microphone available.
TUIErrorGetScreenSharingTargetFailed
-1108
Failed to obtain the screen sharing source (screen or window). Please check the screen recording permission.
TUIErrorStartScreenSharingFailed
-1109
Failed to start screen sharing. Please check whether anyone in the room is sharing the screen.
TUIErrorRoomIdNotExist
-2100
The room does not exist when entering the room.
TUIErrorOperationInvalidBeforeEnterRoom
-2101
This operation is valid after entering the room.
TUIErrorExitNotSupportedForRoomOwner
-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.
TUIErrorOperationNotSupportedInCurrentRoomType
-2103
The current room type does not support the operation.
TUIErrorRoomIdInvalid
-2105
The roomId is invalid. It's must be printable ASCII characters (0x20-0x7e) and the maximum length is 48 bytes.
TUIErrorRoomIdOccupied
-2106
The room ID is occuiped, please select another room ID.
TUIErrorRoomNameInvalid
-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.
TUIErrorAlreadyInOtherRoom
-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.
TUIErrorNeedPassword
-2109
The current room needs a password to enter.
TUIErrorWrongPassword
-2110
Error password for entering the room.
TUIErrorRoomUserFull
-2111
The room is full of users.
TUIErrorRoomMetadataExceedKeyCountLimit
-2112
The number of room metadata keys exceeds the limit.
TUIErrorRoomMetadataExceedValueSizeLimit
-2113
The size of room metadata value exceeds the limit.
TUIErrorUserNotExist
-2200
The user does not exist.
TUIErrorUserNotEntered
-2201
The user is not in the current room.
TUIErrorUserNeedOwnerPermission
-2300
The opeation needs owner permission.
TUIErrorUserNeedAdminPermission
-2301
The opeation needs owner or administrator permission.
TUIErrorRequestNoPermission
-2310
The request does not have permission, such as canceling an request that was not requested by oneself.
TUIErrorRequestIdInvalid
-2311
The request ID is invalid or has been processed.
TUIErrorRequestIdRepeat
-2312
The request is repeated.
TUIErrorRequestIdConflict
-2313
The request conflict.
TUIErrorMaxSeatCountLimit
-2340
The number of seats exceeds the maximum number of seats in your package.
TUIErrorAlreadyInSeat
-2341
The current user is already on the seat.
TUIErrorSeatOccupied
-2342
The current seat is already occupied.
TUIErrorSeatLocked
-2343
The current seat is locked.
TUIErrorSeatIndexNotExist
-2344
The seat number does not exist.
TUIErrorUserNotInSeat
-2345
The current user is not on the seat.
TUIErrorAllSeatOccupied
-2346
The number of people on the seat is full.
TUIErrorSeatNotSupportLinkMic
-2347
The current room does not support connect microphone before the seat is enabled.
TUIErrorOpenMicrophoneNeedSeatUnlock
-2360
The current seat audio is locked, and you can't push audio stream when using the microphone.
TUIErrorOpenMicrophoneNeedPermissionFromAdmin
-2361
You need to apply the owner or administrator to open the microphone.
TUIErrorOpenCameraNeedSeatUnlock
-2370
The current seat video is locked, and you can't push video stream when using camera.
TUIErrorOpenCameraNeedPermissionFromAdmin
-2371
You need to apply to the owner or administrator to open the camera.
TUIErrorOpenScreenShareNeedSeatUnlock
-2372
The current seat video is locked. The owner needs to unlock the seat before screen sharing can be enabled.
TUIErrorOpenScreenShareNeedPermissionFromAdmin
-2373
You need to apply to the owner or administrator to enable screen sharing.
TUIErrorSendMessageDisabledForAll
-2380
All users can't send message in the current room.
TUIErrorSendMessageDisabledForCurrent
-2381
You can't send message in the current room.
TUIErrorRoomAlreadyConnected
-3001
The room has been connected with current.
TUIErrorRoomConnectedInOther
-3002
The room has been connected with other room.
TUIErrorMaxConnectedCountLimit
-3003
The current room connection exceeds the maximum limit.

TUINetworkQuality

TUINetworkQuality

Network quality.

Enum
Value
DESC
TUINetworkQualityUnknown
0
Undefine.
TUINetworkQualityExcellent
1
The current network is excellent.
TUINetworkQualityGood
2
The current network is good.
TUINetworkQualityPoor
3
The current network is poor.
TUINetworkQualityBad
4
The current network is bad.
TUINetworkQualityVeryBad
5
The current network is very bad.
TUINetworkQualityDown
6
The current network does not meet TRTC's minimum requirements.

TUIExtensionType

TUIExtensionType

Extension type.

Enum
Value
DESC
TUIExtensionTypeDeviceManager
1
Device management extension.
TUIExtensionTypeLiveListManager
2
Live management extension.
TUIExtensionTypeConferenceListManager
3
Conference list extensions.

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.