Voice Room UIKit API
API Introduction
VoiceRoomKit is a voice chat room component with 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, please read Demo Rapid Deployment. If you want to integrate our feature directly into your project, please read Quick Integration (TUILiveKit).
API Overview
API | Description |
Obtain a VoiceRoomKit object instance. | |
Create a voice chat room live streaming room. | |
Enter a voice chat room live streaming room using roomId. |
API Details
createInstance
Obtain a VoiceRoomKit object instance.
static VoiceRoomKit createInstance(Context context)
Parameter:
Parameter | Type | Note | Default value | Meaning |
context | Context | Mandatory | - | Android context object |
Return Value:VoiceRoomKit
createRoom
Create a voice chat room live streaming room.
void createRoom(String roomId, VoiceRoomDefine.CreateRoomParams params);
Parameter:
Parameter | Type | Note | 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.
void enterRoom(String roomId);
Parameter:
Parameter | Type | Note | 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 | Note | Default value | Meaning |
roomName | String | | "" | Voice chat room name |
maxAnchorCount | int | | 10 | Maximum number of users on stage |
seatMode | String | Mandatory | | Mic On Mode is divided into the following two types: FREE_TO_TAKE(1): Free to Join the Podium mode, where the audience can join the mic freely without applying. APPLY_TO_TAKE(2): Apply to Join the Mic mode, where the audience needs the host's or administrator's approval to join the mic. |