Join Tencent RTC at NAB Show 2024 in Las Vegas!
Learn more 
Only  $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Only $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Grab It Now 
Join Tencent RTC at NAB Show 2024 in Las Vegas!
Learn more 
Only  $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Only $9.9! Get 50,000 minutes with our Starter Plan, perfect for your MVP project.
Grab It Now 
Call
Overview
  • Android
    • Integration
    • UI Customization
    • Offline Call Push
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Release Notes
  • iOS
    • Integration
    • UI Customization
    • Offline Call Push
      • VoIP
      • APNs
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Release Notes
  • Web
    • Integration
      • Web&H5 (React)
      • Web&H5 (Vue3)
    • UI Customization
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Configure Resolution and Fill Mode
      • Group Call
      • Floating Window
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallEvent
    • Release Notes
  • Flutter
    • Integration
    • Offline Call Push
    • UI Customization
    • On-Cloud Recording
    • More Features
      • Configuring Nicknames and Avatars
      • Group Call
      • Floating Window
      • Beauty Effects
      • Custom Ringtone
      • Monitoring Call Status
    • API Documentation
      • API Overview
      • TUICallKit
      • TUICallEngine
      • TUICallObserver
      • Type Definition
    • Upgrading
    • Release Notes
  • Overview
    • Overview
  • Activate the Service
  • Pricing
    • Call Monthly Packages
    • Pay-As-You-Go
    • Free Minutes
  • ErrorCode
  • FAQs
    • All Platform
    • Flutter
    • Web
Call

TUICallKit

TUICallKit APIs

TUICallKit is an audio/video call component that includes UI elements. You can use its APIs to quickly implement an audio/video call application similar to WeChat. For directions on integration, see Integrating TUICallKit.

Overview

API
Description
Creates a TUICallKit instance (singleton mode).
Sets the alias and profile photo.
call
Makes a one-to-one call.
call
Makes a one-to-one call, Support for custom room ID, call timeout, offline push content, etc
groupCall
Makes a group call.
groupCall
Makes a group call, Support for custom room ID, call timeout, offline push content, etc
Joins a group call.
Sets the ringtone.
Sets whether to turn on the mute mode.
Sets whether to enable floating windows.

Details

createInstance

This API is used to create a TUICallKit singleton.
Objective-C
Swift
- (instancetype)createInstance;
public static func createInstance() -> TUICallKit

setSelfInfo

This API is used to set the alias and profile photo. The alias cannot exceed 500 bytes, and the profile photo is specified by a URL.

Objective-C
Swift
- (void)setSelfInfo:(NSString * _Nullable)nickname avatar:(NSString * _Nullable)avatar succ:(TUICallSucc)succ fail:(TUICallFail)fail;
public func setSelfInfo(nickname: String, avatar: String, succ:@escaping TUICallSucc, fail: @escaping TUICallFail)
Parameter
Type
Description
nickName
NSString
The alias.
avatar
NSString
The profile photo.

call

This API is used to make a (one-to-one) call.
Objective-C
Swift
- (void)call:(NSString *)userId callMediaType:(TUICallMediaType)callMediaType;
public func call(userId: String, callMediaType: TUICallMediaType)
Parameter
Type
Description
userId
NSString
The target user ID.
callMediaType
The call type, which can be video or audio.

call

This API is used to make a (one-to-one) call, Support for custom room ID, call timeout, offline push content, etc.
Objective-C
Swift
- (void)call:(NSString *)userId callMediaType:(TUICallMediaType)callMediaType params:(TUICallParams *)params succ:(TUICallSucc __nullable)succ fail:(TUICallFail __nullable)fail;
public func call(userId: String, callMediaType: TUICallMediaType, params: TUICallParams,
                     succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
Parameter
Type
Description
userId
NSString
The target user ID.
callMediaType
The call type, which can be video or audio.
params
Call extension parameters, such as roomID, call timeout, offline push info,etc

groupCall

This API is used to make a group call.
注意:
Before making a group call, you need to create an IM group first.
Objective-C
Swift
- (void)groupCall:(NSString *)groupId userIdList:(NSArray<NSString *> *)userIdList callMediaType:(TUICallMediaType)callMediaType;Objective-C
public func groupCall(groupId: String, userIdList: [String], callMediaType: TUICallMediaType)
Parameter
Type
Description
groupId
NSString
The group ID.
userIdList
NSArray
The target user IDs.
callMediaType
The call type, which can be video or audio.

groupCall

This API is used to make a group call, Support for custom room ID, call timeout, offline push content, etc.
Notice
Before making a group call, you need to create an IM group first.
Objective-C
Swift
- (void)groupCall:(NSString *)groupId userIdList:(NSArray<NSString *> *)userIdList callMediaType:(TUICallMediaType)callMediaType params:(TUICallParams *)params succ:(TUICallSucc __nullable)succ fail:(TUICallFail __nullable)fail;
public func groupCall(groupId: String, userIdList: [String], callMediaType: TUICallMediaType, params: TUICallParams, succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
Parameter
Type
Description
groupId
NSString
The group ID.
userIdList
NSArray
The target user IDs.
callMediaType
The call type, which can be video or audio.
params
Call extension parameters, such as roomID, call timeout, offline push info, etc

joinInGroupCall

This API is used to join a group call.
Notice:
Before joining a group call, you need to create or join an IM group in advance, and there are already users in the group who are in the call.
Objective-C
Swift
- (void)joinInGroupCall:(TUIRoomId *)roomId groupId:(NSString *)groupId callMediaType:(TUICallMediaType)callMediaType;
public func joinInGroupCall(roomId: TUIRoomId, groupId: String, callMediaType: TUICallMediaType)
Parameter
Type
Description
roomId
TUIRoomId
The room ID.
groupId
NSString
The group ID.
callMediaType
The call type, which can be video or audio.

setCallingBell

This API is used to set the ringtone. filePath must be an accessible local file URL.
The ringtone set is associated with the device and does not change with user.
To reset the ringtone, pass in an empty string for filePath.
Objective-C
Swift
- (void)setCallingBell:(NSString *)filePath;
public func setCallingBell(filePath: String)

enableMuteMode

This API is used to set whether to turn on the mute mode.
Objective-C
Swift
- (void)enableMuteMode:(BOOL)enable;
public func enableMuteMode(enable: Bool)

enableFloatWindow

This API is used to set whether to enable floating windows.
The default value is false, and the floating window button in the top left corner of the call view is hidden. If it is set to true, the button will become visible.
Objective-C
Swift
- (void)enableFloatWindow:(BOOL)enable;
public func enableFloatWindow(enable: Bool)