please select
Call
  • Web
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration (React)
      • Integration (Vue3)
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Configuring Nickname and Avatar
      • GroupCall
      • Floating Window
      • Custom Ringtone
      • Configure Resolution and Fill Mode
      • Monitoring Call Status
      • Language Settings
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
      • Engine APIs
        • TUICallEngine
        • TUICallEvent
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FAQs
      • All Platfroms
      • Web
      • ErrorCode
      • Release Notes
  • Android
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Offline Call Push
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
        • TUICallObserver
        • Type Definition
      • Engine APIs
        • TUICallEngine
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FAQs
      • All Platforms
      • Android
      • ErrorCode
      • Release Notes
  • iOS
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • Offline Call Push
        • VoIP
        • APNs
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
    • Client APIs
      • UIKit APIs
        • API Overview
        • TUICallKit
        • TUICallObserver
        • Type Definition
      • Engine APIs
        • TUICallEngine
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FQAs
      • All Platform
      • iOS
      • ErrorCode
      • Release Notes
  • Flutter
    • Overview
      • Product Introduction
      • Activate the Service
      • Pricing
        • Free Minutes
        • Call Monthly Packages
        • Billing Explanation for Subscription Package Duration
    • Get Started
      • Run Sample Code
      • Integration
      • Secure authentication with userSig
    • Basic Features
      • UI Customization
      • offline Call Push
        • Notification
        • VoIP (Optional)
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • Advanced Features
      • Virtual Background
      • AI Noise Suppression
      • On-Cloud Recording
      • Beauty Effects
    • Client APIs
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Server APIs
      • Call Status Callback
        • Call Status Callback
        • Call Event Callback
        • Callback Configuration
          • API List for Callback Configuration
          • Establishing Callback Configuration
          • Retrieving Callback Configuration
          • Update Callback Configuration
          • Remove Callback Configuration
      • REST API
        • Introduction to REST API
        • Retrieve records via callId
        • Retrieve Records Based on Conditions
    • FQAs
      • All Platform
      • Flutter
      • ErrorCode
      • Upgrading
      • Release Notes
Call

Type Definition

Common structures

TUICallDefine

Type
Description
An additional parameter.
Offline push vendor configuration information.

TUICommonDefine

Type
Description
RoomId
Room ID for audio and video in a call.
Network quality information
Video render parameters
Video encoding parameters

Enum definition

TUICallDefine

Type
Description
MediaType
Media type in a call
Role
Roles of individuals in a call.
Status
The call status
Scene
The call scene
iOS offline push type

TUICommonDefine

Type
Description
Audio route
Camera
Camera type
Network quality
FillMode
Video image fill mode
Rotation
Video image rotation direction
Video aspect ratio mode
Video resolution

CallParams

Call params
Value
Type
Description
offlinePushInfo
Offline push vendor configuration information.
timeout
int
Call timeout period, default: 30s, unit: seconds.
userData
String
An additional parameter. Callback when the callee receives onCallReceived

OfflinePushInfo

Offline push vendor configuration information,please refer to:Offline call push
Value
Type
Description
title
String
offlinepush notification title
desc
String
offlinepush notification description
ignoreIOSBadge
boolean
Ignore badge count for offline push (only for iOS), if set to true, the message will not increase the unread count of the app icon on the iOS receiver's side.
iOSSound
String
Offline push sound setting (only for iOS). Whensound = IOS_OFFLINE_PUSH_NO_SOUND, there will be no sound played when the message is received. When sound = IOS_OFFLINE_PUSH_DEFAULT_SOUND, the system sound will be played when the message is received. If you want to customize the iOSSound, you need to link the audio file into the Xcode project first, and then set the audio file name (with extension) to the iOSSound.
androidSound
String
Offline push sound setting (only for Android, supported by IMSDK 6.1 and above). Only Huawei and Google phones support setting sound prompts. For Xiaomi phones, please refer to: Xiaomi custom ringtones. In addition, for Google phones, in order to set sound prompts for FCM push on Android 8.0 and above systems, you must call setAndroidFCMChannelIDto set the channelID for it to take effect.
androidOPPOChannelID
String
Set the channel ID for OPPO phones with Android 8.0 and above systems.
androidVIVOClassification
int
Classification of VIVO push messages (deprecated interface, VIVO push service will optimize message classification rules on April 3, 2023. It is recommended to use setAndroidVIVOCategory to set the message category). 0: Operational messages, 1: System messages. The default value is 1.
androidXiaoMiChannelID
String
Set the channel ID for Xiaomi phones with Android 8.0 and above systems.
androidFCMChannelID
String
Set the channel ID for google phones with Android 8.0 and above systems.
androidHuaWeiCategory
String
Classification of Huawei push messages, please refer to: Huawei message classification standard.
isDisablePush
boolean
Whether to turn off push notifications (default is on).
iOSPushType
iOS offline push type,default is APNs

