tencent cloud

All product documents
Tencent Real-Time Communication
RoomKit API
Last updated: 2024-03-15 16:07:57
RoomKit API
Last updated: 2024-03-15 16:07:57

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
enterRoom
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

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon