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 | UInt | Audience count. |
adminList | Administrator list. | |
messageBannedUserList | List of users banned from sending messages. |
Function | Description |
Create audience management instance. | |
Audience event publisher. | |
Fetch audience list. | |
Set administrator. | |
Revoke administrator. | |
Kick user. | |
Mute/unmute user. |
public static func create(liveID: String) -> LiveAudienceStore {let store: LiveAudienceStoreImpl = StoreFactory.shared.getStore(roomID: liveID)return store}
Parameter | Type | Description |
liveID | String | Live room ID. |
public func fetchAudienceList(completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
completion | CompletionClosure? | Completion callback. |
public func setAdministrator(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID to be set as administrator. |
completion | CompletionClosure? | Completion callback. |
public func revokeAdministrator(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID to revoke administrator permission. |
completion | CompletionClosure? | Completion callback. |
public func kickUserOutOfRoom(userID: String,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | User ID to be kicked out. |
completion | CompletionClosure? | Completion callback. |
public func disableSendMessage(userID: String,isDisable: Bool,completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
userID | String | Target user ID. |
isDisable | Bool | true to disable message sending, false to enable. |
completion | CompletionClosure? | Completion callback. |
Enum Value | Description |
owner | Room owner. |
admin | Administrator. |
generalUser | 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 | UInt | Audience count. |
adminList | Administrator list. | |
messageBannedUserList | List of users banned from sending messages. |
case onOwnerJoined(owner: LiveUserInfo)
Parameter | Type | Description |
owner | Information of the joined owner. |
case onOwnerLeft(owner: LiveUserInfo)
Parameter | Type | Description |
owner | Information of the left owner. |
case onAdminJoined(admin: LiveUserInfo)
Parameter | Type | Description |
admin | Information of the joined admin. |
case onAdminLeft(admin: LiveUserInfo)
Parameter | Type | Description |
admin | Information of the left admin. |
case onAudienceJoined(audience: LiveUserInfo)
Parameter | Type | Description |
audience | Information of the joined audience. |
case onAudienceLeft(audience: LiveUserInfo)
Parameter | Type | Description |
audience | Information of the left audience. |
case onAudienceMessageDisabled(audience: LiveUserInfo, isDisable: Bool)
Parameter | Type | Description |
audience | Audience information. | |
isDisable | Bool | Whether message sending is disabled. |
フィードバック