Barrage
data class Barrage(var liveID: String = "", var sender: LiveUserInfo = LiveUserInfo(), var sequence: Long = 0, var timestampInSecond: Long = 0, var messageType: BarrageType = BarrageType.TEXT, var textContent: String = "", var extensionInfo: Map<String, String> = emptyMap(), var businessID: String = "", var data: String = "")
Barrage data model, containing complete attribute information of a single barrage.
Overview
Contains complete information about the barrage sender, content, type, etc.
Property Overview
| Property | Type | Description |
| liveID | String | Unique identifier ID of the live room/voice chat room the barrage belongs to |
| sender | LiveUserInfo | User information of the barrage sender |
| sequence | Long | Unique sequence ID of the barrage message |
| timestampInSecond | Long | Barrage sending timestamp (unit: seconds) |
| messageType | BarrageType | Barrage message type (text or custom) |
| textContent | String | Message content of text type barrage |
| extensionInfo | Map<String, String> | Barrage extension information |
| businessID | String | Business identifier ID of custom type barrage |
| data | String | Specific data content of custom type barrage |
Properties
Link copied to clipboard
Business identifier ID of custom type barrage, used to distinguish custom barrages from different business scenarios.
Link copied to clipboard
Barrage extension information, customizable fields (such as display style, priority, etc.). Valid when messageType is TEXT.
Link copied to clipboard
Barrage message type (text or custom).
Link copied to clipboard
User information of the barrage sender (such as user ID, nickname, avatar, etc.).
Link copied to clipboard
Message content of text type barrage, i.e., the text content of the barrage.
Link copied to clipboard
Barrage sending timestamp (unit: seconds), used to display sending time order.