update 【gRPC API】 proto files

This commit is contained in:
社会易姐QwQ
2022-01-31 00:33:38 +08:00
parent 83cfcc80d6
commit 57c5621b5d
14 changed files with 1114 additions and 565 deletions

View File

@@ -11,15 +11,13 @@ service Privacy {
} }
// 空请求 // 空请求
message NoArgRequest{} message NoArgRequest{
}
// 空响应 // 空响应
message NoReply{} message NoReply{
// 获取隐私设置-响应
message PrivacyConfigReply {
// 隐私设置
PrivacyConfigItem privacy_config_item = 1;
} }
// 隐私设置 // 隐私设置
@@ -36,20 +34,22 @@ message PrivacyConfigItem {
string sub_title_uri = 5; string sub_title_uri = 5;
} }
// 隐私开关类型 // 获取隐私设置-响应
enum PrivacyConfigType { message PrivacyConfigReply {
// // 隐私设置
none = 0; PrivacyConfigItem privacy_config_item = 1;
// 动态同城
dynamic_city = 1;
} }
// 隐私开关状态 // 隐私开关状态
enum PrivacyConfigState { enum PrivacyConfigState {
// 关闭 close = 0; // 关闭
close = 0; open = 1; // 打开
// 打开 }
open = 1;
// 隐私开关类型
enum PrivacyConfigType {
none = 0; //
dynamic_city = 1; // 动态同城
} }
// 修改隐私设置-请求 // 修改隐私设置-请求

View File

@@ -8,14 +8,23 @@ service Module {
rpc List(ListReq) returns (ListReply); rpc List(ListReq) returns (ListReply);
} }
//
enum CompressType {
Unzip = 0; // unzip
Original = 1; // 不操作
}
// //
enum EnvType { enum EnvType {
// Unknown = 0; //
Unknown = 0; Release = 1; //
// Test = 2; //
Release = 1; }
//
Test = 2; //
enum IncrementType {
Total = 0; // 全量包
Incremental = 1; // 增量包
} }
// //
@@ -26,6 +35,15 @@ enum LevelType {
Low = 3; // 低 仅在业务方使用到时由业务方手动进行下载 Low = 3; // 低 仅在业务方使用到时由业务方手动进行下载
} }
message ListReply {
//
string env = 1;
//
repeated PoolReply pools = 2;
//
int64 list_version = 3;
}
// //
message ListReq { message ListReq {
// //
@@ -42,50 +60,11 @@ message ListReq {
int32 scale = 6; int32 scale = 6;
// //
int32 arch = 7; int32 arch = 7;
//
int64 list_version = 8;
} }
// //
message VersionListReq {
//
string pool_name = 1;
//
repeated VersionReq versions = 2;
}
//
message VersionReq {
//
string module_name = 1;
//
int64 version = 2;
}
//
enum IncrementType {
Total = 0; // 全量包
Incremental = 1; // 增量包
}
//
enum CompressType {
Unzip = 0; // unzip
Original = 1; // 不操作
}
message ListReply {
//
string env = 1;
//
repeated PoolReply pools = 2;
}
message PoolReply {
//
string name = 1;
//
repeated ModuleReply modules = 2;
}
message ModuleReply { message ModuleReply {
// //
string name = 1; string name = 1;
@@ -123,4 +102,27 @@ message ModuleReply {
int64 file_id = 17; int64 file_id = 17;
// //
bool zip_check = 18; bool zip_check = 18;
} }
message PoolReply {
//
string name = 1;
//
repeated ModuleReply modules = 2;
}
//
message VersionListReq {
//
string pool_name = 1;
//
repeated VersionReq versions = 2;
}
//
message VersionReq {
//
string module_name = 1;
//
int64 version = 2;
}

View File

@@ -11,50 +11,14 @@ service Popular {
rpc Index (PopularResultReq) returns (PopularReply); rpc Index (PopularResultReq) returns (PopularReply);
} }
// 热门列表-请求 // 气泡信息
message PopularResultReq { message Bubble {
// 排位索引id为上此请求末尾项的idx // 文案
int64 idx = 1; string bubble_content = 1;
// 登录标识
// 1:未登陆用户第一页 2:登陆用户第一页
int32 login_event = 2;
// 清晰度(旧版)
int32 qn = 3;
// 视频流版本(旧版)
int32 fnver = 4;
// 视频流功能(旧版)
int32 fnval = 5;
// 是否强制使用域名(旧版)
int32 force_host = 6;
// 是否4K(旧版)
int32 fourk = 7;
// 当前页面spm
string spmid = 8;
// 上此请求末尾项的param
string last_param = 9;
// 上此请求的ver
string ver = 10;
// 分品类热门的入口ID
int64 entrance_id = 11;
// 热门定位id集合
string location_ids = 12;
// 0:tag页 1:中间页
int32 source_id = 13;
// 数据埋点上报
// 0:代表手动刷新 1:代表自动刷新
int32 flush = 14;
// 秒开参数
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 15;
}
// 热门列表-响应
message PopularReply {
// 卡片列表
repeated bilibili.app.card.v1.Card items = 1;
// 配置信息
Config config = 2;
// 版本 // 版本
string ver = 3; int32 version = 2;
// 起始时间
int64 stime = 3;
} }
// 配置信息 // 配置信息
@@ -97,12 +61,56 @@ message EntranceShow {
int32 entrance_type = 8; int32 entrance_type = 8;
} }
// 气泡信息 // 热门列表-响应
message Bubble { message PopularReply {
// 文案 // 卡片列表
string bubble_content = 1; repeated bilibili.app.card.v1.Card items = 1;
// 配置信息
Config config = 2;
// 版本 // 版本
int32 version = 2; string ver = 3;
// 起始时间
int64 stime = 3;
} }
// 热门列表-请求
message PopularResultReq {
// 排位索引id为上此请求末尾项的idx
int64 idx = 1;
// 登录标识
// 1:未登陆用户第一页 2:登陆用户第一页
int32 login_event = 2;
// 清晰度(旧版)
int32 qn = 3;
// 视频流版本(旧版)
int32 fnver = 4;
// 视频流功能(旧版)
int32 fnval = 5;
// 是否强制使用域名(旧版)
int32 force_host = 6;
// 是否4K(旧版)
int32 fourk = 7;
// 当前页面spm
string spmid = 8;
// 上此请求末尾项的param
string last_param = 9;
// 上此请求的ver
string ver = 10;
// 分品类热门的入口ID
int64 entrance_id = 11;
// 热门定位id集合
string location_ids = 12;
// 0:tag页 1:中间页
int32 source_id = 13;
// 数据埋点上报
// 0:代表手动刷新 1:代表自动刷新
int32 flush = 14;
// 秒开参数
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 15;
}

