forked from SocialSisterYi/bilibili-API-collect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathv1.proto
546 lines (403 loc) · 8.35 KB
/
v1.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
syntax = "proto3";
package bilibili.community.service.dm.v1;
//弹幕
service DM {
//修改弹幕配置
//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmPlayerConfig
rpc DmPlayerConfig (DmPlayerConfigReq) returns (Response);
//获取分段弹幕
//
rpc DmSegMobile (DmSegMobileReq) returns (DmSegMobileReply);
//获取弹幕元数据
//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmView
rpc DmView (DmViewReq) returns (DmViewReply);
}
//修改弹幕配置-请求
message DmPlayerConfigReq{
//
int64 ts = 1;
//
PlayerDanmakuSwitch switch = 2;
//
PlayerDanmakuSwitchSave switchSave = 3;
//
PlayerDanmakuUseDefaultConfig useDefaultConfig = 4;
//
PlayerDanmakuAiRecommendedSwitch aiRecommendedSwitch = 5;
//
PlayerDanmakuAiRecommendedLevel aiRecommendedLevel = 6;
//
PlayerDanmakuBlocktop blocktop = 7;
//
PlayerDanmakuBlockscroll blockscroll = 8;
//
PlayerDanmakuBlockbottom blockbottom = 9;
//
PlayerDanmakuBlockcolorful blockcolorful = 10;
//
PlayerDanmakuBlockrepeat blockrepeat = 11;
//
PlayerDanmakuBlockspecial blockspecial = 12;
//
PlayerDanmakuOpacity opacity = 13;
//
PlayerDanmakuScalingfactor scalingfactor = 14;
//
PlayerDanmakuDomain domain = 15;
//
PlayerDanmakuSpeed speed = 16;
//
PlayerDanmakuEnableblocklist enableblocklist = 17;
//
InlinePlayerDanmakuSwitch inlinePlayerDanmakuSwitch = 18;
}
//修改弹幕配置-回复
message Response{
//
int32 code = 1;
//
string message = 2;
}
//获取分段弹幕-请求
message DmSegMobileReq{
//稿件avid/漫画epid
int64 pid = 1;
//视频cid/漫画cid
int64 oid = 2;
//弹幕类型
//1:视频 2:漫画
int32 type = 3;
//分段序号
int64 segmentIndex = 4;
//是否青少年模式
int32 teenagersMode = 5;
}
//获取分段弹幕-回复
message DmSegMobileReply{
//弹幕条目
repeated DanmakuElem elems = 1;
//是否已关闭弹幕
//0:未关闭 1:已关闭
int32 state = 2;
//
DanmakuAIFlag aiFlag = 3;
}
//获取弹幕元数据-请求
message DmViewReq{
//稿件avid/漫画epid
int64 pid = 1;
//视频cid/漫画cid
int64 oid = 2;
//弹幕类型
//1:视频 2:漫画
int32 type = 3;
//页面spm
string spmid = 4;
//是否冷启
int32 isHardBoot = 5;
}
//获取弹幕元数据-回复
message DmViewReply{
//是否已关闭弹幕
//0:未关闭 1:已关闭
bool closed = 1;
//智能防挡弹幕蒙版信息
VideoMask mask = 2;
//视频字幕信息
VideoSubtitle subtitle = 3;
//高级弹幕专包url
repeated string specialDms = 4;
//云屏蔽配置信息
DanmakuFlagConfig aiFlag = 5;
//
DanmuPlayerViewConfig playerConfig = 6;
//
int32 sendBoxStyle = 7;
//是否允许
bool allow = 8;
//
string checkBox = 9;
//
string checkBoxShowMsg = 10;
//
string textPlaceholder = 11;
//弹幕输入框文案
string inputPlaceholder = 12;
//
repeated string reportFilterContent = 13;
}
//
message DanmakuAIFlag{
//
repeated DanmakuFlag dmFlags = 1;
}
//弹幕条目
message DanmakuElem{
//弹幕dmid
int64 id = 1;
//弹幕出现位置
int32 progress = 2;
//弹幕类型
int32 mode = 3;
//弹幕字号
int32 fontsize = 4;
//弹幕颜色
uint32 color = 5;
//发送着UID hash
string midHash = 6;
//弹幕正文
string content = 7;
//发送时间
int64 ctime = 8;
//权重
int32 weight = 9;
//动作
string action = 10;
//弹幕池
int32 pool = 11;
//弹幕dmid-str
string idStr = 12;
//弹幕属性
//0:正常 4:高赞 16:?
int32 attr = 13;
}
//
message DanmakuFlag{
//
int64 dmid = 1;
//
uint32 flag = 2;
}
//云屏蔽配置信息
message DanmakuFlagConfig{
//云屏蔽等级
int32 recFlag = 1;
//云屏蔽文案
string recText = 2;
//云屏蔽开关
int32 recSwitch = 3;
}
//
message DanmuDefaultPlayerConfig{
//
bool playerDanmakuUseDefaultConfig = 1;
//
bool playerDanmakuAiRecommendedSwitch = 4;
//
int32 playerDanmakuAiRecommendedLevel = 5;
//
bool playerDanmakuBlocktop = 6;
//
bool playerDanmakuBlockscroll = 7;
//
bool playerDanmakuBlockbottom = 8;
//
bool playerDanmakuBlockcolorful = 9;
//
bool playerDanmakuBlockrepeat = 10;
//
bool playerDanmakuBlockspecial = 11;
//
float playerDanmakuOpacity = 12;
//
float playerDanmakuScalingfactor = 13;
//
float playerDanmakuDomain = 14;
//
int32 playerDanmakuSpeed = 15;
//
bool inlinePlayerDanmakuSwitch = 16;
}
//
message DanmuPlayerConfig{
//
bool playerDanmakuSwitch = 1;
//
bool playerDanmakuSwitchSave = 2;
//
bool playerDanmakuUseDefaultConfig = 3;
//
bool playerDanmakuAiRecommendedSwitch = 4;
//
int32 playerDanmakuAiRecommendedLevel = 5;
//
bool playerDanmakuBlocktop = 6;
//
bool playerDanmakuBlockscroll = 7;
//
bool playerDanmakuBlockbottom = 8;
//
bool playerDanmakuBlockcolorful = 9;
//
bool playerDanmakuBlockrepeat = 10;
//
bool playerDanmakuBlockspecial = 11;
//
float playerDanmakuOpacity = 12;
//
float playerDanmakuScalingfactor = 13;
//
float playerDanmakuDomain = 14;
//
int32 playerDanmakuSpeed = 15;
//
bool playerDanmakuEnableblocklist = 16;
//
bool inlinePlayerDanmakuSwitch = 17;
//
int32 inlinePlayerDanmakuConfig = 18;
}
//
message DanmuPlayerDynamicConfig{
//
int32 progress = 1;
//
float playerDanmakuDomain = 2;
}
//
message DanmuPlayerViewConfig{
//
DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1;
//
DanmuPlayerConfig danmukuPlayerConfig = 2;
//
repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3;
}
//
message InlinePlayerDanmakuSwitch{
//
bool value = 1;
}
//
message PlayerDanmakuAiRecommendedLevel{
//
bool value = 1;
}
//
message PlayerDanmakuAiRecommendedSwitch{
//
bool value = 1;
}
//
message PlayerDanmakuBlockbottom{
//
bool value = 1;
}
//
message PlayerDanmakuBlockcolorful{
//
bool value = 1;
}
//
message PlayerDanmakuBlockrepeat{
//
bool value = 1;
}
//
message PlayerDanmakuBlockscroll{
//
bool value = 1;
}
//
message PlayerDanmakuBlockspecial{
//
bool value = 1;
}
//
message PlayerDanmakuBlocktop{
//
bool value = 1;
}
//
message PlayerDanmakuDomain{
//
float value = 1;
}
//
message PlayerDanmakuEnableblocklist{
//
bool value = 1;
}
//
message PlayerDanmakuOpacity{
//
float value = 1;
}
//
message PlayerDanmakuScalingfactor{
//
float value = 1;
}
//
message PlayerDanmakuSpeed{
//
int32 value = 1;
}
//
message PlayerDanmakuSwitch{
//
bool value = 1;
}
//
message PlayerDanmakuSwitchSave{
//
bool value = 1;
}
//
message PlayerDanmakuUseDefaultConfig{
//
bool value = 1;
}
//单个字幕信息
message SubtitleItem{
//字幕id
int64 id = 1;
//字幕id-str
string idStr = 2;
//字幕语言代码
string lan = 3;
//字幕语言
string lanDoc = 4;
//字幕文件url
string subtitleUrl = 5;
//字幕作者信息
UserInfo author = 6;
}
//字幕作者信息
message UserInfo{
//作者uid
int64 mid = 1;
//作者昵称
string name = 2;
//作者性别
string sex = 3;
//作者头像url
string face = 4;
//作者个人签名
string sign = 5;
//
int32 rank = 6;
}
//智能防挡弹幕蒙版信息
message VideoMask{
//视频cid
int64 cid = 1;
//平台
//0:web端 1:app端
int32 plat = 2;
//帧率
int32 fps = 3;
//间隔时间
int64 time = 4;
//蒙版url
string maskUrl = 5;
}
//视频字幕信息
message VideoSubtitle{
//视频原语言代码
string lan = 1;
//视频原语言
string lanDoc = 2;
//视频字幕列表
repeated SubtitleItem subtitles = 3;
}