RoomId

Room ID for audio and video in a call. Note:
(1) intRoomId and strRoomId are mutually exclusive. If you choose to use strRoomIdintRoomId needs to be filled in as 0. If both are filled in, the SDK will prioritize intRoomId.
(2) Do not mix intRoomId and strRoomId because they are not interchangeable. For example, the number 123 and the string "123" represent two completely different rooms.
Value
Type
Description
intRoomId
int
Numeric room ID.
range:1 - 2147483647(2^31-1)
strRoomId
String
String room ID. range:
Limited to 64 bytes in length. The supported character set range is as follows (a total of 89 characters):
Lowercase and uppercase English letters.(a-zA-Z);
Number(0-9);
Spaces!#$%&()+-:;<=.>?@[]^_{}|~,
Note:
Currently, string room number is only supported on Android and iOS platforms. Support for other platforms such as Web, Mini Programs, Flutter, and Uniapp will be available in the future. Please stay tuned!

NetworkQualityInfo

User network quality information
Value
Type
Description
userId
String
user ID
quality
network quality

VideoRenderParams

Video render parameters
Value
Type
Description
fillMode
Video image fill mode
rotation
Video image rotation direction

VideoEncoderParams

Video encoding parameters
Value
Type
Description
resolution
Video resolution
resolutionMode
Video aspect ratio mode

MediaType

Call media type
Value
Type
Description
Unknown
0
Unknown
Audio
1
Audio call
Video
2
Video call

Role

Call role
Value
Type
Description
None
0
Unknown
Caller
1
Caller(inviter)
Called
2
Callee(invitee)

Status

Call status
Value
Type
Description
None
0
Unknown
Waiting
1
The call is currently waiting
Accept
2
The call has been accepted

Scene

Call scene
Value
Type
Description
GROUP_CALL
0
Group call
MULTI_CALL
1
Anonymous group calling (not supported at this moment, please stay tuned).
SINGLE_CALL
2
one to one call

IOSOfflinePushType

iOS offline push type
Type
Value
Description
APNs
0
APNs
VoIP
1
VoIP

AudioPlaybackDevice

Audio route
Type
Value
Description
Earpiece
0
Earpiece
Speakerphone
1
Speakerphone

Camera

Front/Back camera
Type
Value
Description
Front
0
Front camera
Back
1
Back camera

NetworkQuality

Network quality
Type
Value
Description
Unknown
0
Unknown
Excellent
1
Excellent
Good
2
Good
Poor
3
Poor
Bad
4
Bad
Vbad
5
Vbad
Down
6
Down

FillMode

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:
Type
Value
Description
Fill
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.
Fit
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.

Rotation

We provides rotation angle setting APIs for local and remote images. The following rotation angles are all clockwise.
Type
Value
Description
Rotation_0
0
No rotation
Rotation_90
1
Clockwise rotation by 90 degrees
Rotation_180
2
Clockwise rotation by 180 degrees
Rotation_270
3
Clockwise rotation by 0 degrees

ResolutionMode

Video aspect ratio mode
Type
Value
Description
Landscape
0
Landscape resolution, such as Resolution.Resolution_640_360 + ResolutionMode.Landscape = 640 × 360.
Portrait
1
Portrait resolution, such as Resolution.Resolution_640_360 + ResolutionMode.Portrait = 360 × 640.

Resolution

Video resolution
Type
Value
Description
Resolution_640_360
108
Aspect ratio: 16:9;resolution: 640x360;recommended bitrate: 500kbps
Resolution_640_480
62
Aspect ratio: 4:3;resolution: 640x480;recommended bitrate: 600kbps
Resolution_960_540
110
Aspect ratio: 16:9;resolution: 960x540;recommended bitrate: 850kbps
Resolution_960_720
64
Aspect ratio: 4:3;resolution: 960x720;recommended bitrate: 1000kbps
Resolution_1280_720
112
Aspect ratio: 16:9;resolution: 1280x720;recommended bitrate: 1200kbps
Resolution_1920_1080
114
Aspect ratio: 16:9;resolution: 1920x1080;recommended bitrate: 2000kbps