LikeStore provides a complete set of like management APIs, including sending likes, listening to like events, and getting like states. Through this class, you can implement like interaction features in live rooms.LikeStore instance, which requires a valid live room ID.Property | Type | Description |
totalLikeCount | UInt | Total accumulated like count of the current live room/voice chat room, supporting real-time updates and subscription listening. |
Function | Description |
Create like management instance. | |
Like event publisher. | |
Send likes. |
public static func create(liveID: String) -> LikeStore {let store: LikeStoreImpl = StoreFactory.shared.getStore(roomID: liveID)return store}
Parameter | Type | Description |
liveID | String | Live room ID. |
public func sendLike(count: UInt = 1, completion: CompletionClosure?) {fatalError("\\(#function) must be overridden by subclass")}
Parameter | Type | Description |
count | UInt | Like count, default is 1. |
completion | Completion callback (success/failure status). |
Property | Type | Description |
totalLikeCount | UInt | Total accumulated like count of the current live room/voice chat room, supporting real-time updates and subscription listening. |
case onReceiveLikesMessage(liveID: String, totalLikesReceived: UInt, sender: LiveUserInfo)
Parameter | Type | Description |
liveID | String | Live room ID. |
totalLikesReceived | UInt | Number of new likes received this time. |
sender | Like sender information. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan