Barrage Store
Barrage related interfaces, managing barrage sending, barrage state synchronization, and barrage event listening in live rooms/voice chat rooms.
Overview
BarrageStore Barrage management class for handling barrage related business logic in live rooms/voice chat rooms. BarrageStore provides a complete set of barrage management APIs, including sending text barrages, sending custom barrages, and adding local tip messages. Through this class, you can implement barrage interaction functionality in live rooms.
Main Features
Text Barrage: Supports sending plain text barrage messages
Custom Barrage: Supports sending custom format barrages (such as barrages with special effects)
Local Tips: Supports adding tip messages visible only locally
Important: Use the BarrageStore.create factory method to create a
BarrageStoreinstance, which requires a valid live room ID. Barrage state updates are delivered through the barrageState publisher. Subscribe to it to receive real-time updates of barrage data in the room.
Barrage Type Description
| Type | Enum Value | Description |
| BarrageType.TEXT | 0 | Text type barrage, contains plain text content |
| BarrageType.CUSTOM | 1 | Custom type barrage, supports business custom data format |
Topics
Creating Instance
BarrageStore.create - Create barrage management instance
Observing State
barrageState - Barrage state data
Sending Barrage
sendTextMessage - Send text barrage
sendCustomMessage - Send custom barrage
Local Messages
appendLocalTip - Add local tip message
See Also
Properties
Functions
Add local tip message (add tip or operation feedback message locally, visible only to the current client).
Send custom type barrage.
Send text type barrage.