LiveListStore provides a complete set of live room management APIs, including starting live, joining live, leaving live, ending live and other functions. Through this class, you can manage the lifecycle of live rooms. The host calls startLive/endLive to start and dismiss a live room, while the audience calls joinLive/leaveLive to join and leave a live room.LiveListStore instance.Function | Description |
Singleton object. | |
Live list event callbacks. | |
Live list event callbacks. | |
Get live list. | |
Get live info. | |
Start live (Host only). | |
Join live (Audience only). | |
Leave live (Audience only). | |
End live (Host only). | |
Update live info. | |
Query metadata. | |
Update metadata. |
void addLiveListListener(LiveListListener listener);
Parameter | Type | Required | Description |
listener | Required | Listener. |
void removeLiveListListener(LiveListListener listener);
Parameter | Type | Required | Description |
listener | Required | Listener. |
Future<CompletionHandler> fetchLiveList({required String cursor,required int count,});
Parameter | Type | Required | Description |
cursor | String | Required | Cursor. |
count | int | Required | Count. |
Future<LiveInfoCompletionHandler> fetchLiveInfo(String liveID);
Parameter | Type | Required | Description |
liveID | String | Required | Live room ID. |
completion | Required | Completion callback. |
Future<LiveInfoCompletionHandler> startLive(LiveInfo liveInfo);
Parameter | Type | Required | Description |
liveInfo | Required | Live info. |
Future<LiveInfoCompletionHandler> joinLive(String liveID);
Parameter | Type | Required | Description |
liveID | String | Required | Live ID. |
Future<CompletionHandler> leaveLive();
Future<StopLiveCompletionHandler> endLive();
Future<CompletionHandler> updateLiveInfo({required LiveInfo liveInfo,required List<ModifyFlag> modifyFlagList,});
Parameter | Type | Required | Description |
liveInfo | Required | Live info. | |
modifyFlag | List<ModifyFlag> | Required | Modify flag. |
Future<MetaDataCompletionHandler> queryMetaData(List<String> keys);
Parameter | Type | Required | Description |
keys | List<String> | Required | Key list. |
Future<CompletionHandler> updateLiveMetaData(Map<String, String> metaData);
Parameter | Type | Required | Description |
metaData | Map<String, String> | Required | Metadata. |
Enum Value | Description |
free | Free to take seat. |
apply | Apply to take seat. |
Enum Value | Description |
VideoDynamicGrid9Seats | Portrait dynamic 9-grid layout for video live streaming. |
VideoDynamicFloat7Seats | Portrait dynamic 1v6 floating layout for video live streaming. |
VideoLeftFocus9Seats | Portrait left focus 9-grid layout for video live streaming. |
VideoUniformGrid9Seats | Portrait uniform 9-grid layout for video live streaming. |
VideoFixedGrid9Seats | Portrait static 9-grid layout for video live streaming. |
VideoFixedFloat7Seats | Portrait static 1v6 floating layout for video live streaming. |
VideoLandscape4Seats | Landscape 4-seat layout for video live streaming. |
Karaoke | Audio KTV layout for karaoke scenes with configurable seat count. |
AudioSalon | Audio salon layout for voice chat scenes with configurable seat count. |
Enum Value | Description |
endedByHost | Ended by host. |
endedByServer | Ended by server. |
Enum Value | Description |
byAdmin | Kicked out by admin. |
byLoggedOnOtherDevice | Logged on other device. |
byServer | Kicked out by server. |
forNetworkDisconnected | Network disconnected. |
forJoinRoomStatusInvalidDuringOffline | Join room status invalid during offline. |
forCountOfJoinedRoomsExceedLimit | Count of joined rooms exceed limit. |
Property | Type | Description |
liveID | String | Live ID. |
liveName | String | Live name. |
notice | String | Live notice. |
isMessageDisable | bool | Whether message is disabled. |
isPublicVisible | bool | Whether publicly visible. |
isSeatEnabled | bool | Whether seat is enabled. |
keepOwnerOnSeat | bool | Whether to keep owner on seat. |
maxSeatCount | int | Maximum seat count. |
seatMode | Take seat mode. | |
seatTemplate | Seat layout template for simplifying seat configuration. | |
seatLayoutTemplateID | int | Seat layout template ID. |
coverURL | String | Cover URL. |
backgroundURL | String | Background URL. |
categoryList | List<int> | Category list. |
activityStatus | int | Activity status. |
liveOwner | LiveUserInfo | Live owner info. |
createTime | int | Create time. |
totalViewerCount | int | Total viewer count. |
isGiftEnabled | bool | Whether gift is enabled. |
metaData | Map<String, String> | Metadata. |
void Function(String liveID, LiveEndedReason reason, String message)? onLiveEnded;
Parameter | Type | Description |
liveID | String | Live ID. |
reason | Ended reason. | |
message | String | Message. |
void Function(String liveID, LiveKickedOutReason reason, String message)? onKickedOutOfLive;LiveListListener({this.onLiveEnded, this.onKickedOutOfLive});
Parameter | Type | Description |
liveID | String | Live ID. |
reason | Kicked out reason. | |
message | String | Message. |
Property | Type | Description |
liveInfo | Live info returned on success. |
Property | Type | Description |
statisticsData | TUILiveStatisticsData | Live statistics data returned on success. |
Property | Type | Description |
metaData | Map<String, String> | Metadata returned on success. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback