Voice Room UIKit API

API Introduction

VoiceRoomKit is a component of the voice chat room including UI interface, using the VoiceRoomKit API, you can quickly implement a voice chat room through simple interfaces. If you want to experience and debug the voice chat room effect, please read Run demo. If you want to directly integrate our features into your project, please read Quick Integration (TUILiveKit).
Note:
If you have your own UI design and want to develop it yourself in combination with VoiceRoomKit, we also provide a more flexible and feature-complete RTC Room Engine SDK. You can learn more about the features by viewing the RTC Room Engine SDK API documentation.

API Overview

API
Description
Obtain a VoiceRoomKit object instance.
Create a voice chat room live streaming room.
enterRoom
Enter a voice chat room live streaming room using roomId.
Note:
If this set of APIs including the UI does not meet your needs, we also provide a more flexible and feature-complete RTC Room Engine SDK. You can learn more about the features by viewing our API Documentation.

API Details

createInstance

Obtain a VoiceRoomKit object instance.
static func createInstance() -> VoiceRoomKit
Return Value:VoiceRoomKit

createRoom

Create a voice chat room live streaming room.
func createRoom(roomId: String, params: CreateRoomParams)
Parameter:
Parameter
Type
Description
Default Value
Meaning
roomId
String
Mandatory
-
Live Streaming Room ID
params
Mandatory
-
Create Live Room Parameters
Return Value:void

enterRoom

Enter a voice chat room live streaming room using roomId.
func enterRoom(roomId: String)
Parameter:
Parameter
Type
Description
Default Value
Meaning
roomId
String
Mandatory
-
Live Streaming Room ID
Return Value:void

VoiceRoomDefine Introduction

VoiceRoomKit is the UIKit layer data model class for voice chat rooms, mainly including the following data structures:

CreateRoomParams

Parameters object when creating a voice chat room live streaming, mainly including the following configuration parameters:
Parameter
Type
Description
Default Value
Meaning
roomName
String

""
Voice chat room name
maxAnchorCount
Int

10
Maximum number of users on stage
seatMode


Mandatory

Mic On Mode is divided into the following two types:
TUISeatModeFreeToTake: Free taking seat on mode, audience can freely take seat without applying.
TUISeatModeApplyToTake: Apply taking seat on mode, audience needs the approval of the anchor or administrator before getting on the seat.