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.LiveAudienceStore instance, which requires a valid live room ID.Property | Type | Description |
audienceList | Audience list. | |
audienceCount | StateFlow<Int> | Audience count. |
adminList | Administrator list. | |
messageBannedUserList | List of users banned from sending messages. |
Function | Description |
Create audience management instance. | |
Audience event callbacks. | |
Audience event callbacks. | |
Fetch audience list. | |
Set administrator. | |
Revoke administrator. | |
Kick user. | |
Mute/unmute user. |
abstract fun addLiveAudienceListener(listener: LiveAudienceListener)
Parameter | Type | Description |
listener | Listener. |
abstract fun removeLiveAudienceListener(listener: LiveAudienceListener)
Parameter | Type | Description |
listener | Listener. |
abstract fun fetchAudienceList(completion: CompletionHandler?)
Parameter | Type | Description |
completion | CompletionHandler? | Completion callback. |
abstract fun setAdministrator(userID: String?, completion: CompletionHandler?)
Parameter | Type | Description |
userID | String? | User ID to be set as administrator. |
completion | CompletionHandler? | Completion callback. |
abstract fun revokeAdministrator(userID: String?, completion: CompletionHandler?)
Parameter | Type | Description |
userID | String? | User ID to revoke administrator permission. |
completion | CompletionHandler? | Completion callback. |
abstract fun kickUserOutOfRoom(userID: String?, completion: CompletionHandler?)
Parameter | Type | Description |
userID | String? | User ID to be kicked out. |
completion | CompletionHandler? | Completion callback. |
abstract fun disableSendMessage(userID: String?,isDisable: Boolean,completion: CompletionHandler?)
Parameter | Type | Description |
userID | String? | Target user ID. |
isDisable | Boolean | true to disable message sending, false to enable. |
completion | CompletionHandler? | Completion callback. |
Enum Value | Description |
OWNER | Room owner. |
ADMIN | Administrator. |
GENERAL_USER | General user. |
Property | Type | Description |
userID | String | User unique identifier ID. |
userName | String | User name. |
avatarURL | String | User avatar URL. |
Property | Type | Description |
audienceList | Audience list. | |
audienceCount | StateFlow<Int> | Audience count. |
adminList | Administrator list. | |
messageBannedUserList | List of users banned from sending messages. |
open fun onOwnerJoined(owner: LiveUserInfo) {}
Parameter | Type | Description |
owner | Information of the joined owner. |
open fun onOwnerLeft(owner: LiveUserInfo) {}
Parameter | Type | Description |
owner | Information of the left owner. |
open fun onAdminJoined(admin: LiveUserInfo) {}
Parameter | Type | Description |
admin | Information of the joined admin. |
open fun onAdminLeft(admin: LiveUserInfo) {}
Parameter | Type | Description |
admin | Information of the left admin. |
open fun onAudienceJoined(audience: LiveUserInfo) {}
Parameter | Type | Description |
audience | Information of the joined audience. |
open fun onAudienceLeft(audience: LiveUserInfo) {}
Parameter | Type | Description |
audience | Information of the left audience. |
open fun onAudienceMessageDisabled(audience: LiveUserInfo, isDisable: Boolean) {}
Parameter | Type | Description |
audience | Audience information. | |
isDisable | Boolean | Whether message sending is disabled. |
フィードバック