forked from sandboxdream/AI-Vtuber
-
Notifications
You must be signed in to change notification settings - Fork 493
/
ks.proto
286 lines (256 loc) · 5.85 KB
/
ks.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
syntax = "proto3";
package kuaishouPubf;
// 进入房间
message CSWebEnterRoom {
int64 payloadType = 1;
message Payload {
string token = 1;
string liveStreamId = 2;
uint32 reconnectCount = 3;
uint32 lastErrorCode = 4;
string expTag = 5;
string attach = 6;
string pageId = 7;
}
Payload payload = 3;
}
// 进入房间后应答包
message SCWebEnterRoomAck {
uint64 minReconnectMs = 1;
uint64 maxReconnectMs = 2;
uint64 heartbeatIntervalMs = 3;
}
// 用户信息包
message SimpleUserInfo {
string principalId = 1;
string userName = 2;
string headUrl = 3;
}
// 观看用户信息
message WebWatchingUserInfo {
SimpleUserInfo user = 1;
bool offline = 2;
bool tuhao = 3;
WebLiveAssistantType liveAssistantType = 4;
string displayKsCoin = 5;
}
// 观看用户数
message SCWebLiveWatchingUsers {
repeated WebWatchingUserInfo watchingUser = 1;
string displayWatchingCount = 2;
uint64 pendingDuration = 3;
}
// 心跳包
message CSWebHeartbeat {
int64 payloadType = 1;
message Payload {
uint64 timestamp = 1;
}
Payload payload = 3;
}
// 消息主体包
message SocketMessage {
PayloadType payloadType = 1;
CompressionType compressionType = 2;
bytes payload = 3;
}
// 心跳包响应
message SCHeartbeatAck {
uint64 timestamp = 1;
uint64 clientTimestamp = 2;
}
message WebCommentFeed {
string id = 1;
SimpleUserInfo user = 2;
string content = 3;
string deviceHash = 4;
uint64 sortRank = 5;
string color = 6;
WebCommentFeedShowType showType = 7;
LiveAudienceState senderState = 8;
}
message LiveAudienceState {
bool isFromFansTop = 1;
bool isKoi = 2;
AssistantType assistantType = 3;
uint32 fansGroupIntimacyLevel = 4;
GzoneNameplate nameplate = 5;
LiveFansGroupState liveFansGroupState = 6;
uint32 wealthGrade = 7;
string badgeKey = 8;
}
message LiveFansGroupState {
uint32 intimacyLevel = 1;
uint32 enterRoomSpecialEffect = 2;
}
message GzoneNameplate {
int64 id = 1;
string name = 2;
repeated PicUrl urls = 3;
}
message PicUrl {
string cdn = 1;
string url = 2;
string urlPattern = 3;
string ip = 4;
}
message SCWebFeedPush {
string displayWatchingCount = 1;
string displayLikeCount = 2;
uint64 pendingLikeCount = 3;
uint64 pushInterval = 4;
repeated WebCommentFeed commentFeeds = 5;
string commentCursor = 6;
repeated WebComboCommentFeed comboCommentFeed = 7;
repeated WebLikeFeed likeFeeds = 8;
repeated WebGiftFeed giftFeeds = 9;
string giftCursor = 10;
repeated WebSystemNoticeFeed systemNoticeFeeds = 11;
repeated WebShareFeed shareFeeds = 12;
}
message WebShareFeed {
string id = 1;
SimpleUserInfo user = 2;
uint64 time = 3;
uint32 thirdPartyPlatform = 4;
uint64 sortRank = 5;
WebLiveAssistantType liveAssistantType = 6;
string deviceHash = 7;
}
message WebSystemNoticeFeed {
string id = 1;
SimpleUserInfo user = 2;
uint64 time = 3;
string content = 4;
uint64 displayDuration = 5;
uint64 sortRank = 6;
DisplayType displayType = 7;
}
message WebGiftFeed {
string id = 1;
SimpleUserInfo user = 2;
uint64 time = 3;
uint32 giftId = 4;
uint64 sortRank = 5;
string mergeKey = 6;
uint32 batchSize = 7;
uint32 comboCount = 8;
uint32 rank = 9;
uint64 expireDuration = 10;
uint64 clientTimestamp = 11;
uint64 slotDisplayDuration = 12;
uint32 starLevel = 13;
StyleType styleType = 14;
WebLiveAssistantType liveAssistantType = 15;
string deviceHash = 16;
bool danmakuDisplay = 17;
}
message WebLikeFeed {
string id = 1;
SimpleUserInfo user = 2;
uint64 sortRank = 3;
string deviceHash = 4;
}
message WebComboCommentFeed {
string id = 1;
string content = 2;
uint32 comboCount = 3;
}
enum CompressionType {
COMPRESSION_TYPE_UNKNOWN = 0;
NONE = 1;
GZIP = 2;
AES = 3;
}
// 弹幕数据包返回类型
enum PayloadType {
PAYLOAD_TYPE_UNKNOWN = 0;
CS_HEARTBEAT = 1;
CS_ERROR = 3;
CS_PING = 4;
PS_HOST_INFO = 51;
SC_HEARTBEAT_ACK = 101;
SC_ECHO = 102;
SC_ERROR = 103;
SC_PING_ACK = 104;
SC_INFO = 105;
CS_ENTER_ROOM = 200;
CS_USER_PAUSE = 201;
CS_USER_EXIT = 202;
CS_AUTHOR_PUSH_TRAFFIC_ZERO = 203;
CS_HORSE_RACING = 204;
CS_RACE_LOSE = 205;
CS_VOIP_SIGNAL = 206;
SC_ENTER_ROOM_ACK = 300;
SC_AUTHOR_PAUSE = 301;
SC_AUTHOR_RESUME = 302;
SC_AUTHOR_PUSH_TRAFFIC_ZERO = 303;
SC_AUTHOR_HEARTBEAT_MISS = 304;
SC_PIP_STARTED = 305;
SC_PIP_ENDED = 306;
SC_HORSE_RACING_ACK = 307;
SC_VOIP_SIGNAL = 308;
SC_FEED_PUSH = 310;
SC_ASSISTANT_STATUS = 311;
SC_REFRESH_WALLET = 312;
SC_LIVE_CHAT_CALL = 320;
SC_LIVE_CHAT_CALL_ACCEPTED = 321;
SC_LIVE_CHAT_CALL_REJECTED = 322;
SC_LIVE_CHAT_READY = 323;
SC_LIVE_CHAT_GUEST_END = 324;
SC_LIVE_CHAT_ENDED = 325;
SC_RENDERING_MAGIC_FACE_DISABLE = 326;
SC_RENDERING_MAGIC_FACE_ENABLE = 327;
SC_RED_PACK_FEED = 330;
SC_LIVE_WATCHING_LIST = 340;
SC_LIVE_QUIZ_QUESTION_ASKED = 350;
SC_LIVE_QUIZ_QUESTION_REVIEWED = 351;
SC_LIVE_QUIZ_SYNC = 352;
SC_LIVE_QUIZ_ENDED = 353;
SC_LIVE_QUIZ_WINNERS = 354;
SC_SUSPECTED_VIOLATION = 355;
SC_SHOP_OPENED = 360;
SC_SHOP_CLOSED = 361;
SC_GUESS_OPENED = 370;
SC_GUESS_CLOSED = 371;
SC_PK_INVITATION = 380;
SC_PK_STATISTIC = 381;
SC_RIDDLE_OPENED = 390;
SC_RIDDLE_CLOESED = 391;
SC_RIDE_CHANGED = 412;
SC_BET_CHANGED = 441;
SC_BET_CLOSED = 442;
SC_LIVE_SPECIAL_ACCOUNT_CONFIG_STATE = 645;
SC_LIVE_WARNING_MASK_STATUS_CHANGED_AUDIENCE = 758;
}
enum WebLiveAssistantType {
WEB_LIVE_ASSISTANT_TYPE_UNKNOWN_ASSISTANT_TYPE = 0;
SUPER = 1;
JUNIOR = 2;
}
enum WebCommentFeedShowType {
FEED_SHOW_UNKNOWN = 0;
FEED_SHOW_NORMAL = 1;
FEED_HIDDEN = 2;
}
enum AssistantType {
UNKNOWN_ASSISTANT_TYPE = 0;
ASSISTANT_SUPER = 1;
ASSISTANT_JUNIOR = 2;
}
enum StyleType {
UNKNOWN_STYLE = 0;
BATCH_STAR_0 = 1;
BATCH_STAR_1 = 2;
BATCH_STAR_2 = 3;
BATCH_STAR_3 = 4;
BATCH_STAR_4 = 5;
BATCH_STAR_5 = 6;
BATCH_STAR_6 = 7;
}
enum DisplayType {
UNKNOWN_DISPLAY_TYPE = 0;
COMMENT = 1;
ALERT = 2;
TOAST =3;
}