@dan-uni/dan-any 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1095 @@
1
+ syntax = "proto3";
2
+
3
+ package bilibili.community.service.dm.v1;
4
+
5
+ //弹幕
6
+ service DM {
7
+ // 获取分段弹幕
8
+ rpc DmSegMobile (DmSegMobileReq) returns (DmSegMobileReply);
9
+ // 客户端弹幕元数据 字幕、分段、防挡蒙版等
10
+ rpc DmView(DmViewReq) returns (DmViewReply);
11
+ // 修改弹幕配置
12
+ rpc DmPlayerConfig (DmPlayerConfigReq) returns (Response);
13
+ // ott弹幕列表
14
+ rpc DmSegOtt(DmSegOttReq) returns(DmSegOttReply);
15
+ // SDK弹幕列表
16
+ rpc DmSegSDK(DmSegSDKReq) returns(DmSegSDKReply);
17
+ //
18
+ rpc DmExpoReport(DmExpoReportReq) returns (DmExpoReportRes);
19
+ }
20
+
21
+ //
22
+ message Avatar {
23
+ //
24
+ string id = 1;
25
+ //
26
+ string url = 2;
27
+ //
28
+ AvatarType avatar_type = 3;
29
+ }
30
+
31
+ //
32
+ enum AvatarType {
33
+ AvatarTypeNone = 0; //
34
+ AvatarTypeNFT = 1; //
35
+ }
36
+
37
+ //
38
+ message Bubble {
39
+ //
40
+ string text = 1;
41
+ //
42
+ string url = 2;
43
+ }
44
+
45
+ //
46
+ enum BubbleType {
47
+ BubbleTypeNone = 0; //
48
+ BubbleTypeClickButton = 1; //
49
+ BubbleTypeDmSettingPanel = 2; //
50
+ }
51
+
52
+ //
53
+ message BubbleV2 {
54
+ //
55
+ string text = 1;
56
+ //
57
+ string url = 2;
58
+ //
59
+ BubbleType bubble_type = 3;
60
+ //
61
+ bool exposure_once = 4;
62
+ //
63
+ ExposureType exposure_type = 5;
64
+ }
65
+
66
+ //
67
+ message Button {
68
+ //
69
+ string text = 1;
70
+ //
71
+ ToastFunctionType action = 2;
72
+ }
73
+
74
+ //
75
+ message BuzzwordConfig {
76
+ //
77
+ repeated BuzzwordShowConfig keywords = 1;
78
+ }
79
+
80
+ //
81
+ message BuzzwordShowConfig {
82
+ //
83
+ string name = 1;
84
+ //
85
+ string schema = 2;
86
+ //
87
+ int32 source = 3;
88
+ //
89
+ int64 id = 4;
90
+ //
91
+ int64 buzzword_id = 5;
92
+ //
93
+ int32 schema_type = 6;
94
+ }
95
+
96
+ //
97
+ message CheckBox {
98
+ //
99
+ string text = 1;
100
+ //
101
+ CheckboxType type = 2;
102
+ //
103
+ bool default_value = 3;
104
+ //
105
+ bool show = 4;
106
+ }
107
+
108
+ //
109
+ enum CheckboxType {
110
+ CheckboxTypeNone = 0; //
111
+ CheckboxTypeEncourage = 1; //
112
+ CheckboxTypeColorDM = 2; //
113
+ }
114
+
115
+ //
116
+ message CheckBoxV2 {
117
+ //
118
+ string text = 1;
119
+ //
120
+ CheckboxType type = 2;
121
+ //
122
+ bool default_value = 3;
123
+ }
124
+
125
+ //
126
+ message ClickButton {
127
+ //
128
+ repeated string portrait_text = 1;
129
+ //
130
+ repeated string landscape_text = 2;
131
+ //
132
+ repeated string portrait_text_focus = 3;
133
+ //
134
+ repeated string landscape_text_focus = 4;
135
+ //
136
+ RenderType render_type = 5;
137
+ //
138
+ bool show = 6;
139
+ //
140
+ Bubble bubble = 7;
141
+ }
142
+
143
+ //
144
+ message ClickButtonV2 {
145
+ //
146
+ repeated string portrait_text = 1;
147
+ //
148
+ repeated string landscape_text = 2;
149
+ //
150
+ repeated string portrait_text_focus = 3;
151
+ //
152
+ repeated string landscape_text_focus = 4;
153
+ //
154
+ RenderType render_type = 5;
155
+ //
156
+ bool text_input_post = 6;
157
+ //
158
+ bool exposure_once = 7;
159
+ //
160
+ ExposureType exposure_type = 8;
161
+ }
162
+
163
+
164
+ //
165
+ message Command {
166
+ //
167
+ repeated CommandDm command_dms = 1;
168
+ }
169
+
170
+ // 互动弹幕条目信息
171
+ message CommandDm {
172
+ // 弹幕id
173
+ int64 id = 1;
174
+ // 对象视频cid
175
+ int64 oid = 2;
176
+ // 发送者mid
177
+ int64 mid = 3;
178
+ // 互动弹幕指令
179
+ string command = 4;
180
+ // 互动弹幕正文
181
+ string content = 5;
182
+ // 出现时间
183
+ int32 progress = 6;
184
+ // 创建时间
185
+ string ctime = 7;
186
+ // 发布时间
187
+ string mtime = 8;
188
+ // 扩展json数据
189
+ string extra = 9;
190
+ // 弹幕id str类型
191
+ string idStr = 10;
192
+ //
193
+ int32 type = 11;
194
+ //
195
+ bool auto_create = 12;
196
+ //
197
+ int32 count_down = 13;
198
+ //
199
+ int32 attr = 14;
200
+ }
201
+
202
+ // 弹幕ai云屏蔽列表
203
+ message DanmakuAIFlag {
204
+ // 弹幕ai云屏蔽条目
205
+ repeated DanmakuFlag dm_flags = 1;
206
+ }
207
+
208
+ // 弹幕条目
209
+ message DanmakuElem {
210
+ // 弹幕dmid
211
+ int64 id = 1;
212
+ // 弹幕出现位置(单位ms)
213
+ int32 progress = 2;
214
+ // 弹幕类型 1 2 3:普通弹幕 4:底部弹幕 5:顶部弹幕 6:逆向弹幕 7:高级弹幕 8:代码弹幕 9:BAS弹幕(pool必须为2)
215
+ int32 mode = 3;
216
+ // 弹幕字号
217
+ int32 fontsize = 4;
218
+ // 弹幕颜色
219
+ DmColorfulType color = 5;
220
+ // 发送者mid hash
221
+ string mid_hash = 6;
222
+ // 弹幕正文
223
+ string content = 7;
224
+ // 发送时间
225
+ int64 ctime = 8;
226
+ // 权重 用于屏蔽等级 区间:[1,10]
227
+ int32 weight = 9;
228
+ // 动作
229
+ string action = 10;
230
+ // 弹幕池 0:普通池 1:字幕池 2:特殊池(代码/BAS弹幕)
231
+ int32 pool = 11;
232
+ // 弹幕dmid str
233
+ string id_str = 12;
234
+ // 弹幕属性位(bin求AND)
235
+ // bit0:保护 bit1:直播 bit2:高赞
236
+ int32 attr = 13;
237
+ //
238
+ string animation = 22;
239
+ //
240
+ string extra = 23;
241
+ // 大会员专属颜色
242
+ DmColorfulType colorful = 24;
243
+ //
244
+ int32 type = 25;
245
+ //
246
+ int64 oid = 26;
247
+ }
248
+
249
+ // 弹幕ai云屏蔽条目
250
+ message DanmakuFlag {
251
+ // 弹幕dmid
252
+ int64 dmid = 1;
253
+ // 评分
254
+ int32 flag = 2;
255
+ }
256
+
257
+ // 云屏蔽配置信息
258
+ message DanmakuFlagConfig {
259
+ // 云屏蔽等级
260
+ int32 rec_flag = 1;
261
+ // 云屏蔽文案
262
+ string rec_text = 2;
263
+ // 云屏蔽开关
264
+ int32 rec_switch = 3;
265
+ }
266
+
267
+ // 弹幕默认配置
268
+ message DanmuDefaultPlayerConfig {
269
+ bool player_danmaku_use_default_config = 1; // 是否使用推荐弹幕设置
270
+ bool player_danmaku_ai_recommended_switch = 4; // 是否开启智能云屏蔽
271
+ int32 player_danmaku_ai_recommended_level = 5; // 智能云屏蔽等级
272
+ bool player_danmaku_blocktop = 6; // 是否屏蔽顶端弹幕
273
+ bool player_danmaku_blockscroll = 7; // 是否屏蔽滚动弹幕
274
+ bool player_danmaku_blockbottom = 8; // 是否屏蔽底端弹幕
275
+ bool player_danmaku_blockcolorful = 9; // 是否屏蔽彩色弹幕
276
+ bool player_danmaku_blockrepeat = 10; // 是否屏蔽重复弹幕
277
+ bool player_danmaku_blockspecial = 11; // 是否屏蔽高级弹幕
278
+ float player_danmaku_opacity = 12; // 弹幕不透明度
279
+ float player_danmaku_scalingfactor = 13; // 弹幕缩放比例
280
+ float player_danmaku_domain = 14; // 弹幕显示区域
281
+ int32 player_danmaku_speed = 15; // 弹幕速度
282
+ bool inline_player_danmaku_switch = 16; // 是否开启弹幕
283
+ int32 player_danmaku_senior_mode_switch = 17; //
284
+ int32 player_danmaku_ai_recommended_level_v2 = 18; //
285
+ map<int32, int32> player_danmaku_ai_recommended_level_v2_map = 19; //
286
+ //
287
+ bool player_danmaku_enable_herd_dm = 20;
288
+ }
289
+
290
+ // 弹幕配置
291
+ message DanmuPlayerConfig {
292
+ bool player_danmaku_switch = 1; // 是否开启弹幕
293
+ bool player_danmaku_switch_save = 2; // 是否记录弹幕开关设置
294
+ bool player_danmaku_use_default_config = 3; // 是否使用推荐弹幕设置
295
+ bool player_danmaku_ai_recommended_switch = 4; // 是否开启智能云屏蔽
296
+ int32 player_danmaku_ai_recommended_level = 5; // 智能云屏蔽等级
297
+ bool player_danmaku_blocktop = 6; // 是否屏蔽顶端弹幕
298
+ bool player_danmaku_blockscroll = 7; // 是否屏蔽滚动弹幕
299
+ bool player_danmaku_blockbottom = 8; // 是否屏蔽底端弹幕
300
+ bool player_danmaku_blockcolorful = 9; // 是否屏蔽彩色弹幕
301
+ bool player_danmaku_blockrepeat = 10; // 是否屏蔽重复弹幕
302
+ bool player_danmaku_blockspecial = 11; // 是否屏蔽高级弹幕
303
+ float player_danmaku_opacity = 12; // 弹幕不透明度
304
+ float player_danmaku_scalingfactor = 13; // 弹幕缩放比例
305
+ float player_danmaku_domain = 14; // 弹幕显示区域
306
+ int32 player_danmaku_speed = 15; // 弹幕速度
307
+ bool player_danmaku_enableblocklist = 16; // 是否开启屏蔽列表
308
+ bool inline_player_danmaku_switch = 17; // 是否开启弹幕
309
+ int32 inline_player_danmaku_config = 18; //
310
+ int32 player_danmaku_ios_switch_save = 19; //
311
+ int32 player_danmaku_senior_mode_switch = 20; //
312
+ int32 player_danmaku_ai_recommended_level_v2 = 21; //
313
+ map<int32, int32> player_danmaku_ai_recommended_level_v2_map = 22; //
314
+ //
315
+ bool player_danmaku_enable_herd_dm = 23;
316
+ //
317
+ bool player_danmaku_blocktop_bottom = 24;
318
+ //
319
+ int32 player_danmaku_domain_v2 = 25;
320
+ //
321
+ int32 player_danmaku_density = 26;
322
+ //
323
+ bool player_danmaku_subtitle_proof = 27;
324
+ //
325
+ bool player_danmaku_people_proof = 28;
326
+ }
327
+
328
+ //
329
+ message DanmuPlayerConfigPanel {
330
+ //
331
+ string selection_text = 1;
332
+ }
333
+
334
+ // 弹幕显示区域自动配置
335
+ message DanmuPlayerDynamicConfig {
336
+ // 时间
337
+ int32 progress = 1;
338
+ // 弹幕显示区域
339
+ float player_danmaku_domain = 14;
340
+ }
341
+
342
+ // 弹幕配置信息
343
+ message DanmuPlayerViewConfig {
344
+ // 弹幕默认配置
345
+ DanmuDefaultPlayerConfig danmuku_default_player_config = 1;
346
+ // 弹幕用户配置
347
+ DanmuPlayerConfig danmuku_player_config = 2;
348
+ // 弹幕显示区域自动配置列表
349
+ repeated DanmuPlayerDynamicConfig danmuku_player_dynamic_config = 3;
350
+ //
351
+ DanmuPlayerConfigPanel danmuku_player_config_panel = 4;
352
+ }
353
+
354
+ // web端用户弹幕配置
355
+ message DanmuWebPlayerConfig {
356
+ bool dm_switch = 1; // 是否开启弹幕
357
+ bool ai_switch = 2; // 是否开启智能云屏蔽
358
+ int32 ai_level = 3; // 智能云屏蔽等级
359
+ bool blocktop = 4; // 是否屏蔽顶端弹幕
360
+ bool blockscroll = 5; // 是否屏蔽滚动弹幕
361
+ bool blockbottom = 6; // 是否屏蔽底端弹幕
362
+ bool blockcolor = 7; // 是否屏蔽彩色弹幕
363
+ bool blockspecial = 8; // 是否屏蔽重复弹幕
364
+ bool preventshade = 9; //
365
+ bool dmask = 10; //
366
+ float opacity = 11; //
367
+ int32 dmarea = 12; //
368
+ float speedplus = 13; //
369
+ float fontsize = 14; // 弹幕字号
370
+ bool screensync = 15; //
371
+ bool speedsync = 16; //
372
+ string fontfamily = 17; //
373
+ bool bold = 18; // 是否使用加粗
374
+ int32 fontborder = 19; //
375
+ string draw_type = 20; // 弹幕渲染类型
376
+ int32 senior_mode_switch = 21; //
377
+ int32 ai_level_v2 = 22; //
378
+ map<int32, int32> ai_level_v2_map = 23; //
379
+ //
380
+ bool blocktop_bottom = 24;
381
+ //
382
+ int32 dm_area_v2 = 25;
383
+ //
384
+ int32 dm_density = 26;
385
+ }
386
+
387
+ message DmColorful {
388
+ DmColorfulType type = 1; // 颜色类型
389
+ string src = 2; //
390
+ }
391
+
392
+ enum DmColorfulType {
393
+ NoneType = 0; // 无
394
+ VipGradualColor = 60001; // 渐变色
395
+ }
396
+
397
+ //
398
+ message DmExpoReportReq {
399
+ //
400
+ string session_id = 1;
401
+ //
402
+ int64 oid = 2;
403
+ //
404
+ bytes dmids = 3;
405
+ //
406
+ string spmid = 4;
407
+ }
408
+
409
+ //
410
+ message DmExpoReportRes {
411
+ }
412
+
413
+ //
414
+ message DmHerdView {
415
+ //
416
+ int32 display_herd_dm_num = 1;
417
+ //
418
+ repeated ViewHerdDmElem herd_dms = 2;
419
+ }
420
+
421
+ //
422
+ message DmMaskWall {
423
+ //
424
+ int64 start = 1;
425
+ //
426
+ int64 end = 2;
427
+ //
428
+ string content = 3;
429
+ //
430
+ DmMaskWallContentType content_type = 4;
431
+ //
432
+ DmMaskWallBizType biz_type = 5;
433
+ //
434
+ repeated DmMaskWallContent contents = 6;
435
+ }
436
+
437
+ //
438
+ enum DmMaskWallBizType {
439
+ //
440
+ Unknown = 0;
441
+ //
442
+ OGV = 1;
443
+ //
444
+ BizPic = 2;
445
+ //
446
+ Mute = 3;
447
+ //
448
+ Record = 4;
449
+ //
450
+ Cloud = 5;
451
+ //
452
+ AIGC = 6;
453
+ }
454
+
455
+ //
456
+ message DmMaskWallContent {
457
+ //
458
+ DmMaskWallContentType type = 1;
459
+ //
460
+ string content = 2;
461
+ }
462
+
463
+ //
464
+ enum DmMaskWallContentType {
465
+ //
466
+ DmMaskWallContentTypeUnknown = 0;
467
+ //
468
+ DmMaskWallContentTypeText = 1;
469
+ //
470
+ DmMaskWallContentTypePic = 2;
471
+ }
472
+
473
+ // 修改弹幕配置-请求
474
+ message DmPlayerConfigReq {
475
+ int64 ts = 1; //
476
+ PlayerDanmakuSwitch switch = 2; // 是否开启弹幕
477
+ PlayerDanmakuSwitchSave switch_save = 3; // 是否记录弹幕开关设置
478
+ PlayerDanmakuUseDefaultConfig use_default_config = 4; // 是否使用推荐弹幕设置
479
+ PlayerDanmakuAiRecommendedSwitch ai_recommended_switch = 5; // 是否开启智能云屏蔽
480
+ PlayerDanmakuAiRecommendedLevel ai_recommended_level = 6; // 智能云屏蔽等级
481
+ PlayerDanmakuBlocktop blocktop = 7; // 是否屏蔽顶端弹幕
482
+ PlayerDanmakuBlockscroll blockscroll = 8; // 是否屏蔽滚动弹幕
483
+ PlayerDanmakuBlockbottom blockbottom = 9; // 是否屏蔽底端弹幕
484
+ PlayerDanmakuBlockcolorful blockcolorful = 10; // 是否屏蔽彩色弹幕
485
+ PlayerDanmakuBlockrepeat blockrepeat = 11; // 是否屏蔽重复弹幕
486
+ PlayerDanmakuBlockspecial blockspecial = 12; // 是否屏蔽高级弹幕
487
+ PlayerDanmakuOpacity opacity = 13; // 弹幕不透明度
488
+ PlayerDanmakuScalingfactor scalingfactor = 14; // 弹幕缩放比例
489
+ PlayerDanmakuDomain domain = 15; // 弹幕显示区域
490
+ PlayerDanmakuSpeed speed = 16; // 弹幕速度
491
+ PlayerDanmakuEnableblocklist enableblocklist = 17; // 是否开启屏蔽列表
492
+ InlinePlayerDanmakuSwitch inlinePlayerDanmakuSwitch = 18; // 是否开启弹幕
493
+ PlayerDanmakuSeniorModeSwitch senior_mode_switch = 19; //
494
+ PlayerDanmakuAiRecommendedLevelV2 ai_recommended_level_v2 = 20; //
495
+ //
496
+ PlayerDanmakuEnableHerdDm enable_herd_dm = 21;
497
+ //
498
+ PlayerDanmakuBlocktopBottom blocktop_bottom = 22;
499
+ //
500
+ PlayerDanmakuDomainV2 domain_v2 = 23;
501
+ //
502
+ PlayerDanmakuDensity density = 24;
503
+ //
504
+ PlayerDanmakuSubtitleProof subtitle_proof = 25;
505
+ //
506
+ PlayerDanmakuPeopleProof people_proof = 26;
507
+ }
508
+
509
+ //
510
+ message DmSegConfig {
511
+ //
512
+ int64 page_size = 1;
513
+ //
514
+ int64 total = 2;
515
+ }
516
+
517
+ // 获取弹幕-响应
518
+ message DmSegMobileReply {
519
+ // 弹幕列表
520
+ repeated DanmakuElem elems = 1;
521
+ // 是否已关闭弹幕
522
+ // 0:未关闭 1:已关闭
523
+ int32 state = 2;
524
+ // 弹幕云屏蔽ai评分值
525
+ DanmakuAIFlag ai_flag = 3;
526
+ //
527
+ repeated int64 segment_rules = 4;
528
+ repeated DmColorful colorful_src = 5;
529
+ //
530
+ string context_src = 6;
531
+ }
532
+
533
+ // 获取弹幕-请求
534
+ message DmSegMobileReq {
535
+ // 稿件avid/漫画epid
536
+ int64 pid = 1;
537
+ // 视频cid/漫画cid
538
+ int64 oid = 2;
539
+ // 弹幕类型
540
+ // 1:视频 2:漫画
541
+ int32 type = 3;
542
+ // 分段(6min)
543
+ int64 segment_index = 4;
544
+ // 是否青少年模式
545
+ int32 teenagers_mode = 5;
546
+ //
547
+ int64 ps = 6;
548
+ //
549
+ int64 pe = 7;
550
+ //
551
+ int32 pull_mode = 8;
552
+ //
553
+ int32 from_scene = 9;
554
+ //
555
+ string spmid = 10;
556
+ //
557
+ string context_ext = 11;
558
+ }
559
+
560
+ // ott弹幕列表-响应
561
+ message DmSegOttReply {
562
+ // 是否已关闭弹幕
563
+ // 0:未关闭 1:已关闭
564
+ repeated DanmakuElem elems = 1;
565
+ // 弹幕列表
566
+ int32 state = 2;
567
+ }
568
+
569
+ // ott弹幕列表-请求
570
+ message DmSegOttReq {
571
+ // 稿件avid/漫画epid
572
+ int64 pid = 1;
573
+ // 视频cid/漫画cid
574
+ int64 oid = 2;
575
+ // 弹幕类型
576
+ // 1:视频 2:漫画
577
+ int32 type = 3;
578
+ // 分段(6min)
579
+ int64 segment_index = 4;
580
+ }
581
+
582
+ // 弹幕SDK-响应
583
+ message DmSegSDKReply {
584
+ // 是否已关闭弹幕
585
+ // 0:未关闭 1:已关闭
586
+ bool closed = 1;
587
+ // 弹幕列表
588
+ repeated DanmakuElem elems = 2;
589
+ }
590
+
591
+ // 弹幕SDK-请求
592
+ message DmSegSDKReq {
593
+ // 稿件avid/漫画epid
594
+ int64 pid = 1;
595
+ // 视频cid/漫画cid
596
+ int64 oid = 2;
597
+ // 弹幕类型
598
+ // 1:视频 2:漫画
599
+ int32 type = 3;
600
+ // 分段(6min)
601
+ int64 segment_index = 4;
602
+ }
603
+
604
+ //
605
+ message DmSubView {
606
+ //
607
+ int32 type = 1;
608
+ //
609
+ int64 oid = 2;
610
+ //
611
+ int64 pid = 3;
612
+ //
613
+ repeated PostPanelV2 post_panel2 = 4;
614
+ }
615
+
616
+ // 客户端弹幕元数据-响应
617
+ message DmViewReply {
618
+ // 是否已关闭弹幕
619
+ // 0:未关闭 1:已关闭
620
+ bool closed = 1;
621
+ // 智能防挡弹幕蒙版信息
622
+ VideoMask mask = 2;
623
+ // 视频字幕
624
+ VideoSubtitle subtitle = 3;
625
+ // 高级弹幕专包url(bfs)
626
+ repeated string special_dms = 4;
627
+ // 云屏蔽配置信息
628
+ DanmakuFlagConfig ai_flag = 5;
629
+ // 弹幕配置信息
630
+ DanmuPlayerViewConfig player_config = 6;
631
+ // 弹幕发送框样式
632
+ int32 send_box_style = 7;
633
+ // 是否允许
634
+ bool allow = 8;
635
+ // check box 是否展示
636
+ bool check_box = 9;
637
+ // check box 展示文本
638
+ string check_box_show_msg = 10;
639
+ // 展示文案
640
+ string text_placeholder = 11;
641
+ // 弹幕输入框文案
642
+ string input_placeholder = 12;
643
+ // 用户举报弹幕 cid维度屏蔽的正则规则
644
+ repeated string report_filter_content = 13;
645
+ //
646
+ ExpoReport expo_report = 14;
647
+ //
648
+ BuzzwordConfig buzzword_config = 15;
649
+ //
650
+ repeated Expressions expressions = 16;
651
+ //
652
+ repeated PostPanel post_panel = 17;
653
+ //
654
+ repeated string activity_meta = 18;
655
+ //
656
+ repeated PostPanelV2 post_panel2 = 19;
657
+ //
658
+ repeated DmMaskWall dm_mask_wall = 20;
659
+ //
660
+ DmHerdView dm_herd = 21;
661
+ //
662
+ Command command = 22;
663
+ //
664
+ string kv = 23;
665
+ //
666
+ repeated DmSubView sub_views = 24;
667
+ //
668
+ QoeInfo qoe = 25;
669
+ }
670
+
671
+ // 客户端弹幕元数据-请求
672
+ message DmViewReq {
673
+ // 稿件avid/漫画epid
674
+ int64 pid = 1;
675
+ // 视频cid/漫画cid
676
+ int64 oid = 2;
677
+ // 弹幕类型
678
+ // 1:视频 2:漫画
679
+ int32 type = 3;
680
+ // 页面spm
681
+ string spmid = 4;
682
+ // 是否冷启
683
+ int32 is_hard_boot = 5;
684
+ //
685
+ string context_ext = 6;
686
+ }
687
+
688
+ // web端弹幕元数据-响应
689
+ // https://api.bilibili.com/x/v2/dm/web/view
690
+ message DmWebViewReply {
691
+ // 是否已关闭弹幕
692
+ // 0:未关闭 1:已关闭
693
+ int32 state = 1;
694
+ //
695
+ string text = 2;
696
+ //
697
+ string text_side = 3;
698
+ // 分段弹幕配置
699
+ DmSegConfig dm_sge = 4;
700
+ // 云屏蔽配置信息
701
+ DanmakuFlagConfig flag = 5;
702
+ // 高级弹幕专包url(bfs)
703
+ repeated string special_dms = 6;
704
+ // check box 是否展示
705
+ bool check_box = 7;
706
+ // 弹幕数
707
+ int64 count = 8;
708
+ // 互动弹幕
709
+ repeated CommandDm command_dms = 9;
710
+ // 用户弹幕配置
711
+ DanmuWebPlayerConfig player_config = 10;
712
+ // 用户举报弹幕 cid维度屏蔽
713
+ repeated string report_filter_content = 11;
714
+ //
715
+ repeated Expressions expressions = 12;
716
+ //
717
+ repeated PostPanel post_panel = 13;
718
+ //
719
+ repeated string activity_meta = 14;
720
+ //
721
+ repeated PostPanelV2 post_panel2 = 15;
722
+ //
723
+ repeated DmSubView sub_views = 16;
724
+ //
725
+ QoeInfo qoe = 17;
726
+ }
727
+
728
+ //
729
+ message ExpoReport {
730
+ //
731
+ bool should_report_at_end = 1;
732
+ }
733
+
734
+ //
735
+ enum ExposureType {
736
+ ExposureTypeNone = 0; //
737
+ ExposureTypeDMSend = 1; //
738
+ }
739
+
740
+ //
741
+ message Expression {
742
+ //
743
+ repeated string keyword = 1;
744
+ //
745
+ string url = 2;
746
+ //
747
+ repeated Period period = 3;
748
+ }
749
+
750
+ //
751
+ message Expressions {
752
+ //
753
+ repeated Expression data = 1;
754
+ }
755
+
756
+ // 是否开启弹幕
757
+ message InlinePlayerDanmakuSwitch {
758
+ //
759
+ bool value = 1;
760
+ }
761
+
762
+ //
763
+ message Label {
764
+ //
765
+ string title = 1;
766
+ //
767
+ repeated string content = 2;
768
+ }
769
+
770
+ //
771
+ message LabelV2 {
772
+ //
773
+ string title = 1;
774
+ //
775
+ repeated string content = 2;
776
+ //
777
+ bool exposure_once = 3;
778
+ //
779
+ ExposureType exposure_type = 4;
780
+ }
781
+
782
+ //
783
+ message Period {
784
+ //
785
+ int64 start = 1;
786
+ //
787
+ int64 end = 2;
788
+ }
789
+
790
+ message PlayerDanmakuAiRecommendedLevel {int32 value = 1;} // 智能云屏蔽等级
791
+ message PlayerDanmakuAiRecommendedLevelV2 {int32 value = 1;} //
792
+ message PlayerDanmakuAiRecommendedSwitch {bool value = 1;} // 是否开启智能云屏蔽
793
+ message PlayerDanmakuBlockbottom {bool value = 1;} // 是否屏蔽底端弹幕
794
+ message PlayerDanmakuBlockcolorful {bool value = 1;} // 是否屏蔽彩色弹幕
795
+ message PlayerDanmakuBlockrepeat {bool value = 1;} // 是否屏蔽重复弹幕
796
+ message PlayerDanmakuBlockscroll {bool value = 1;} // 是否屏蔽滚动弹幕
797
+ message PlayerDanmakuBlockspecial {bool value = 1;} // 是否屏蔽高级弹幕
798
+ message PlayerDanmakuBlocktop {bool value = 1;} // 是否屏蔽顶端弹幕
799
+ //
800
+ message PlayerDanmakuBlocktopBottom {
801
+ //
802
+ bool value = 1;
803
+ }
804
+ //
805
+ message PlayerDanmakuDensity {
806
+ //
807
+ int32 value = 1;
808
+ }
809
+ message PlayerDanmakuDomain {float value = 1;} // 弹幕显示区域
810
+ //
811
+ message PlayerDanmakuDomainV2 {
812
+ //
813
+ int32 value = 1;
814
+ }
815
+ //
816
+ message PlayerDanmakuEnableHerdDm {
817
+ //
818
+ bool value = 1;
819
+ }
820
+ message PlayerDanmakuEnableblocklist {bool value = 1;} // 是否开启屏蔽列表
821
+ message PlayerDanmakuOpacity {float value = 1;} // 弹幕不透明度
822
+ //
823
+ message PlayerDanmakuPeopleProof {
824
+ //
825
+ bool value = 1;
826
+ }
827
+ message PlayerDanmakuScalingfactor {float value = 1;} // 弹幕缩放比例
828
+ message PlayerDanmakuSeniorModeSwitch {int32 value = 1;} //
829
+ message PlayerDanmakuSpeed {int32 value = 1;} // 弹幕速度
830
+ //
831
+ message PlayerDanmakuSubtitleProof {
832
+ //
833
+ bool value = 1;
834
+ }
835
+ message PlayerDanmakuSwitch {bool value = 1; bool can_ignore = 2;} // 是否开启弹幕
836
+ message PlayerDanmakuSwitchSave {bool value = 1;} // 是否记录弹幕开关设置
837
+ message PlayerDanmakuUseDefaultConfig {bool value = 1;} // 是否使用推荐弹幕设置
838
+
839
+ //
840
+ message PostPanel {
841
+ //
842
+ int64 start = 1;
843
+ //
844
+ int64 end = 2;
845
+ //
846
+ int64 priority = 3;
847
+ //
848
+ int64 biz_id = 4;
849
+ //
850
+ PostPanelBizType biz_type = 5;
851
+ //
852
+ ClickButton click_button = 6;
853
+ //
854
+ TextInput text_input = 7;
855
+ //
856
+ CheckBox check_box = 8;
857
+ //
858
+ Toast toast = 9;
859
+ }
860
+
861
+ //
862
+ enum PostPanelBizType {
863
+ PostPanelBizTypeNone = 0; //
864
+ PostPanelBizTypeEncourage = 1; //
865
+ PostPanelBizTypeColorDM = 2; //
866
+ PostPanelBizTypeNFTDM = 3; //
867
+ PostPanelBizTypeFragClose = 4; //
868
+ PostPanelBizTypeRecommend = 5; //
869
+ //
870
+ PostPanelBizTypePlotLeak = 6;
871
+ //
872
+ PostPanelBizTypeAntiHarassment = 7;
873
+ }
874
+
875
+ //
876
+ message PostPanelV2 {
877
+ //
878
+ int64 start = 1;
879
+ //
880
+ int64 end = 2;
881
+ //
882
+ PostPanelBizType biz_type = 3;
883
+ //
884
+ ClickButtonV2 click_button = 4;
885
+ //
886
+ TextInputV2 text_input = 5;
887
+ //
888
+ CheckBoxV2 check_box = 6;
889
+ //
890
+ ToastV2 toast = 7;
891
+ //
892
+ BubbleV2 bubble = 8;
893
+ //
894
+ LabelV2 label = 9;
895
+ //
896
+ PostStatus post_status = 10;
897
+ }
898
+
899
+ //
900
+ enum PostStatus {
901
+ PostStatusNormal = 0; //
902
+ PostStatusClosed = 1; //
903
+ }
904
+
905
+ //
906
+ message QoeInfo {
907
+ //
908
+ string info = 1;
909
+ }
910
+
911
+ //
912
+ enum RenderType {
913
+ RenderTypeNone = 0; //
914
+ RenderTypeSingle = 1; //
915
+ RenderTypeRotation = 2; //
916
+ }
917
+
918
+ // 修改弹幕配置-响应
919
+ message Response {
920
+ //
921
+ int32 code = 1;
922
+ //
923
+ string message = 2;
924
+ }
925
+
926
+ //
927
+ enum SubtitleAiStatus {
928
+ None = 0; //
929
+ Exposure = 1; //
930
+ Assist = 2; //
931
+ }
932
+
933
+ //
934
+ enum SubtitleAiType {
935
+ Normal = 0; //
936
+ Translate = 1; //
937
+ }
938
+
939
+ // 单个字幕信息
940
+ message SubtitleItem {
941
+ // 字幕id
942
+ int64 id = 1;
943
+ // 字幕id str
944
+ string id_str = 2;
945
+ // 字幕语言代码
946
+ string lan = 3;
947
+ // 字幕语言
948
+ string lan_doc = 4;
949
+ // 字幕文件url
950
+ string subtitle_url = 5;
951
+ // 字幕作者信息
952
+ UserInfo author = 6;
953
+ // 字幕类型
954
+ SubtitleType type = 7;
955
+ //
956
+ string lan_doc_brief = 8;
957
+ //
958
+ SubtitleAiType ai_type = 9;
959
+ //
960
+ SubtitleAiStatus ai_status = 10;
961
+ }
962
+
963
+ enum SubtitleType {
964
+ CC = 0; // CC字幕
965
+ AI = 1; // AI生成字幕
966
+ }
967
+
968
+ //
969
+ message TextInput {
970
+ //
971
+ repeated string portrait_placeholder = 1;
972
+ //
973
+ repeated string landscape_placeholder = 2;
974
+ //
975
+ RenderType render_type = 3;
976
+ //
977
+ bool placeholder_post = 4;
978
+ //
979
+ bool show = 5;
980
+ //
981
+ repeated Avatar avatar = 6;
982
+ //
983
+ PostStatus post_status = 7;
984
+ //
985
+ Label label = 8;
986
+ }
987
+
988
+ //
989
+ message TextInputV2 {
990
+ //
991
+ repeated string portrait_placeholder = 1;
992
+ //
993
+ repeated string landscape_placeholder = 2;
994
+ //
995
+ RenderType render_type = 3;
996
+ //
997
+ bool placeholder_post = 4;
998
+ //
999
+ repeated Avatar avatar = 5;
1000
+ //
1001
+ int32 text_input_limit = 6;
1002
+ }
1003
+
1004
+ //
1005
+ message Toast {
1006
+ //
1007
+ string text = 1;
1008
+ //
1009
+ int32 duration = 2;
1010
+ //
1011
+ bool show = 3;
1012
+ //
1013
+ Button button = 4;
1014
+ }
1015
+
1016
+ //
1017
+ message ToastButtonV2 {
1018
+ //
1019
+ string text = 1;
1020
+ //
1021
+ ToastFunctionType action = 2;
1022
+ }
1023
+
1024
+ //
1025
+ enum ToastFunctionType {
1026
+ ToastFunctionTypeNone = 0; //
1027
+ ToastFunctionTypePostPanel = 1; //
1028
+ }
1029
+
1030
+ //
1031
+ message ToastV2 {
1032
+ //
1033
+ string text = 1;
1034
+ //
1035
+ int32 duration = 2;
1036
+ //
1037
+ ToastButtonV2 toast_button_v2 = 3;
1038
+ }
1039
+
1040
+ // 字幕作者信息
1041
+ message UserInfo {
1042
+ // 用户mid
1043
+ int64 mid = 1;
1044
+ // 用户昵称
1045
+ string name = 2;
1046
+ // 用户性别
1047
+ string sex = 3;
1048
+ // 用户头像url
1049
+ string face = 4;
1050
+ // 用户签名
1051
+ string sign = 5;
1052
+ // 用户等级
1053
+ int32 rank = 6;
1054
+ }
1055
+
1056
+ // 智能防挡弹幕蒙版信息
1057
+ message VideoMask {
1058
+ // 视频cid
1059
+ int64 cid = 1;
1060
+ // 平台
1061
+ // 0:web端 1:客户端
1062
+ int32 plat = 2;
1063
+ // 帧率
1064
+ int32 fps = 3;
1065
+ // 间隔时间
1066
+ int64 time = 4;
1067
+ // 蒙版url
1068
+ string mask_url = 5;
1069
+ }
1070
+
1071
+ // 视频字幕信息
1072
+ message VideoSubtitle {
1073
+ // 视频原语言代码
1074
+ string lan = 1;
1075
+ // 视频原语言
1076
+ string lan_doc = 2;
1077
+ // 视频字幕列表
1078
+ repeated SubtitleItem subtitles = 3;
1079
+ }
1080
+
1081
+ //
1082
+ message ViewHerdDmElem {
1083
+ //
1084
+ string herd_msg = 1;
1085
+ //
1086
+ int32 herd_start_cnt = 2;
1087
+ //
1088
+ int32 herd_end_cnt = 3;
1089
+ //
1090
+ string regex_rule = 4;
1091
+ //
1092
+ int32 start_progress = 5;
1093
+ //
1094
+ int32 end_progress = 6;
1095
+ }