mirror of
https://github.com/czp3009/bilibili-api.git
synced 2025-01-20 20:40:42 +08:00
更新 DANMU_MSG 数据包结构
This commit is contained in:
parent
5453008056
commit
5ab15b2e3e
@ -32,7 +32,8 @@
|
||||
0,
|
||||
//是否是 svip
|
||||
10000,
|
||||
1
|
||||
1,
|
||||
""
|
||||
],
|
||||
//发送者的粉丝勋章有关信息(没有粉丝勋章的发送者, 这个 JsonArray 将是空的)
|
||||
[
|
||||
@ -41,9 +42,9 @@
|
||||
"夏沫",
|
||||
//勋章名称
|
||||
"乄夏沫丶",
|
||||
//勋章主播的名字
|
||||
//勋章对应的主播的名字
|
||||
"1547306",
|
||||
//勋章主播的直播间
|
||||
//勋章对应的主播的直播间
|
||||
16746162,
|
||||
""
|
||||
],
|
||||
@ -62,7 +63,10 @@
|
||||
"title-131-1"
|
||||
],
|
||||
0,
|
||||
0
|
||||
0,
|
||||
{
|
||||
"uname_color": ""
|
||||
}
|
||||
],
|
||||
"cmd": "DANMU_MSG"
|
||||
}
|
||||
|
@ -19,7 +19,8 @@
|
||||
1,
|
||||
0,
|
||||
10000,
|
||||
1
|
||||
1,
|
||||
""
|
||||
],
|
||||
[
|
||||
13,
|
||||
@ -37,7 +38,10 @@
|
||||
],
|
||||
[],
|
||||
0,
|
||||
0
|
||||
0,
|
||||
{
|
||||
"uname_color": ""
|
||||
}
|
||||
],
|
||||
"cmd": "DANMU_MSG"
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ public class DanMuMsgEntity implements DataEntity {
|
||||
}.getType();
|
||||
|
||||
/**
|
||||
* info : [[0,1,25,16777215,1510498713,"1510498712",0,"8a0f75dc",0],"网易云音乐库在当前直播间已停留0天0时39分41秒",[39042255,"夏沫丶琉璃浅梦",0,1,0,10000,1],[13,"夏沫","乄夏沫丶","1547306",16746162,""],[41,0,16746162,6603],[],0,0]
|
||||
* info : [[0,1,25,16777215,1520664535,1662637384,0,"88874b7b",0],"czpnb",[15723776,"Dough君",0,0,0,"10000",1,""],[],[10,0,9868950,">50000"],[],0,0,{"uname_color":""}]
|
||||
* cmd : DANMU_MSG
|
||||
*/
|
||||
|
||||
@ -152,4 +152,9 @@ public class DanMuMsgEntity implements DataEntity {
|
||||
public List<String> getUserTitles() {
|
||||
return GSON.fromJson(info.get(5), STRING_LIST_TYPE);
|
||||
}
|
||||
|
||||
//获得用户名颜色
|
||||
public String getUsernameColor() {
|
||||
return info.get(8).getAsJsonObject().get("uname_color").getAsString();
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ import com.hiczp.bilibili.api.live.entity.BulletScreenEntity;
|
||||
import org.junit.Test;
|
||||
|
||||
public class SendBulletScreenTest {
|
||||
private static final long ROOM_ID = 29434;
|
||||
private static final long ROOM_ID = 1110317;
|
||||
private static final BilibiliAPI BILIBILI_API = Config.getBilibiliAPI();
|
||||
|
||||
@Test
|
||||
|
Loading…
Reference in New Issue
Block a user