LiveAudienceStore

abstract class LiveAudienceStore

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

Overview

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.

Core 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. 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

OperationMethodDescription
Fetch Audience ListfetchAudienceListGet the audience list of the current room
Set AdministratorsetAdministratorSet a user as administrator
Revoke AdministratorrevokeAdministratorRevoke user's administrator permission
Kick UserkickUserOutOfRoomKick a user out of the room
Mute UserdisableSendMessageDisable/enable user message sending

Topics

Creating Instance

Observing State and Events

Audience Management

See Also

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Current room's audience state.

Functions

Link copied to clipboard

Add audience event listener

Link copied to clipboard
abstract fun disableSendMessage(userID: String?, isDisable: Boolean, completion: CompletionHandler?)

Disable/enable user message sending

Link copied to clipboard
abstract fun fetchAudienceList(completion: CompletionHandler?)

Fetch audience list

Link copied to clipboard
abstract fun kickUserOutOfRoom(userID: String?, completion: CompletionHandler?)

Kick user out of room

Link copied to clipboard

Remove audience event listener

Link copied to clipboard
abstract fun revokeAdministrator(userID: String?, completion: CompletionHandler?)

Revoke administrator

Link copied to clipboard
abstract fun setAdministrator(userID: String?, completion: CompletionHandler?)

Set administrator