LiveSeatStore provides a complete set of seat management APIs, including taking seat, leaving seat, locking seat, unlocking seat, kicking user off seat, remote device control, etc. Through this class, seat management functionality can be implemented in the live room.LiveSeatStore instance, passing a valid live room ID.Property | Type | Description |
seatList | Seat list. | |
canvas | Canvas information. | |
speakingUsers | ValueListenable<Map<String, int>> | Speaking users. |
avStatistics | Audio and video statistics. |
Function | Description |
Create seat management instance. | |
Seat event callbacks. | |
Seat event callbacks. | |
Take seat. | |
Leave seat. | |
Lock seat. | |
Unlock seat. | |
Kick user off seat. | |
Move user. | |
Set a featured host. | |
Revoke a featured host. | |
Open remote camera. | |
Close remote camera. | |
Open remote microphone. | |
Close remote microphone. |
void addLiveSeatEventListener(LiveSeatListener listener);
Parameter | Type | Description |
listener | Listener. |
void removeLiveSeatEventListener(LiveSeatListener listener);
Parameter | Type | Description |
listener | Listener. |
Future<CompletionHandler> takeSeat(int seatIndex);
Parameter | Type | Description |
seatIndex | int | Seat index. |
Future<CompletionHandler> leaveSeat();
Future<CompletionHandler> lockSeat(int seatIndex);
Parameter | Type | Description |
seatIndex | int | Seat index. |
Future<CompletionHandler> unlockSeat(int seatIndex);
Parameter | Type | Description |
seatIndex | int | Seat index. |
Future<CompletionHandler> kickUserOutOfSeat(String userID);
Parameter | Type | Description |
userID | String | User ID. |
Future<CompletionHandler> moveUserToSeat({required String userID,required int targetIndex,MoveSeatPolicy policy = MoveSeatPolicy.abortWhenOccupied,});
Parameter | Type | Description |
userID | String | User ID. |
targetIndex | int | Target seat index. |
policy | Move policy. |
Future<CompletionHandler> setFeaturedHost(String userID);
Parameter | Type | Description |
userID | String | User ID. |
Future<CompletionHandler> revokeFeaturedHost(String userID);
Parameter | Type | Description |
userID | String | User ID. |
Future<CompletionHandler> openRemoteCamera({required String userID,required DeviceControlPolicy policy,});
Parameter | Type | Description |
userID | String | User ID. |
policy | Device control policy. |
Future<CompletionHandler> closeRemoteCamera(String userID);
Parameter | Type | Description |
userID | String | User ID. |
Future<CompletionHandler> openRemoteMicrophone({required String userID,required DeviceControlPolicy policy,});
Parameter | Type | Description |
userID | String | User ID. |
policy | Device control policy. |
Future<CompletionHandler> closeRemoteMicrophone(String userID);
Parameter | Type | Description |
userID | String | User ID. |
Enum Value | Description |
abortWhenOccupied | Abort when occupied. |
forceReplace | Force replace. |
swapPosition | Swap position. |
Enum Value | Description |
unlockOnly | Unlock only. |
Enum Value | Description |
none | Not suspended. |
inBackground | User suspended in background. |
inCalling | User is on a phone call. |
Method | Description |
onLocalCameraOpenedByAdmin | Triggered when the local camera is opened by an admin. |
onLocalCameraClosedByAdmin | Triggered when the local camera is closed by an admin. |
onLocalMicrophoneOpenedByAdmin | Triggered when the local microphone is opened by an admin. |
onLocalMicrophoneClosedByAdmin | Triggered when the local microphone is closed by an admin. |
Property | Type | Description |
userID | String | User ID. |
userName | String | User name. |
avatarURL | String | Avatar URL. |
role | User role. | |
liveID | String | Live room ID. |
microphoneStatus | Microphone status. | |
allowOpenMicrophone | bool | Whether microphone can be opened. |
cameraStatus | Camera status. | |
allowOpenCamera | bool | Whether camera can be opened. |
userSuspendStatus | User suspend status. |
Property | Type | Description |
x | int | X coordinate. |
y | int | Y coordinate. |
w | int | Width. |
h | int | Height. |
zorder | int | Z-order. |
Property | Type | Description |
userID | String | User ID. |
videoBitrate | int | Local video bitrate. |
videoWidth | int | Local video width. |
videoHeight | int | Local video height. |
frameRate | int | Local video frame rate. |
audioSampleRate | int | Audio sample rate. |
audioBitrate | int | Audio bitrate. |
Property | Type | Description |
index | int | Seat index. |
isLocked | bool | Whether locked. |
userInfo | User information. | |
region | Region information. | |
isFeaturedHost | bool | Whether the user on this seat is currently a featured host. Can only be true in templates that support featured host slots. |
Property | Type | Description |
w | int | Width. |
h | int | Height. |
templateID | int | Template ID. |
Property | Type | Description |
seatList | Seat list. | |
canvas | Canvas information. | |
speakingUsers | ValueListenable<Map<String, int>> | Speaking users. |
avStatistics | Audio and video statistics. |
フィードバック