API | Description |
Create a SeatGridView object, supporting code creation and XML loading . | |
Enable local microphone | |
Disable local microphone | |
Pause publishing local audio stream | |
Resume publishing local audio stream | |
Anchor creates live room and starts streaming | |
Anchor stops streaming and destroys live room | |
Audience joins an anchor's live room | |
Audience leaves an anchor's live room | |
Update Room Mic Mode | |
Anchor Responds to Microphone Application/Audience Responds to Microphone Invitation | |
Anchor Cancels Microphone Invitation/Audience Cancels Microphone Application | |
Connect Mic | |
Disconnect Mic | |
Disconnect Mic | |
Anchor Invites User to Connect Mic | |
Anchor Kicks User off Mic | |
Anchor Locks Mic Position (including position lock, audio status lock, and video status lock) | |
Anchor Sets Layout Mode for Mic List | |
Set the adapter for the seat view | |
Set event callbacks | |
Remove event callbacks |
public SeatGridView(Context context)
Parameter | Type | Meaning |
context | Context | Android context object |
void startMicrophone(ActionCallback callback)
Parameter | Type | Meaning |
callback | ActionCallback | Callback of the operation |
void stopMicrophone()
void muteMicrophone()
void unMuteLocalAudio(ActionCallback callback)
Parameter | Type | Meaning |
callback | ActionCallback | Callback of the operation |
void startVoiceRoom(RoomInfo roomInfo, GetRoomInfoCallback callback)
Parameter | Type | Meaning |
roomInfo | RoomInfo | Information for creating a live streaming room |
callback | ActionCallback | Callback of the operation |
void stopVoiceRoom(ActionCallback callback)
Parameter | Type | Meaning |
callback | ActionCallback | Callback of the operation |
void joinVoiceRoom(String roomId, GetRoomInfoCallback callback)
Parameter | Type | Meaning |
roomId | String | Live Streaming Room ID |
callback | ActionCallback | Callback of the operation |
void leaveVoiceRoom(ActionCallback callback)
Parameter | Type | Meaning |
callback | ActionCallback | Callback of the operation |
void updateRoomSeatMode(SeatMode seatMode, ActionCallback callback)
Parameter | Type | Meaning |
seatMode | SeatMode | FREE_TO_TAKE: Free seat mode, audience can join the seat freely without application; APPLY_TO_TAKE: Apply to join the seat mode, audience needs the anchor's consent to join the seat. |
callback | ActionCallback | Callback of the operation. |
void responseRemoteRequest(String userId, boolean agree, ActionCallback callback)
Parameter | Type | Meaning |
userId | String | Responding user's user ID, if the current role is an audience member, the ID can be left blank |
agree | boolean | Whether to accept the request, true: accept the request, false: reject the request |
callback | ActionCallback | Callback of the operation |
void cancelRequest(String userId, ActionCallback callback)
Parameter | Type | Meaning |
userId | String | Cancelled user's ID, if the current role is an audience member, the ID can be left blank |
callback | ActionCallback | Callback of the operation |
void takeSeat(int index, int timeout, VoiceRoomDefine.RequestCallback callback)
Parameter | Type | Meaning |
index | int | Mic position number for connecting |
timeout | int | Timeout period, unit: seconds. If set to 0, the SDK will not perform a timeout check or trigger a timeout callback |
callback | ActionCallback | Callback of the operation |
void moveToSeat(int index, ActionCallback callback)
Parameter | Type | Meaning |
index | int | Mic position number to move to |
callback | ActionCallback | Callback of the operation |
void leaveSeat(ActionCallback callback)
Parameter | Type | Meaning |
callback | ActionCallback | Callback of the operation |
void takeUserOnSeatByAdmin(int index, String userId, int timeout, VoiceRoomDefine.RequestCallback callback)
Parameter | Type | Meaning |
index | int | Invited Mic position number |
userId | String | Invited user ID |
timeout | int | Timeout period, unit: seconds. If set to 0, the SDK will not perform a timeout check or trigger a timeout callback |
callback | VoiceRoomDefine.RequestCallback | Callback of the operation |
void kickUserOffSeatByAdmin(String userId, ActionCallback callback)
Parameter | Type | Meaning |
userId | String | User ID kicked off the Mic |
callback | ActionCallback | Callback of the operation |
void lockSeat(int seatIndex, TUIRoomDefine.SeatLockParams params, ActionCallback callback)
Parameter | Type | Meaning |
seatIndex | int | Mic position number to be locked |
params | TUIRoomDefine.SeatLockParams | Microphone Mute Parameters. See details: TUIRoomDefine.SeatLockParams |
callback | ActionCallback | Callback of the operation |
void setLayoutMode(LayoutMode layoutModel, SeatViewLayoutConfig layoutConfig)
Parameter | Type | Meaning |
layoutModel | Mic list layout modes, support element layout, grid layout, vertical layout, custom layout. | |
layoutConfig | Layout configuration information, effective only in custom layout mode |
void setSeatViewAdapter(VoiceRoomDefine.SeatViewAdapter adapter)
Parameter | Type | Meaning |
adapter | Seat view adapter |
void addObserver(SeatGridViewObserver observer)
Parameter | Type | Meaning |
observer | Callback object of core component |
void removeObserver(SeatGridViewObserver observer)
Parameter | Type | Meaning |
observer | Callback object of core component |
Was this page helpful?