View File

@@ -10,37 +10,6 @@ service Rank {
rpc RankRegion (RankRegionResultReq) returns (RankListReply); rpc RankRegion (RankRegionResultReq) returns (RankListReply);
} }
// 全站排行榜-请求
message RankAllResultReq {
// 必须为"all"
string order = 1;
// 页码
// 默认1页
int32 pn = 2;
// 每页项数
// 默认100项最大100
int32 ps = 3;
}
// 分区排行榜-请求
message RankRegionResultReq {
// 一级分区tid(二级分区不可用)
// 0:全站
int32 rid = 1;
// 页码
// 默认1页
int32 pn = 2;
// 每页项数
// 默认100项最大100
int32 ps = 3;
}
// 排行榜信息-响应
message RankListReply {
// 排行榜列表
repeated Item items = 1;
}
// 排行榜列表项 // 排行榜列表项
message Item { message Item {
// 标题 // 标题
@@ -108,6 +77,37 @@ message OfficialVerify {
string desc = 2; string desc = 2;
} }
// 全站排行榜-请求
message RankAllResultReq {
// 必须为"all"
string order = 1;
// 页码
// 默认1页
int32 pn = 2;
// 每页项数
// 默认100项最大100
int32 ps = 3;
}
// 排行榜信息-响应
message RankListReply {
// 排行榜列表
repeated Item items = 1;
}
// 分区排行榜-请求
message RankRegionResultReq {
// 一级分区tid(二级分区不可用)
// 0:全站
int32 rid = 1;
// 页码
// 默认1页
int32 pn = 2;
// 每页项数
// 默认100项最大100
int32 ps = 3;
}
// 关系信息 // 关系信息
message Relation { message Relation {
// 关系状态id // 关系状态id

View File

@@ -8,18 +8,6 @@ service Region {
rpc Region (RegionReq) returns (RegionReply); rpc Region (RegionReq) returns (RegionReply);
} }
//
message RegionReq {
//
string lang = 1;
}
//
message RegionReply {
//
repeated RegionInfo regions = 1;
}
// //
message RegionConfig { message RegionConfig {
// //
@@ -52,4 +40,16 @@ message RegionInfo {
repeated RegionInfo children = 10; repeated RegionInfo children = 10;
// //
repeated RegionConfig config = 11; repeated RegionConfig config = 11;
} }
//
message RegionReply {
//
repeated RegionInfo regions = 1;
}
//
message RegionReq {
//
string lang = 1;
}

View File

@@ -8,18 +8,6 @@ service Space {
rpc Archive (ArchiveReq) returns (ArchiveReply); rpc Archive (ArchiveReq) returns (ArchiveReply);
} }
//-请求
message ArchiveReq {
//
int64 vmid = 1;
//
int32 pn = 2;
//
int32 ps = 3;
//
string order = 4;
}
//-响应 //-响应
message ArchiveReply { message ArchiveReply {
// //
@@ -32,6 +20,18 @@ message ArchiveReply {
repeated OrderConfig order = 4; repeated OrderConfig order = 4;
} }
//-请求
message ArchiveReq {
//
int64 vmid = 1;
//
int32 pn = 2;
//
int32 ps = 3;
//
string order = 4;
}
// //
message Badge { message Badge {
// //

View File

@@ -10,34 +10,6 @@ service Splash {
rpc List (SplashReq) returns (SplashReply); rpc List (SplashReq) returns (SplashReply);
} }
//-请求
message SplashReq {
//
int32 width = 1;
//
int32 height = 2;
//
string birth = 3;
//
string ad_extra = 4;
//
string network = 5;
}
//-响应
message SplashReply {
//
int32 max_time = 1;
//
int32 min_interval = 2;
//
int32 pull_interval = 3;
//
repeated SplashItem list = 4;
//
repeated ShowStrategy show = 5;
}
// //
message ShowStrategy { message ShowStrategy {
// //
@@ -128,4 +100,32 @@ message SplashItem {
bool enable_pre_download = 38; bool enable_pre_download = 38;
// //
bool enable_background_download = 39; bool enable_background_download = 39;
} }
//-响应
message SplashReply {
//
int32 max_time = 1;
//
int32 min_interval = 2;
//
int32 pull_interval = 3;
//
repeated SplashItem list = 4;
//
repeated ShowStrategy show = 5;
}
//-请求
message SplashReq {
//
int32 width = 1;
//
int32 height = 2;
//
string birth = 3;
//
string ad_extra = 4;
//
string network = 5;
}

View File

@@ -0,0 +1,396 @@
syntax = "proto3";
package bilibili.app.topic.v1;
import "bilibili/app/dynamic/v2/dynamic.proto";
import "bilibili/app/card/v1/common.proto";
import "bilibili/app/archive/middleware/v1/preload.proto";
//
service Topic {
//
rpc TopicDetailsAll(TopicDetailsAllReq) returns (TopicDetailsAllReply);
//
rpc TopicDetailsFold(TopicDetailsFoldReq) returns (TopicDetailsFoldReply);
}
//
message DetailsTopInfo {
//
TopicInfo topic_info = 1;
//
User user = 2;
//
string stats_desc = 3;
//
bool has_create_jurisdiction = 4;
//
OperationContent operation_content = 5;
//
string head_img_url = 6;
//
string head_img_backcolor = 7;
//
int32 word_color = 8;
}
//
message FoldCardItem {
//
int32 is_show_fold = 1;
//
int64 fold_count = 2;
//
string card_show_desc = 3;
//
string fold_desc = 4;
}
//
message FunctionalCard {
//
repeated TopicCapsule capsules = 1;
//
TrafficCard traffic_card = 2;
//
GameCard game_card = 3;
}
//
message GameCard {
//
int64 game_id = 1;
//
string game_icon = 2;
//
string game_name = 3;
//
string score = 4;
//
string game_tags = 5;
//
string notice = 6;
//
string game_link = 7;
}
//
message InlineProgressBar {
//
string icon_drag = 1;
//
string icon_drag_hash = 2;
//
string icon_stop = 3;
//
string icon_stop_hash = 4;
}
//
message LargeCoverInline {
//
bilibili.app.card.v1.Base base = 1;
//
string cover_left_text1 = 2;
//
int32 cover_left_icon1 = 3;
//
string cover_left_text2 = 4;
//
int32 cover_left_icon2 = 5;
//
RightTopLiveBadge right_top_live_badge = 6;
//
string extra_uri = 7;
//
InlineProgressBar inline_progress_bar = 8;
//
TopicThreePoint topic_three_point = 9;
//
string cover_left_desc = 10;
//
bool hide_danmu_switch = 11;
//
bool disable_danmu = 12;
//
int32 can_play = 13;
//
string duration_text = 14;
//
RelationData relation_data = 15;
}
//
message LiveBadgeResource {
//
string text = 1;
//
string animation_url = 2;
//
string animation_url_hash = 3;
//
string background_color_light = 4;
//
string background_color_night = 5;
//
int64 alpha_light = 6;
//
int64 alpha_night = 7;
//
string font_color = 8;
}
//
message OperationCard {
oneof card {
//
LargeCoverInline large_cover_inline = 1;
}
}
//
message OperationContent {
//
OperationCard operation_card = 1;
}
//
message RelationData {
//
bool is_fav = 1;
//
bool is_coin = 2;
//
bool is_follow = 3;
//
bool is_like = 4;
//
int64 like_count = 5;
}
//
message RightTopLiveBadge {
//
int64 live_status = 1;
//
LiveBadgeResource in_live = 2;
//
string live_stats_desc = 3;
}
//
message SortContent {
//
int64 sort_by = 1;
//
string sort_name = 2;
}
//
message ThreePointItem {
//
string title = 1;
//
string jump_url = 2;
}
//
message TopicActivities {
//
repeated TopicActivity activity = 1;
//
string act_list_title = 2;
}
//
message TopicActivity {
//
int64 activity_id = 1;
//
string activity_name = 2;
//
string jump_url = 3;
//
string icon_url = 4;
}
//
message TopicCapsule {
//
string name = 1;
//
string jump_url = 2;
//
string icon_url = 3;
}
//
message TopicCardItem {
//
int32 type = 1;
//
bilibili.app.dynamic.v2.DynamicItem dynamic_item = 2;
//
FoldCardItem ford_card_item = 3;
}
//
message TopicCardList {
//
repeated TopicCardItem topic_card_items = 1;
//
string offset = 2;
//
bool has_more = 3;
//
TopicSortByConf topic_sort_by_conf = 4;
}
//
enum TopicCardType {
ILLEGAL_TYPE = 0; //
DYNAMIC = 1; //
FOLD = 2; //
}
//
message TopicDetailsAllReply {
//
DetailsTopInfo details_top_info = 1;
//
TopicActivities topic_activities = 2;
//
TopicCardList topic_card_list = 3;
//
FunctionalCard functional_card = 4;
}
//
message TopicDetailsAllReq {
//
int64 topic_id = 1;
//
int64 sort_by = 2;
//
string offset = 3;
//
int32 page_size = 4;
//
int32 local_time = 5;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 6;
//
int32 need_refresh = 7;
//
string source = 8;
}
//
message TopicDetailsFoldReply {
//
TopicCardList topic_card_list = 1;
//
int64 fold_count = 2;
}
//
message TopicDetailsFoldReq {
//
int64 topic_id = 1;
//
string offset = 2;
//
int32 page_size = 3;
//
int32 local_time = 4;
//
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 5;
//
int64 from_sort_by = 6;
}
//
message TopicInfo {
//
int64 id = 1;
//
string name = 2;
//
int64 uid = 3;
//
int64 view = 4;
//
int64 discuss = 5;
//
int64 fav = 6;
//
int64 dynamics = 7;
//
int32 state = 8;
//
string jump_url = 9;
//
string backcolor = 10;
//
bool is_fav = 11;
//
string description = 12;
//
int32 create_source = 13;
//
string share_pic = 14;
//
int64 share = 15;
//
int64 like = 16;
//
string share_url = 17;
//
bool is_like = 18;
}
//
message TopicSortByConf {
//
int64 default_sort_by = 1;
//
repeated SortContent all_sort_by = 2;
//
int64 show_sort_by = 3;
}
//
message TopicThreePoint {
//
repeated ThreePointItem dyn_three_point_items = 1;
}
//
message TrafficCard {
//
string name = 1;
//
string jump_url = 2;
//
string icon_url = 3;
//
string base_pic = 4;
//
string benefit_point = 5;
//
string card_desc = 6;
//
string jump_title = 7;
}
//
message User {
//
int64 uid = 1;
//
string face = 2;
//
string name = 3;
//
string name_desc = 4;
}

View File

@@ -26,6 +26,13 @@ service BroadcastTunnel {
rpc CreateTunnel(stream BroadcastFrame) returns (stream BroadcastFrame); rpc CreateTunnel(stream BroadcastFrame) returns (stream BroadcastFrame);
} }
//
enum Action {
UNKNOWN = 0; //
UPDATE = 1; //
DELETE = 2; //
}
// 鉴权请求通过authorization验证绑定用户mid // 鉴权请求通过authorization验证绑定用户mid
message AuthReq { message AuthReq {
// 冷启动id算法uuid重新起启会变 // 冷启动id算法uuid重新起启会变
@@ -35,28 +42,21 @@ message AuthReq {
// 最后收到的消息id用于过虑重连后获取未读的消息 // 最后收到的消息id用于过虑重连后获取未读的消息
int64 last_msg_id = 3; int64 last_msg_id = 3;
} }
// 鉴权返回 // 鉴权返回
message AuthResp {} message AuthResp {
// 心跳请求
message HeartbeatReq{}
// 心跳返回
message HeartbeatResp{}
// target_path
message TargetPath {
// 需要订阅的target_paths
repeated string target_paths = 1;
} }
// 消息回执 // target_path:
message MessageAckReq { // "/" Service-Name "/" {method name} 参考 gRPC Request Path
// 消息id message BroadcastFrame {
int64 ack_id = 1; // 请求消息信息
// ack来源由业务指定用于埋点跟踪 FrameOption options = 1;
string ack_origin = 2; // 业务target_path
// 消息对应的target_path,方便业务区分和监控统计 string target_path = 2;
string target_path = 3; // 业务pb内容
google.protobuf.Any body = 3;
} }
// message_id: // message_id:
@@ -79,18 +79,33 @@ message FrameOption {
// 业务状态码 // 业务状态码
bilibili.rpc.Status status = 4; bilibili.rpc.Status status = 4;
// 业务ack来源, 仅downstream时候由服务端填写. // 业务ack来源, 仅downstream时候由服务端填写.
string ack_origin = 5; string ack_origin = 5;
//
int64 timestamp = 6;
} }
// target_path: // 心跳请求
// "/" Service-Name "/" {method name} 参考 gRPC Request Path message HeartbeatReq{
message BroadcastFrame {
// 请求消息信息
FrameOption options = 1;
// 业务target_path
string target_path = 2;
// 业务pb内容
google.protobuf.Any body = 3;
} }
// 心跳返回
message HeartbeatResp{
}
// 消息回执
message MessageAckReq {
// 消息id
int64 ack_id = 1;
// ack来源由业务指定用于埋点跟踪
string ack_origin = 2;
// 消息对应的target_path方便业务区分和监控统计
string target_path = 3;
}
// target_path
message TargetPath {
// 需要订阅的target_paths
repeated string target_paths = 1;
}

View File

@@ -4,10 +4,24 @@ package bilibili.broadcast.v1;
import "google/protobuf/empty.proto"; import "google/protobuf/empty.proto";
message ModResourceResp {}
// ModManager // ModManager
service ModManager { service ModManager {
// //
rpc WatchResource(google.protobuf.Empty) returns (stream ModResourceResp); rpc WatchResource(google.protobuf.Empty) returns (stream ModResourceResp);
} }
//
message ModResourceResp {
//
int32 atcion = 1;
//
string app_key = 2;
//
string pool_name = 3;
//
string module_name = 4;
//
int64 module_version = 5;
//
int64 list_version = 6;
}

View File

@@ -9,6 +9,26 @@ service Push {
rpc WatchMessage(google.protobuf.Empty) returns (stream PushMessageResp); rpc WatchMessage(google.protobuf.Empty) returns (stream PushMessageResp);
} }
//
enum LinkType {
LINK_TYPE_UNKNOWN = 0; // 未知
LINK_TYPE_BANGUMI = 1; // 番剧
LINK_TYPE_VIDEO = 2; // 视频
LINK_TYPE_LIVE = 3; // 直播
}
//
message PageBlackList {
//
string id = 1;
}
//
message PageView {
//
string id = 1;
}
// //
message PushMessageResp { message PushMessageResp {
// 业务类型 // 业务类型
@@ -78,30 +98,14 @@ message PushMessageResp {
repeated PageView page_view = 13; repeated PageView page_view = 13;
// 跳转资源 // 跳转资源
TargetResource target_resource = 14; TargetResource target_resource = 14;
}
//
message PageBlackList {
// //
string id = 1; int32 image_frame = 15;
}
//
message PageView {
// //
string id = 1; int32 image_marker = 16;
} //
int32 image_position = 17;
// //
enum LinkType { int64 job = 18;
// 未知
LINK_TYPE_UNKNOWN = 0;
// 番剧
LINK_TYPE_BANGUMI = 1;
// 视频
LINK_TYPE_VIDEO = 2;
// 直播
LINK_TYPE_LIVE = 3;
} }
// //

View File

@@ -12,15 +12,19 @@ service BroadcastRoom {
} }
// //
message RoomJoinEvent {} message RoomErrorEvent {
//
message RoomLeaveEvent {}
//
message RoomOnlineEvent {
// //
int32 online = 1; bilibili.rpc.Status status = 1;
}
//
message RoomJoinEvent {
}
//
message RoomLeaveEvent {
} }
// //
@@ -32,9 +36,11 @@ message RoomMessageEvent {
} }
// //
message RoomErrorEvent { message RoomOnlineEvent {
// //
bilibili.rpc.Status status = 1; int32 online = 1;
//
int32 all_online = 2;
} }
// //

