API | Description |
Initialize the TUIRoomKit singleton object | |
Destroy the TUIRoomKit singleton object | |
Set user information (avatar, nickname) (optional) | |
Create a room | |
Enter the room |
public class func createInstance() -> TUIRoomKit
public class func destroyInstance() -> Void
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 |
public func createRoom(roomInfo: TUIRoomInfo,onSuccess: @escaping TUISuccessBlock,onError: @escaping TUIErrorBlock) -> Void
Parameter | Type | Meaning |
roomInfo | Room data | |
onSuccess | TUISuccessBlock | Successful callback |
onError | TUIErrorBlock | Failure callback |
public func enterRoom(roomId: String,enableAudio: Bool,enableVideo: Bool,isSoundOnSpeaker: Bool,onSuccess: @escaping TUISuccessBlock,onError: @escaping TUIErrorBlock) -> Void
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 |
Was this page helpful?