LiveAudienceStore class abstract

Live audience related interfaces, managing audience list, permission settings and other operations.

LiveAudienceStore Live audience management class for managing audience list, permission settings and related business. LiveAudienceStore provides a complete set of audience management APIs, including fetching audience list, setting administrators, kicking users, muting, etc. Through this class, you can implement audience management functions in live rooms.

Key Features

  • Audience List:Get and manage the audience list of the current room
  • Permission Management:Set and revoke administrator permissions
  • User Management:Kick users, mute, and other operations
  • Event Listening:Listen for audience join, leave, and other events

Important: Use the LiveAudienceStore.create factory method to create a LiveAudienceStore instance, which requires a valid live room ID.

Note: Audience state updates are delivered through the liveAudienceState publisher. Subscribe to it to receive real-time updates of audience data in the room.

Audience Management Operations Overview

Operation Method Description
Fetch Audience List fetchAudienceList Get the audience list of the current room
Set Administrator setAdministrator Set a user as administrator
Revoke Administrator revokeAdministrator Revoke user's administrator permission
Kick User kickUserOutOfRoom Kick a user out of the room
Mute User disableSendMessage Disable/enable user message sending

Topics

Creating Instance

Observing State and Events

Audience Management

See Also

Constructors

LiveAudienceStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
liveAudienceState LiveAudienceState
Current room's audience state.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addLiveAudienceListener(LiveAudienceListener listener) → void
Add audience event listener
disableSendMessage({required String userID, required bool isDisable}) Future<CompletionHandler>
Disable/enable user message sending
fetchAudienceList() Future<CompletionHandler>
Fetch audience list
kickUserOutOfRoom(String userID) Future<CompletionHandler>
Kick user out of room
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeLiveAudienceListener(LiveAudienceListener listener) → void
Remove audience event listener
revokeAdministrator(String userID) Future<CompletionHandler>
Revoke administrator
setAdministrator(String userID) Future<CompletionHandler>
Set administrator
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create(String liveID) LiveAudienceStore
Create audience management instance