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 |
Create a TUICallKit instance (singleton mode). | |
Set the user's profile picture and nickname. | |
Make a one-to-one call. | |
Make a one-to-one call, Support for custom room ID, call timeout, offline push content, etc | |
Make a group call. | |
Make a group call, Support for custom room ID, call timeout, offline push content, etc | |
Join a group call. | |
Set the ringtone. | |
Set whether to turn on the mute mode. | |
Set whether to enable floating windows. | |
Set whether to display incoming banner. |
TUICallKit
singleton.public static func createInstance() -> TUICallKit
public func setSelfInfo(nickname: String, avatar: String, succ:@escaping TUICallSucc, fail: @escaping TUICallFail)
Parameter | Type | Description |
nickname | String | The nickname. |
avatar | String | The profile picture. |
public func call(userId: String, callMediaType: TUICallMediaType)
Parameter | Type | Description |
userId | String | The target user ID. |
callMediaType | The call type, which can be video or audio. |
public func call(userId: String, callMediaType: TUICallMediaType, params: TUICallParams,succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
Parameter | Type | Description |
userId | String | 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 |
public func groupCall(groupId: String, userIdList: [String], callMediaType: TUICallMediaType)
Parameter | Type | Description |
groupId | String | The group ID. |
userIdList | Array | The target user IDs. |
callMediaType | The call type, which can be video or audio. |
public func groupCall(groupId: String, userIdList: [String], callMediaType: TUICallMediaType, params: TUICallParams,succ: @escaping TUICallSucc, fail: @escaping TUICallFail)
Parameter | Type | Description |
groupId | String | The group ID. |
userIdList | Array | 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 |
public func joinInGroupCall(roomId: TUIRoomId, groupId: String, callMediaType: TUICallMediaType)
Parameter | Type | Description |
roomId | The room ID. | |
groupId | String | The group ID. |
callMediaType | The call type, which can be video or audio. |
filePath
must be an accessible local file URL.filePath
.public func setCallingBell(filePath: String)
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.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 enableIncomingBanner(enable: Bool)
Was this page helpful?