RoomKit API
Introduction
TUIRoomKit is an open source UI layer suite for conference SDK, currently only supports Swift language on the iOS platform. The conference UI can be called up through simple API calls.
TUIRoomKit Interface
API | Description |
Initialize the TUIRoomKit singleton object | |
Destroy the TUIRoomKit singleton object | |
Set user information (avatar, nickname) (optional) | |
Create a room | |
Enter the room |
createInstance
Initialize the TUIRoomKit singleton object.
public class func createInstance() -> TUIRoomKit
destroyInstance
Destroy the TUIRoomKit singleton object.
public class func destroyInstance() -> Void
setSelfInfo(optional)
Set user information (avatar, nickname).
public func setSelfInfo(userName: String,avatarURL: String,onSuccess: @escaping TUISuccessBlock,onError: @escaping TUIErrorBlock) -> Void
Parameter | Type | Meaning |
userName | String | Username |
avatarURL | String | User avatar URL |
onSuccess | TUISuccessBlock | Successful callback |
onError | TUIErrorBlock | Failure callback |
createRoom
Create a room.
public func createRoom(roomInfo: TUIRoomInfo,onSuccess: @escaping TUISuccessBlock,onError: @escaping TUIErrorBlock) -> Void
The parameters are as follows:
Parameter | Type | Meaning |
roomInfo | Room data | |
onSuccess | TUISuccessBlock | Successful callback |
onError | TUIErrorBlock | Failure callback |
enterRoom
Enter the room.
public func enterRoom(roomId: String,enableAudio: Bool,enableVideo: Bool,isSoundOnSpeaker: Bool,onSuccess: @escaping TUISuccessBlock,onError: @escaping TUIErrorBlock) -> Void
The parameters are as follows:
Parameter | Type | Meaning |
roomId | String | Room ID string |
enableAudio | Bool | Whether to turn on the audio when entering the room |
enableVideo | Bool | Whether to turn on the video when entering the room |
isSoundOnSpeaker | Bool | Whether to turn on the speakers when entering the room |
onSuccess | TUISuccessBlock | Successful callback |
onError | TUIErrorBlock | Failure callback |