View File

@@ -14,13 +14,33 @@ service Test {
rpc WatchTestEvent(google.protobuf.Empty) returns (stream TestResp); rpc WatchTestEvent(google.protobuf.Empty) returns (stream TestResp);
} }
//
service Test2 {
//
rpc Test(AddParams) returns (google.protobuf.Empty);
}
//
message AddParams {
//
int32 a = 1;
//
int32 b = 2;
}
//
message AddResult {
//
int32 r = 1;
}
message TestResp { message TestResp {
// 任务id // 任务id
int64 taskid = 1 [json_name="taskid"]; int64 taskid = 1;
// 时间戳 // 时间戳
int64 timestamp = 2 [json_name="timestamp"]; int64 timestamp = 2;
// 消息 // 消息
string message = 3 [json_name="message"]; string message = 3;
// 扩展 // 扩展
google.protobuf.Any extra = 4; google.protobuf.Any extra = 4;
} }

View File

@@ -18,147 +18,26 @@ service DM {
rpc DmExpoReport (DmExpoReportReq) returns (DmExpoReportRes); rpc DmExpoReport (DmExpoReportReq) returns (DmExpoReportRes);
} }
// 弹幕SDK-请求 //
message DmSegSDKReq { message BuzzwordConfig {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
}
// 弹幕SDK-响应
message DmSegSDKReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 弹幕列表
repeated DanmakuElem elems = 2;
}
// ott弹幕列表-请求
message DmSegOttReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
}
// ott弹幕列表-响应
message DmSegOttReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 弹幕列表
repeated DanmakuElem elems = 2;
}
// 获取弹幕-请求
message DmSegMobileReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
// 是否青少年模式
int32 teenagers_mode = 5;
}
// 获取弹幕-响应
message DmSegMobileReply {
// 弹幕列表
repeated DanmakuElem elems = 1;
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
int32 state = 2;
// 弹幕云屏蔽ai评分值
DanmakuAIFlag ai_flag = 3;
}
// 客户端弹幕元数据-请求
message DmViewReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 页面spm
string spmid = 4;
// 是否冷启
int32 is_hard_boot = 5;
}
// 客户端弹幕元数据-响应
message DmViewReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 智能防挡弹幕蒙版信息
VideoMask mask = 2;
// 视频字幕
VideoSubtitle subtitle = 3;
// 高级弹幕专包url(bfs)
repeated string special_dms = 4;
// 云屏蔽配置信息
DanmakuFlagConfig ai_flag = 5;
// 弹幕配置信息
DanmuPlayerViewConfig player_config = 6;
// 弹幕发送框样式
int32 send_box_style = 7;
// 是否允许
bool allow = 8;
// check box 是否展示
string check_box = 9;
// check box 展示文本
string check_box_show_msg = 10;
// 展示文案
string text_placeholder = 11;
// 弹幕输入框文案
string input_placeholder = 12;
// 用户举报弹幕 cid维度屏蔽的正则规则
repeated string report_filter_content = 13;
}
// web端弹幕元数据-响应
message DmWebViewReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
int32 state = 1;
// //
string text = 2; repeated BuzzwordShowConfig keywords = 1;
}
//
message BuzzwordShowConfig {
// //
string text_side = 3; string name = 1;
// 分段弹幕配置 //
DmSegConfig dm_sge = 4; string schema = 2;
// 云屏蔽配置信息 //
DanmakuFlagConfig flag = 5; int32 source = 3;
// 高级弹幕专包url(bfs) //
repeated string special_dms = 6; int64 id = 4;
// check box 是否展示 //
bool check_box = 7; int64 buzzword_id = 5;
// 弹幕数 //
int64 count = 8; int32 schema_type = 6;
// 互动弹幕
repeated CommandDm commandDms = 9;
// 用户弹幕配置
DanmuWebPlayerConfig player_config = 10;
// 用户举报弹幕 cid维度屏蔽
repeated string report_filter_content = 11;
} }
// 互动弹幕条目信息 // 互动弹幕条目信息
@@ -185,93 +64,17 @@ message CommandDm {
string idStr = 10; string idStr = 10;
} }
// // 弹幕属性位值
message DmSegConfig { enum DMAttrBit {
// DMAttrBitProtect = 0; // 保护弹幕
int64 page_size = 1; DMAttrBitFromLive = 1; // 直播弹幕
// DMAttrHighLike = 2; // 高赞弹幕
int64 total = 2;
} }
// 智能防挡弹幕蒙版信息 // 弹幕ai云屏蔽列表
message VideoMask { message DanmakuAIFlag {
// 视频cid // 弹幕ai云屏蔽条目
int64 cid = 1; repeated DanmakuFlag dm_flags = 1;
// 平台
// 0:web端 1:客户端
int32 plat = 2;
// 帧率
int32 fps = 3;
// 间隔时间
int64 time = 4;
// 蒙版url
string mask_url = 5;
}
// 视频字幕信息
message VideoSubtitle {
// 视频原语言代码
string lan = 1;
// 视频原语言
string lanDoc = 2;
// 视频字幕列表
repeated SubtitleItem subtitles = 3;
}
// web端用户弹幕配置
message DanmuWebPlayerConfig {
bool dm_switch = 1; // 是否开启弹幕
bool ai_switch = 2; // 是否开启智能云屏蔽
int32 ai_level = 3; // 智能云屏蔽等级
bool blocktop = 4; // 是否屏蔽顶端弹幕
bool blockscroll = 5; // 是否屏蔽滚动弹幕
bool blockbottom = 6; // 是否屏蔽底端弹幕
bool blockcolor = 7; // 是否屏蔽彩色弹幕
bool blockspecial = 8; // 是否屏蔽重复弹幕
bool preventshade = 9; //
bool dmask = 10; //
float opacity = 11; //
int32 dmarea = 12; //
float speedplus = 13; //
float fontsize = 14; // 弹幕字号
bool screensync = 15; //
bool speedsync = 16; //
string fontfamily = 17; //
bool bold = 18; // 是否使用加粗
int32 fontborder = 19; //
string draw_type = 20; // 弹幕渲染类型
}
// 单个字幕信息
message SubtitleItem {
// 字幕id
int64 id = 1;
// 字幕id str
string id_str = 2;
// 字幕语言代码
string lan = 3;
// 字幕语言
string lan_doc = 4;
// 字幕文件url
string subtitle_url = 5;
// 字幕作者信息
UserInfo author = 6;
}
// 字幕作者信息
message UserInfo {
// 用户mid
int64 mid = 1;
// 用户昵称
string name = 2;
// 用户性别
string sex = 3;
// 用户头像url
string face = 4;
// 用户签名
string sign = 5;
// 用户等级
int32 rank = 6;
} }
// 弹幕条目 // 弹幕条目
@@ -305,52 +108,10 @@ message DanmakuElem {
int32 attr = 13; int32 attr = 13;
} }
// 弹幕属性位值
enum DMAttrBit {
// 保护弹幕
DMAttrBitProtect = 0;
// 直播弹幕
DMAttrBitFromLive = 1;
// 高赞弹幕
DMAttrHighLike = 2;
}
// 修改弹幕配置-请求
message DmPlayerConfigReq {
int64 ts = 1; //
PlayerDanmakuSwitch switch = 2; // 是否开启弹幕
PlayerDanmakuSwitchSave switch_save = 3; // 是否记录弹幕开关设置
PlayerDanmakuUseDefaultConfig use_default_config = 4; // 是否使用推荐弹幕设置
PlayerDanmakuAiRecommendedSwitch ai_recommended_switch = 5; // 是否开启智能云屏蔽
PlayerDanmakuAiRecommendedLevel ai_recommended_level = 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;
}
// 弹幕ai云屏蔽条目 // 弹幕ai云屏蔽条目
message DanmakuFlag { message DanmakuFlag {
// 弹幕dmid int64 dmid = 1; // 弹幕dmid
int64 dmid = 1; uint32 flag = 2; // 评分
// 评分
uint32 flag = 2;
} }
// 云屏蔽配置信息 // 云屏蔽配置信息
@@ -363,22 +124,6 @@ message DanmakuFlagConfig {
int32 rec_switch = 3; int32 rec_switch = 3;
} }
// 弹幕ai云屏蔽列表
message DanmakuAIFlag {
// 弹幕ai云屏蔽条目
repeated DanmakuFlag dm_flags = 1;
}
// 弹幕配置信息
message DanmuPlayerViewConfig {
// 弹幕默认配置
DanmuDefaultPlayerConfig danmuku_default_player_config = 1;
// 弹幕用户配置
DanmuPlayerConfig danmuku_player_config = 2;
// 弹幕显示区域自动配置列表
repeated DanmuPlayerDynamicConfig danmuku_player_dynamic_config = 3;
}
// 弹幕默认配置 // 弹幕默认配置
message DanmuDefaultPlayerConfig { message DanmuDefaultPlayerConfig {
bool player_danmaku_use_default_config = 1; // 是否使用推荐弹幕设置 bool player_danmaku_use_default_config = 1; // 是否使用推荐弹幕设置
@@ -395,6 +140,7 @@ message DanmuDefaultPlayerConfig {
float player_danmaku_domain = 14; // 弹幕显示区域 float player_danmaku_domain = 14; // 弹幕显示区域
int32 player_danmaku_speed = 15; // 弹幕速度 int32 player_danmaku_speed = 15; // 弹幕速度
bool inline_player_danmaku_switch = 16; // 是否开启弹幕 bool inline_player_danmaku_switch = 16; // 是否开启弹幕
int32 player_danmaku_senior_mode_switch = 17; //
} }
// 弹幕配置 // 弹幕配置
@@ -417,6 +163,8 @@ message DanmuPlayerConfig {
bool player_danmaku_enableblocklist = 16; // 是否开启屏蔽列表 bool player_danmaku_enableblocklist = 16; // 是否开启屏蔽列表
bool inline_player_danmaku_switch = 17; // 是否开启弹幕 bool inline_player_danmaku_switch = 17; // 是否开启弹幕
int32 inline_player_danmaku_config = 18; // int32 inline_player_danmaku_config = 18; //
int32 player_danmaku_ios_switch_save = 19; //
int32 player_danmaku_senior_mode_switch = 20; //
} }
// 弹幕显示区域自动配置 // 弹幕显示区域自动配置
@@ -424,40 +172,376 @@ message DanmuPlayerDynamicConfig {
// 时间 // 时间
int32 progress = 1; int32 progress = 1;
// 弹幕显示区域 // 弹幕显示区域
float player_danmaku_domain = 2; float player_danmaku_domain = 14;
}
// 弹幕配置信息
message DanmuPlayerViewConfig {
// 弹幕默认配置
DanmuDefaultPlayerConfig danmuku_default_player_config = 1;
// 弹幕用户配置
DanmuPlayerConfig danmuku_player_config = 2;
// 弹幕显示区域自动配置列表
repeated DanmuPlayerDynamicConfig danmuku_player_dynamic_config = 3;
}
// web端用户弹幕配置
message DanmuWebPlayerConfig {
bool dm_switch = 1; // 是否开启弹幕
bool ai_switch = 2; // 是否开启智能云屏蔽
int32 ai_level = 3; // 智能云屏蔽等级
bool blocktop = 4; // 是否屏蔽顶端弹幕
bool blockscroll = 5; // 是否屏蔽滚动弹幕
bool blockbottom = 6; // 是否屏蔽底端弹幕
bool blockcolor = 7; // 是否屏蔽彩色弹幕
bool blockspecial = 8; // 是否屏蔽重复弹幕
bool preventshade = 9; //
bool dmask = 10; //
float opacity = 11; //
int32 dmarea = 12; //
float speedplus = 13; //
float fontsize = 14; // 弹幕字号
bool screensync = 15; //
bool speedsync = 16; //
string fontfamily = 17; //
bool bold = 18; // 是否使用加粗
int32 fontborder = 19; //
string draw_type = 20; // 弹幕渲染类型
int32 senior_mode_switch = 21; //
}
//
message DmExpoReportReq {
//
string session_id = 1;
//
int64 oid = 2;
//
string spmid = 4;
}
//
message DmExpoReportRes {
}
// 修改弹幕配置-请求
message DmPlayerConfigReq {
int64 ts = 1; //
PlayerDanmakuSwitch switch = 2; // 是否开启弹幕
PlayerDanmakuSwitchSave switch_save = 3; // 是否记录弹幕开关设置
PlayerDanmakuUseDefaultConfig use_default_config = 4; // 是否使用推荐弹幕设置
PlayerDanmakuAiRecommendedSwitch ai_recommended_switch = 5; // 是否开启智能云屏蔽
PlayerDanmakuAiRecommendedLevel ai_recommended_level = 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; // 是否开启弹幕
PlayerDanmakuSeniorModeSwitch senior_mode_switch = 19; //
}
//
message DmSegConfig {
//
int64 page_size = 1;
//
int64 total = 2;
}
// 获取弹幕-响应
message DmSegMobileReply {
// 弹幕列表
repeated DanmakuElem elems = 1;
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
int32 state = 2;
// 弹幕云屏蔽ai评分值
DanmakuAIFlag ai_flag = 3;
}
// 获取弹幕-请求
message DmSegMobileReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
// 是否青少年模式
int32 teenagers_mode = 5;
}
// ott弹幕列表-响应
message DmSegOttReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 弹幕列表
repeated DanmakuElem elems = 2;
}
// ott弹幕列表-请求
message DmSegOttReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
}
// 弹幕SDK-响应
message DmSegSDKReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 弹幕列表
repeated DanmakuElem elems = 2;
}
// 弹幕SDK-请求
message DmSegSDKReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 分段(6min)
int64 segment_index = 4;
}
// 客户端弹幕元数据-响应
message DmViewReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
bool closed = 1;
// 智能防挡弹幕蒙版信息
VideoMask mask = 2;
// 视频字幕
VideoSubtitle subtitle = 3;
// 高级弹幕专包url(bfs)
repeated string special_dms = 4;
// 云屏蔽配置信息
DanmakuFlagConfig ai_flag = 5;
// 弹幕配置信息
DanmuPlayerViewConfig player_config = 6;
// 弹幕发送框样式
int32 send_box_style = 7;
// 是否允许
bool allow = 8;
// check box 是否展示
string check_box = 9;
// check box 展示文本
string check_box_show_msg = 10;
// 展示文案
string text_placeholder = 11;
// 弹幕输入框文案
string input_placeholder = 12;
// 用户举报弹幕 cid维度屏蔽的正则规则
repeated string report_filter_content = 13;
//
ExpoReport expo_report = 14;
//
BuzzwordConfig buzzword_config = 15;
//
repeated Expressions expressions = 16;
}
// 客户端弹幕元数据-请求
message DmViewReq {
// 稿件avid/漫画epid
int64 pid = 1;
// 视频cid/漫画cid
int64 oid = 2;
// 弹幕类型
// 1:视频 2:漫画
int32 type = 3;
// 页面spm
string spmid = 4;
// 是否冷启
int32 is_hard_boot = 5;
}
// web端弹幕元数据-响应
message DmWebViewReply {
// 是否已关闭弹幕
// 0:未关闭 1:已关闭
int32 state = 1;
//
string text = 2;
//
string text_side = 3;
// 分段弹幕配置
DmSegConfig dm_sge = 4;
// 云屏蔽配置信息
DanmakuFlagConfig flag = 5;
// 高级弹幕专包url(bfs)
repeated string special_dms = 6;
// check box 是否展示
bool check_box = 7;
// 弹幕数
int64 count = 8;
// 互动弹幕
repeated CommandDm commandDms = 9;
// 用户弹幕配置
DanmuWebPlayerConfig player_config = 10;
// 用户举报弹幕 cid维度屏蔽
repeated string report_filter_content = 11;
//
repeated Expressions expressions = 12;
}
//
message ExpoReport {
//
bool should_report_at_end = 1;
}
//
message Expression {
//
repeated string keyword = 1;
//
string url = 2;
//
repeated Period period = 3;
}
//
message Expressions {
//
repeated Expression data = 1;
}
//
message Period {
//
int64 start = 1;
//
int64 end = 2;
} }
// 是否开启弹幕 // 是否开启弹幕
message PlayerDanmakuSwitch {bool value = 1;bool canIgnore = 2;} message InlinePlayerDanmakuSwitch {bool value = 1;}
// 是否记录弹幕开关设置
message PlayerDanmakuSwitchSave {bool value = 1;}
// 是否使用推荐弹幕设置
message PlayerDanmakuUseDefaultConfig {bool value = 1;}
// 是否开启智能云屏蔽
message PlayerDanmakuAiRecommendedSwitch {bool value = 1;}
// 智能云屏蔽等级 // 智能云屏蔽等级
message PlayerDanmakuAiRecommendedLevel {bool value = 1;} message PlayerDanmakuAiRecommendedLevel {bool value = 1;}
// 是否屏蔽顶端弹幕 // 是否开启智能云屏蔽
message PlayerDanmakuBlocktop {bool value = 1;} message PlayerDanmakuAiRecommendedSwitch {bool value = 1;}
// 是否屏蔽滚动弹幕
message PlayerDanmakuBlockscroll {bool value = 1;}
// 是否屏蔽底端弹幕 // 是否屏蔽底端弹幕
message PlayerDanmakuBlockbottom {bool value = 1;} message PlayerDanmakuBlockbottom {bool value = 1;}
// 是否屏蔽彩色弹幕 // 是否屏蔽彩色弹幕
message PlayerDanmakuBlockcolorful {bool value = 1;} message PlayerDanmakuBlockcolorful {bool value = 1;}
// 是否屏蔽重复弹幕 // 是否屏蔽重复弹幕
message PlayerDanmakuBlockrepeat {bool value = 1;} message PlayerDanmakuBlockrepeat {bool value = 1;}
// 是否屏蔽滚动弹幕
message PlayerDanmakuBlockscroll {bool value = 1;}
// 是否屏蔽高级弹幕 // 是否屏蔽高级弹幕
message PlayerDanmakuBlockspecial {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 PlayerDanmakuOpacity {float value = 1;}
// 弹幕缩放比例 // 弹幕缩放比例
message PlayerDanmakuScalingfactor {float value = 1;} message PlayerDanmakuScalingfactor {float value = 1;}
// 弹幕显示区域 //
message PlayerDanmakuDomain {float value = 1;} message PlayerDanmakuSeniorModeSwitch {int32 value = 1;}
// 弹幕速度 // 弹幕速度
message PlayerDanmakuSpeed {int32 value = 1;} message PlayerDanmakuSpeed {int32 value = 1;}
// 是否开启屏蔽列表
message PlayerDanmakuEnableblocklist {bool value = 1;}
// 是否开启弹幕 // 是否开启弹幕
message InlinePlayerDanmakuSwitch {bool value = 1;} message PlayerDanmakuSwitch {bool value = 1;bool canIgnore = 2;}
// 是否记录弹幕开关设置
message PlayerDanmakuSwitchSave {bool value = 1;}
// 是否使用推荐弹幕设置
message PlayerDanmakuUseDefaultConfig {bool value = 1;}
// 修改弹幕配置-响应
message Response {
//
int32 code = 1;
//
string message = 2;
}
// 单个字幕信息
message SubtitleItem {
// 字幕id
int64 id = 1;
// 字幕id str
string id_str = 2;
// 字幕语言代码
string lan = 3;
// 字幕语言
string lan_doc = 4;
// 字幕文件url
string subtitle_url = 5;
// 字幕作者信息
UserInfo author = 6;
// 字幕类型
SubtitleType type = 7;
}
enum SubtitleType {
CC = 0; // CC字幕
AI = 1; // AI生成字幕
}
// 字幕作者信息
message UserInfo {
// 用户mid
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:客户端
int32 plat = 2;
// 帧率
int32 fps = 3;
// 间隔时间
int64 time = 4;
// 蒙版url
string mask_url = 5;
}
// 视频字幕信息
message VideoSubtitle {
// 视频原语言代码
string lan = 1;
// 视频原语言
string lanDoc = 2;
// 视频字幕列表
repeated SubtitleItem subtitles = 3;
}