Like Store
Like related interfaces, managing like sending, like state synchronization, and like event listening operations in live rooms/voice chat rooms.
Overview
LikeStore Like management class for handling like-related business logic in live rooms/voice chat rooms. 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.
Core Features
Like Sending: Support sending likes to the current room
Like State: Get the accumulated like count of the current room
Event Listening: Listen to like receiving events
Important: Use the LikeStore.create factory method to create a
LikeStoreinstance, which requires a valid live room ID. Like state updates are delivered through the likeState publisher. Subscribe to it to receive real-time updates of like data in the room.
Like Operations Overview
| Operation | Method | Description |
| Send Like | sendLike | Send likes to the current room |
| Get State | likeState | Get the like state of the current room |
| Add Listener | addLikeListener | Add like event listener |
| Remove Listener | removeLikeListener | Remove like event listener |
Topics
Creating Instance
LikeStore.create - Create like management instance
Observing State and Events
likeState - Like state of the current room
addLikeListener/removeLikeListener - Like event callbacks
Like Operations
sendLike - Send likes