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.API | Description |
Creates a TUICallKit instance (singleton mode). | |
Sets the alias and profile photo. | |
Makes a one-to-one call. | |
Makes a one-to-one call, Support for custom room ID, call timeout, offline push content, etc | |
Makes a group call. | |
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. | |
Sets whether to enable the incoming banner. |
TUICallKit
singleton.- (instancetype)createInstance;
public static func createInstance() -> TUICallKit
- (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. |
- (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. |
- (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 |
- (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. |
- (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 |
- (void)joinInGroupCall:(TUIRoomId *)roomId groupId:(NSString *)groupId callMediaType:(TUICallMediaType)callMediaType;
public func joinInGroupCall(roomId: TUIRoomId, groupId: String, callMediaType: TUICallMediaType)
Parameter | Type | Description |
roomId | The room ID. | |
groupId | NSString | The group ID. |
callMediaType | The call type, which can be video or audio. |
filePath
must be an accessible local file URL.filePath
.- (void)setCallingBell:(NSString *)filePath;
public func setCallingBell(filePath: String)
- (void)enableMuteMode:(BOOL)enable;
public func enableMuteMode(enable: Bool)
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.- (void)enableFloatWindow:(BOOL)enable;
public func enableFloatWindow(enable: Bool)
false
. The callee will pop up a full-screen call view by default when receiving the invitation. If it is set to true
, the callee will display a banner first.public func enableFloatWindow(enable: Bool)
Was this page helpful?