TUICommonDefine
TUICommonDefine
StructType
FuncList | DESC |
Network quality information. | |
Audio/Video Room ID in Call | |
Video Rendering Parameters. | |
Video Encoding Parameters |
EnumType
EnumType | DESC |
Error code definition. | |
Network quality. | |
Extension type. | |
Audio Devices. | |
Front/Back Camera. | |
Video Render Fill Mode. | |
Video Render Rotation. | |
Video Aspect Ratio Mode. | |
Video Resolution. |
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. |
TUIErrorRoomMismatch | -4 | Room ID mismatch. Please check if you have left or switched rooms. |
TUIErrorSDKAppIDNotFound | -1000 | |
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. |
TUIErrorInvalidLicense | -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 |
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. |
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. |
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. |
TUIErrorUserNotExist | -2200 | The user does not exist. |
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. |
TUIErrorMaxSeatCountLimit | -2340 | The number of seats exceeds the maximum number of seats in your package. |
TUIErrorSeatIndexNotExist | -2344 | The seat number does not exist. |
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. |
TUIErrorRoomNotSupportPreloading | -4001 | Current room does not support preloading. |
TUIErrorCallInProgress | -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." |
TUIErrorServerSystemError | 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 |
TUIErrorServerInvalidParameter | 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 |
TUIErrorRoomIdOccupied | 100003 | The room ID is occuiped, please select another room ID. |
TUIErrorRoomIdNotExist | 100004 | The room does not exist when entering the room. |
TUIErrorUserNotEntered | 100005 | The user is not in the current room. |
TUIErrorRoomUserFull | 100008 | The room is full of users. |
TUIErrorNeedPassword | 100018 | The current room needs a password to enter. |
TUIErrorWrongPassword | 100019 | Error password for entering the room. |
TUIErrorRequestIdConflict | 100102 | The request conflict. |
TUIErrorSeatLocked | 100200 | The current seat is locked. |
TUIErrorSeatOccupied | 100210 | The current seat is already occupied. |
TUIErrorAlreadyInSeat | 100203 | The current user is already on the seat. |
TUIErrorAllSeatOccupied | 100205 | The number of people on the seat is full. |
TUIErrorUserNotInSeat | 100206 | The current user is not on the seat. |
TUIErrorSeatNotSupportLinkMic | 100211 | The current room does not support connect microphone before the seat is enabled. |
TUIErrorRoomAlreadyConnected | 100401 | The room has been connected with current. |
TUIErrorRoomConnectedInOther | 100403 | The room has been connected with other room. |
TUIErrorMaxConnectedCountLimit | 100404 | The current room connection exceeds the maximum limit. |
TUIErrorRoomMetadataExceedKeyCountLimit | 100500 | The number of room metadata keys exceeds the limit. |
TUIErrorRoomMetadataExceedValueSizeLimit | 100501 | The size of room metadata value exceeds the limit. |
TUIErrorGiftAbilityNotEnabled | 102001 | The gift ability not enabled. |
TUIErrorGiftNotExist | 102002 | The gift id not exist. |
TUIErrorGiftServerPreVerificationFailed | 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 |
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. |
TUIExtensionTypeConferenceInvitationManager | 4 | Conference invitation extensions. |
TUIExtensionTypeLiveLayoutManager | 5 | Live layout extensions. |
TUIExtensionTypeLiveGiftManager | 6 | Live gift extensions. |
TUIAudioPlaybackDevice
TUIAudioPlaybackDevice
Audio Devices.
Enum | Value | DESC |
TUIAudioPlaybackDeviceSpeakerphone | 0 | Speakerphone. |
TUIAudioPlaybackDeviceEarpiece | 1 | Earpiece. |
TUICamera
TUICamera
Front/Back Camera.
Enum | Value | DESC |
TUICameraFront | 0 | Front Camera. |
TUICameraBack | 1 | Back Camera. |
TUIVideoRenderParamsFillMode
TUIVideoRenderParamsFillMode
Video Render Fill Mode.
Enum | Value | DESC |
TUIVideoRenderParamsFillModeFill | 0 | 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. |
TUIVideoRenderParamsFillModeFit | 1 | 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. |
TUIVideoRenderParamsRotation
TUIVideoRenderParamsRotation
Video Render Rotation.
Enum | Value | DESC |
TUIVideoRenderParamsRotation_0 | 0 | No rotation. |
TUIVideoRenderParamsRotation_90 | 1 | Clockwise rotation by 90 degrees. |
TUIVideoRenderParamsRotation_180 | 2 | Clockwise rotation by 180 degrees. |
TUIVideoRenderParamsRotation_270 | 3 | Clockwise rotation by 270 degrees. |
TUIVideoEncoderParamsResolutionMode
TUIVideoEncoderParamsResolutionMode
Video Aspect Ratio Mode.
Enum | Value | DESC |
TUIVideoEncoderParamsResolutionModeLandscape | 0 | Landscape resolution, such as 640_360 + Landscape = 640x360. |
TUIVideoEncoderParamsResolutionModePortrait | 1 | Portrait resolution, such as 640_360 + Portrait = 360x640. |
TUIVideoEncoderParamsResolution
TUIVideoEncoderParamsResolution
Video Resolution.
Enum | Value | DESC |
TUIVideoEncoderParamsResolution_640_360 | 1 | Aspect ratio: 16:9; resolution: 640x360; recommended bitrate (VideoCall): 500 Kbps. |
TUIVideoEncoderParamsResolution_960_540 | 2 | Aspect ratio: 16:9; resolution: 960x540; recommended bitrate (VideoCall): 850 Kbps. |
TUIVideoEncoderParamsResolution_1280_720 | 3 | Aspect ratio: 16:9; resolution: 1280x720; recommended bitrate (VideoCall): 1200 Kbps. |
TUIVideoEncoderParamsResolution_1920_1080 | 4 | Aspect ratio: 16:9; resolution: 1920x1080; recommended bitrate (VideoCall): 2000 Kbps. |
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 TUINetworkInfo}).
EnumType | DESC |
quality | Network Quality. |
userId | User ID. |
TUIRoomId
TUIRoomId
Audio/Video Room ID in Call
EnumType | DESC |
intRoomId | Numeric room ID, value range: 1 - 2147483647 (2^31-1). |
strRoomId | String room ID, recommended values: Maximum length is 64 bytes. Supported character set (89 characters in total): Uppercase and lowercase English letters (a-zA-Z) Digits (0-9) Space, !, #, $, %, &, (, ), +, -, :, ;, <, =, ., >, ?, @, [, ], ^, _, {, }, |, ~, , . |
TUIVideoRenderParams
TUIVideoRenderParams
Video Rendering Parameters.
EnumType | DESC |
fillMode | Video rendering fill mode. |
rotation | Video rendering rotation direction. |
TUIVideoEncoderParams
TUIVideoEncoderParams
Video Encoding Parameters
EnumType | DESC |
resolution | Video Resolution. |
resolutionMode | Video Aspect Ratio Mode. |