更新大量【proto定义】并勘误

This commit is contained in:
社会易姐QwQ
2021-07-06 21:28:36 +08:00
parent 129b9bc88b
commit ce8d00fcd0
36 changed files with 2951 additions and 2099 deletions
-594
View File
@@ -1,594 +0,0 @@
syntax = "proto3";
package bilibili.app.interfaces.v1;
import "bilibili/app/playurl/v1.proto";
//历史记录接口
service History {
//搜索历史记录
//https://app.bilibili.com/bilibili.app.interface.v1.History/Search
rpc search (SearchReq) returns (SearchReply);
//?
//https://app.bilibili.com/bilibili.app.interface.v1.History/LatestHistory
rpc latestHistory (LatestHistoryReq) returns (LatestHistoryReply);
//获取历史记录业务类型
//https://app.bilibili.com/bilibili.app.interface.v1.History/HistoryTab
rpc historyTab (HistoryTabReq) returns (HistoryTabReply);
//删除历史记录
//https://app.bilibili.com/bilibili.app.interface.v1.History/Delete
rpc delete (DeleteReq) returns (NoReply);
//获取历史记录列表v2接口
//https://app.bilibili.com/bilibili.app.interface.v1.History/CursorV2
rpc cursorV2 (CursorV2Req) returns (CursorV2Reply);
//获取历史记录列表v1接口
//https://app.bilibili.com/bilibili.app.interface.v1.History/Cursor
rpc cursor (CursorReq) returns (CursorReply);
//清空历史记录
//https://app.bilibili.com/bilibili.app.interface.v1.History/Clear
rpc clear (ClearReq) returns (NoReply);
}
//搜索接口
service Search {
//获取搜索建议
//https://app.bilibili.com/bilibili.app.interface.v1.Search/Suggest3
rpc suggest3 (SuggestionResult3Req) returns (SuggestionResult3Reply);
}
//搜索历史记录-请求
message SearchReq {
//关键词
string keyword = 1;
//页码
int64 pn = 2;
//业务选择
string business = 3;
}
//搜索历史记录-回复
message SearchReply {
//历史记录条目列表
repeated CursorItem items = 1;
//是否未拉取完
bool hasMore = 2;
//页面信息
Page page = 3;
}
//?-请求
message LatestHistoryReq {
//业务选择
string business = 1;
//视频预加载配置
PlayerPreloadParams playerPreload = 2;
}
//?-回复
message LatestHistoryReply {
//历史记录条目
CursorItem items = 1;
//
string scene = 2;
}
//获取历史记录业务类型-请求
message HistoryTabReq {
//
string business = 1;
//
HistorySource source = 2;
//
string keyword = 3;
}
//获取历史记录业务类型-回复
message HistoryTabReply {
//
repeated CursorTab tab = 1;
}
//删除历史记录-请求
message DeleteReq {
//历史记录信息
HisInfo hisInfo = 1;
}
//获取历史记录列表v2接口-请求
message CursorV2Req {
//游标信息
Cursor cursor = 1;
//业务选择
string business = 2;
//视频预加载配置
PlayerPreloadParams playerPreload = 3;
//
bilibili.app.playurl.v1.PlayerArgs playerArgs = 4;
}
//获取历史记录列表v2接口-回复
message CursorV2Reply {
//历史记录条目列表
repeated CursorItem items = 1;
//游标信息
Cursor cursor = 2;
//是否未拉取完
bool hasMore = 3;
}
//获取历史记录列表v1接口-请求
message CursorReq {
//游标信息
Cursor cursor = 1;
//业务选择
string business = 2;
//视频预加载配置
PlayerPreloadParams playerPreload = 3;
}
//获取历史记录列表v1接口-回复
message CursorReply {
//历史记录条目列表
repeated CursorItem items = 1;
//业务类型表
repeated CursorTab tab = 2;
//游标信息
Cursor cursor = 3;
//是否未拉取完
bool hasMore = 4;
}
//清空历史记录-请求
message ClearReq {
//业务选择
string business = 1;
}
//空回复
message NoReply {
}
//获取搜索建议-请求
message SuggestionResult3Req {
//关键字
string keyword = 1;
//是否语法高亮
int32 highlight = 2;
//是否青少年模式
int32 teenagersMode = 3;
}
//获取搜索建议-回复
message SuggestionResult3Reply {
//搜索追踪id
string trackid = 1;
//搜索建议条目列表
repeated ResultItem list = 2;
//
string expStr = 3;
}
//专栏条目类型
message CardArticle {
//封面uel
repeated string covers = 1;
//作者昵称
string name = 2;
//作者UID
int64 mid = 3;
//
bool displayAttention = 4;
//标志名
string badge = 5;
//
Relation relation = 6;
}
//课程条目类型
message CardCheese {
//封面url
string cover = 1;
//观看进度
int64 progress = 2;
//总计时长
int64 duration = 3;
//单集标题
string subtitle = 4;
}
//直播条目类型
message CardLive {
//封面url
string cover = 1;
//主播昵称
string name = 2;
//主播UID
int64 mid = 3;
//直播分区名
string tag = 4;
//
int32 ststus = 5;
//
bool displayAttention = 6;
//
Relation relation = 7;
}
//pgc稿件条目类型
message CardOGV {
//封面url
string cover = 1;
//观看进度
int64 progress = 2;
//总计时长
int64 duration = 3;
//单集标题
string subtitle = 4;
}
//ugc稿件条目类型
message CardUGC {
//封面url
string cover = 1;
//观看进度
int64 progress = 2;
//视频长度
int64 duration = 3;
//UP主昵称
string name = 4;
//UP主UID
int64 mid = 5;
//
bool displayAttention = 6;
//观看视频cid
int64 cid = 7;
//观看视频分P
int32 page = 8;
//
string subtitle = 9;
//
Relation relation = 10;
//稿件bvid
string bvid = 11;
//总分P数
int64 videos = 12;
//短链接
string shortLink = 13;
//副标题文案
string shareSubtitle = 14;
//播放数
int64 view = 15;
}
//游标信息
message Cursor {
//起始时间戳
int64 max = 1;
//
int32 maxTp = 2;
}
//历史记录条目
message CursorItem {
//主体数据
oneof cardItemCase {
//ugc稿件
CardUGC cardUGC = 1;
//pgc稿件
CardOGV cardOGV = 2;
//专栏
CardArticle cardArticle = 3;
//直播
CardLive cardLive = 4;
//课程
CardCheese cardCheese = 5;
}
//标题
string title = 6;
//目标uri/url
string uri = 7;
//观看时间
int64 viewAt = 8;
//历史记录id
int64 kid = 9;
//对象id
int64 oid = 10;
//业务类型
string business = 11;
//业务类型代码
int32 tp = 12;
//设备标识
DeviceType dt = 13;
//
bool hasShare = 14;
}
//业务分类表
message CursorTab {
//业务名
string business = 1;
//名称
string name = 2;
//路由uri
string router = 3;
//
bool focus = 4;
}
//设备标识代码
enum DT {
//未知
Unknown_VALUE = 0;
//手机端
Phone_VALUE = 1;
//ipad端
Pad_VALUE = 2;
//web端
PC_VALUE = 3;
}
//设备标识
message DeviceType {
//设备标识代码
DT type = 1;
//图标url
string icon = 2;
}
//历史记录信息
message HisInfo {
//业务选择
string business = 1;
//历史记录id
int64 kid = 2;
}
//
enum HistorySource {
//
history_VALUE = 0;
//
shopping_VALUE = 1;
}
//
message OfficialVerify {
//
int32 type = 1;
//
string desc = 2;
}
//页面信息
message Page {
//当前页码
int64 pn = 1;
//总计条目数
int64 total = 2;
}
//视频预加载配置
message PlayerPreloadParams {
//清晰度
int64 qn = 1;
//
int64 fnver = 2;
//流类型
int64 fnval = 3;
//强制域名
int64 forceHost = 4;
//是否4K
int64 fourk = 5;
}
//
message ReasonStyle {
//
string text = 1;
//
string textColor = 2;
//
string textColorNight = 3;
//
string bgColor = 4;
//
string bgColorNight = 5;
//
string borderColor = 6;
//
string borderColorNight = 7;
//
int32 bgStyle = 8;
}
//
message Relation {
//
int32 status = 1;
//
int32 isFollow = 2;
//
int32 isFollowed = 3;
}
//搜索建议条目
message ResultItem {
//来源
string from = 1;
//显示结果(语法高亮)
string title = 2;
//结果
string keyword = 3;
//序号
int32 position = 4;
//
string cover = 5;
//
double coverSize = 6;
//
string sugType = 7;
//
int32 termType = 8;
//
string goto = 9;
//
string uri = 10;
//
OfficialVerify officialVerify = 11;
//
string param = 12;
//
int64 mid = 13;
//
int32 fans = 14;
//
int32 level = 15;
//
int32 archives = 16;
//
int64 ptime = 17;
//
string seasonTypeName = 18;
//
string area = 19;
//
string style = 20;
//
string label = 21;
//
double rating = 22;
//
int32 vote = 23;
//
repeated ReasonStyle badges = 24;
//
string styles = 25;
//
int64 moduleId = 26;
//
string liveLink = 27;
}
@@ -0,0 +1,374 @@
syntax = "proto3";
package bilibili.app.interfaces.v1;
import "bilibili/app/archive/middleware/v1/preload.proto";
// 历史记录
service History {
// 获取历史记录tab
rpc HistoryTab (HistoryTabReq) returns (HistoryTabReply);
// 获取历史记录列表(旧版)
rpc Cursor (CursorReq) returns (CursorReply);
// 获取历史记录列表
rpc CursorV2 (CursorV2Req) returns (CursorV2Reply);
// 删除历史记录
rpc Delete (DeleteReq) returns (NoReply);
// 搜索历史记录
rpc Search (SearchReq) returns (SearchReply);
// 清空历史记录
rpc Clear (ClearReq) returns (NoReply);
// 获取最新的历史记录
rpc LatestHistory (LatestHistoryReq) returns (LatestHistoryReply);
}
// 获取历史记录tab-请求
message HistoryTabReq {
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 1;
// 查询请求来源
HistorySource source = 2;
// 搜索关键词
string keyword = 3;
}
// 获取历史记录tab-响应
message HistoryTabReply {
// tab列表
repeated CursorTab tab = 1;
}
// 搜索历史记录来源
enum HistorySource {
// 主站历史记录页
history_VALUE = 0;
// 会员购浏览记录
shopping_VALUE = 1;
}
// 获取历史记录列表(旧版)-请求
message CursorReq {
// 游标信息
Cursor cursor = 1;
// 业务类型
// all:全部 archive:视频 live:直播 article:专栏
string business = 2;
// 秒开参数(旧版)
PlayerPreloadParams playerPreload = 3;
// 秒开参数
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4;
}
// 获取历史记录列表(旧版)-响应
message CursorReply {
// 卡片内容
repeated CursorItem items = 1;
// 顶部tab
repeated CursorTab tab = 2;
// 游标信息
Cursor cursor = 3;
// 是否未拉取完
bool hasMore = 4;
}
// 获取历史记录列表-请求
message CursorV2Req {
// 游标信息
Cursor cursor = 1;
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 2;
// 秒开参数(旧版)
PlayerPreloadParams playerPreload = 3;
// 秒开参数
bilibili.app.archive.middleware.v1.PlayerArgs player_args = 4;
// 是否选择本机的播放历史
bool is_local = 5;
}
// 获取历史记录列表-响应
message CursorV2Reply {
// 卡片内容
repeated CursorItem items = 1;
// 游标信息
Cursor cursor = 2;
// 是否未拉取完
bool hasMore = 3;
}
// 历史记录卡片信息
message CursorItem {
// 主体数据
oneof card_item {
// ugc稿件
CardUGC cardUGC = 1;
// pgc稿件
CardOGV cardOGV = 2;
// 专栏
CardArticle cardArticle = 3;
// 直播
CardLive cardLive = 4;
// 课程
CardCheese cardCheese = 5;
}
// 标题
string title = 6;
// 目标uri/url
string uri = 7;
// 观看时间
int64 viewAt = 8;
// 历史记录id
int64 kid = 9;
// 业务id
int64 oid = 10;
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 11;
// 业务类型代码
int32 tp = 12;
// 设备标识
DeviceType dt = 13;
// 是否有分享按钮
bool hasShare = 14;
}
// ugc稿件卡片
message CardUGC {
// 封面url
string cover = 1;
// 观看进度
int64 progress = 2;
// 视频长度
int64 duration = 3;
// UP主昵称
string name = 4;
// UP主mid
int64 mid = 5;
// 是否展示关注按钮
bool displayAttention = 6;
// 历史观看视频cid
int64 cid = 7;
// 历史观看视频分P
int32 page = 8;
// 历史观看视频分P的标题
string subtitle = 9;
// 关系信息
Relation relation = 10;
// 稿件bvid
string bvid = 11;
// 总分P数
int64 videos = 12;
// 短链接
string shortLink = 13;
// 分享副标题
string shareSubtitle = 14;
// 播放数
int64 view = 15;
}
// pgc稿件卡片
message CardOGV {
// 封面url
string cover = 1;
// 观看进度
int64 progress = 2;
// 总计时长
int64 duration = 3;
// 单集标题
string subtitle = 4;
}
// 专栏卡片
message CardArticle {
// 封面url
repeated string covers = 1;
// UP主昵称
string name = 2;
// UP主mid
int64 mid = 3;
// 是否展示关注按钮
bool displayAttention = 4;
// 角标
string badge = 5;
// 关系信息
Relation relation = 6;
}
// 直播卡片
message CardLive {
// 封面url
string cover = 1;
// 主播昵称
string name = 2;
// 主播mid
int64 mid = 3;
// 直播分区名
string tag = 4;
// 直播状态
int32 ststus = 5;
// 是否展示关注按钮
bool displayAttention = 6;
// 关系信息
Relation relation = 7;
}
// 课程卡片
message CardCheese {
// 封面url
string cover = 1;
// 观看进度
int64 progress = 2;
// 总计时长
int64 duration = 3;
// 单集标题
string subtitle = 4;
}
// 业务分类表
message CursorTab {
// 业务类型
string business = 1;
// 名称
string name = 2;
// 路由uri
string router = 3;
// tab定位
bool focus = 4;
}
// 游标信息
message Cursor {
// 本页最大值游标值
int64 max = 1;
// 本页最大值游标类型
int32 maxTp = 2;
}
// 删除历史记录-请求
message DeleteReq {
// 历史记录信息
HisInfo hisInfo = 1;
}
// 历史记录信息
message HisInfo {
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 1;
// 历史记录id
int64 kid = 2;
}
// 空响应
message NoReply {}
// 设备类型
message DeviceType {
// 设备标识代码
DT type = 1;
// 图标url
string icon = 2;
}
//设备标识代码
enum DT {
// 未知
Un known = 0;
//手机端
Phone = 1;
// ipad端
Pad = 2;
// web端
PC = 3;
// TV端
TV = 4;
//
Car = 5;
//
Iot = 6;
// apad端
AndPad = 7;
}
// 关系信息
message Relation {
// 关系状态
// 1:未关注 2:已关注 3:被关注 4:互关
int32 status = 1;
// 用户关注UP主
int32 isFollow = 2;
// UP主关注用户
int32 isFollowed = 3;
}
// 搜索历史记录-请求
message SearchReq {
// 关键词
string keyword = 1;
// 页码
int64 pn = 2;
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 3;
}
// 搜索历史记录-响应
message SearchReply {
// 卡片内容
repeated CursorItem items = 1;
// 是否未拉取完
bool hasMore = 2;
// 页面信息
Page page = 3;
}
// 页面信息
message Page {
// 当前页码
int64 pn = 1;
// 总计条目数
int64 total = 2;
}
// 秒开参数
message PlayerPreloadParams {
//清晰度
int64 qn = 1;
// 流版本
int64 fnver = 2;
// 流类型
int64 fnval = 3;
// 是否强制域名
int64 forceHost = 4;
// 是否4K
int64 fourk = 5;
}
// 清空历史记录-请求
message ClearReq {
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 1;
}
// 获取最新的历史记录-请求
message LatestHistoryReq {
// 业务类型
// archive:视频 live:直播 article:专栏 goods:商品 show:展演
string business = 1;
// 秒开参数
PlayerPreloadParams playerPreload = 2;
}
// 获取最新的历史记录-响应
message LatestHistoryReply {
// 卡片内容
CursorItem items = 1;
// 场景
string scene = 2;
// 弹窗停留时间
int64 rtime = 3;
// 分组的标志(客户端埋点上报)
string flag = 4;
}
@@ -0,0 +1,119 @@
syntax = "proto3";
package bilibili.app.interfaces.v1;
// 搜索
service Search {
// 获取搜索建议
rpc Suggest3 (SuggestionResult3Req) returns (SuggestionResult3Reply);
}
// 获取搜索建议-请求
message SuggestionResult3Req {
// 关键字
string keyword = 1;
// 是否语法高亮
// 0:不显示 1:显示
int32 highlight = 2;
// 是否青少年模式
// 1:开启青少年模式
int32 teenagersMode = 3;
}
// 获取搜索建议-响应
message SuggestionResult3Reply {
// 搜索追踪id
string trackid = 1;
// 搜索建议条目列表
repeated ResultItem list = 2;
// 搜索的abtest 实验信息
string expStr = 3;
}
// 搜索建议条目
message ResultItem {
// 来源
string from = 1;
// 显示结果(语法高亮)
string title = 2;
// 搜索关键字
string keyword = 3;
// 序号
int32 position = 4;
// 图片
string cover = 5;
// 图片尺寸
double coverSize = 6;
// sug词类型
string sugType = 7;
// 词条大类型
int32 termType = 8;
// 跳转类型
string goto = 9;
// 跳转uri
string uri = 10;
// 认证信息
OfficialVerify officialVerify = 11;
// 跳转参数
string param = 12;
// up主mid
int64 mid = 13;
// 粉丝数
int32 fans = 14;
// up主等级
int32 level = 15;
// up主稿件数
int32 archives = 16;
// 投稿时间
int64 ptime = 17;
// season类型名称
string seasonTypeName = 18;
// 地区
string area = 19;
// 作品风格
string style = 20;
// 描述信息
string label = 21;
// 评分
double rating = 22;
// 投票数
int32 vote = 23;
// 角标
repeated ReasonStyle badges = 24;
//
string styles = 25;
//
int64 moduleId = 26;
//
string liveLink = 27;
}
// 认证信息
message OfficialVerify {
// 认证类型
// 127:未认证 0:个人 1:机构
int32 type = 1;
// 认证描述
string desc = 2;
}
// 角标
message ReasonStyle {
// 角标文案
string text = 1;
// 文案日间色值
string textColor = 2;
// 文案夜间色值
string textColorNight = 3;
// 背景日间色值
string bgColor = 4;
// 背景夜间色值
string bgColorNight = 5;
// 边框日间色值
string borderColor = 6;
// 边框夜间色值
string borderColorNight = 7;
// 角标样式
// 1:填充模式 2:镂空模式
int32 bgStyle = 8;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,61 @@
syntax = "proto3";
package bilibili.app.resource.privacy.v1;
// 隐私
service Privacy {
// 获取隐私设置
rpc PrivacyConfig(NoArgRequest) returns(PrivacyConfigReply);
// 修改隐私设置
rpc SetPrivacyConfig(SetPrivacyConfigRequest) returns(NoReply);
}
// 空请求
message NoArgRequest{}
// 空响应
message NoReply{}
// 获取隐私设置-响应
message PrivacyConfigReply {
// 隐私设置
PrivacyConfigItem privacy_config_item = 1;
}
// 隐私设置
message PrivacyConfigItem {
// 隐私开关类型
PrivacyConfigType privacy_config_type = 1;
//
string title = 2;
// 隐私开关状态
PrivacyConfigState state = 3;
//
string sub_title = 4;
//
string sub_title_uri = 5;
}
// 隐私开关类型
enum PrivacyConfigType {
//
none = 0;
// 动态同城
dynamic_city = 1;
}
// 隐私开关状态
enum PrivacyConfigState {
// 关闭
close = 0;
// 打开
open = 1;
}
// 修改隐私设置-请求
message SetPrivacyConfigRequest {
// 隐私开关类型
PrivacyConfigType privacy_config_type = 1;
// 隐私开关状态
PrivacyConfigState state = 2;
}
@@ -0,0 +1,133 @@
syntax = "proto3";
package bilibili.app.resource.v1;
//
service Module {
//
rpc List(ListReq) returns (ListReply);
}
//
enum EnvType {
//
Unknown = 0;
//
Release = 1;
//
Test = 2;
}
//
enum LevelType {
Undefined = 0;
// 高,需立即下载
High = 1;
// 中,可以延迟下载
Middle = 2;
// 低,仅在业务方使用到时由业务方手动进行下载
Low = 3;
}
//
message ListReq {
//
string pool_name = 1;
//
string module_name = 2;
//
repeated VersionListReq version_list = 3;
//
EnvType env = 4;
//
int32 sys_ver = 5;
//
int32 scale = 6;
//
int32 arch = 7;
}
//
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
Unzip = 0;
// 不操作
Original = 1;
}
message ListReply {
//
string env = 1;
//
repeated PoolReply pools = 2;
}
message PoolReply {
//
string name = 1;
//
repeated ModuleReply modules = 2;
}
message ModuleReply {
//
string name = 1;
//
int64 version = 2;
//
string url = 3;
//
string md5 = 4;
//
string total_md5 = 5;
//
IncrementType increment = 6;
//
bool is_wifi = 7;
//
LevelType level = 8;
//
string filename = 9;
//
string file_type = 10;
//
int64 file_size = 11;
//
CompressType compress = 12;
//
int64 publish_time = 13;
// 上报使用
int64 pool_id = 14;
//
int64 module_id = 15;
//
int64 version_id = 16;
//
int64 file_id = 17;
//
bool zip_check = 18;
}
@@ -43,7 +43,7 @@ message PopularResultReq {
// 数据埋点上报
// 0:代表手动刷新 1:代表自动刷新
int32 flush = 14;
// 视频秒开参数
// 秒开参数
bilibili.app.archive.middleware.v1.PlayerArgs playerArgs = 15;
}
+11 -11
View File
@@ -585,7 +585,7 @@ message UserSeason {
}
//
message SeasonPlayer{
message SeasonPlayer {
//
int64 aid = 1;
//
@@ -898,9 +898,9 @@ enum SeasonType {
//
Unknown = 0;
//
Base = 1;
Base = 1;
//
Good = 2;
Good = 2;
}
// UGC视频合集信息
@@ -1085,7 +1085,7 @@ message Node {
}
// 稿件播放中数据-请求
message ViewProgressReq{
message ViewProgressReq {
// 稿件avid
int64 aid = 1;
// 视频cid
@@ -1095,7 +1095,7 @@ message ViewProgressReq{
}
// 稿件播放中数据-回复
message ViewProgressReply{
message ViewProgressReply {
// 视频引导信息
VideoGuide videoGuide = 1;
// Chronos灰度管理
@@ -1171,7 +1171,7 @@ message OperationCardNew {
oneof renderCase {
// 标准卡
StandardCard standardCard= 6;
// 老运营卡片原B剪跳转卡
// 老运营卡片(原B剪跳转卡)
OperationCard operationCard = 7;
}
//
@@ -1200,7 +1200,7 @@ enum OperationCardType {
}
// 标准卡
message StandardCard{
message StandardCard {
// 卡片文案
string title = 1;
// 按钮文字 未操作
@@ -1212,7 +1212,7 @@ message StandardCard{
}
// 老运营卡片
message OperationCard{
message OperationCard {
// 开始时间(单位为秒)
int32 startTime = 1;
// 结束时间(单位为秒)
@@ -1230,7 +1230,7 @@ message OperationCard{
}
// 互动弹幕条目信息
message CommandDm{
message CommandDm {
// 弹幕id
int64 id = 1;
// 对象视频cid
@@ -1306,7 +1306,7 @@ message subTFPanel {
}
// 短视频下载-请求
message ShortFormVideoDownloadReq{
message ShortFormVideoDownloadReq {
// 稿件avid
int64 aid = 1;
// 视频cid
@@ -1379,7 +1379,7 @@ message BizFollowVideoParam {
}
// 预约活动参数
message BizReserveActivityParam{
message BizReserveActivityParam {
// 活动id
int64 activityId = 1;
// 场景
@@ -0,0 +1,30 @@
syntax = "proto3";
package bilibili.broadcast.message.editor;
import "google/protobuf/empty.proto";
//
service OperationNotify {
//
rpc OperationNotify(google.protobuf.Empty) returns (stream Notify);
}
message Notify {
//
int64 msg_id = 1;
//
int32 msg_type = 2;
// uid
int64 receiver_uid = 3;
//
int32 receiver_type = 4;
//
int64 story_version = 5;
// hash值
int64 op_hash = 6;
// uid
int64 op_sender = 7;
// patch内容
string op_content = 8;
}
@@ -0,0 +1,8 @@
syntax = "proto3";
package bilibili.broadcast.message.esports;
message Notify {
// cid
int64 cid = 1;
}
@@ -0,0 +1,18 @@
syntax = "proto3";
package bilibili.broadcast.message.fission;
import "google/protobuf/empty.proto";
//
service Fission {
//
rpc GameNotify(google.protobuf.Empty) returns (stream GameNotifyReply);
}
message GameNotifyReply {
//
uint32 type = 1;
//
string data = 2;
}
@@ -0,0 +1,99 @@
syntax = "proto3";
package bilibili.broadcast.message.im;
import "google/protobuf/empty.proto";
//
service Notify {
//
rpc WatchNotify(google.protobuf.Empty) returns (stream NotifyRsp);
}
//
enum PLType {
//
EN_PAYLOAD_NORMAL = 0;
//
EN_PAYLOAD_BASE64 = 1;
}
//
enum CmdId {
// cmd
EN_CMD_ID_INVALID = 0;
//
EN_CMD_ID_MSG_NOTIFY = 1;
//
EN_CMD_ID_KICK_OUT = 2;
}
//
message NotifyRsp {
//
uint64 uid=1;
// id
uint64 cmd=2;
//
bytes payload=3;
//
PLType payload_type=4;
}
//
message Msg {
// uid
uint64 sender_uid = 1;
//
int32 receiver_type = 2;
// id
uint64 receiver_id = 3;
// id
uint64 cli_msg_id = 4;
//
int32 msg_type = 5;
//
string content = 6;
//
uint64 msg_seqno = 7;
//
uint64 timestamp = 8;
// at用户列表
repeated uint64 at_uids = 9;
//
repeated uint64 recver_ids = 10;
//
uint64 msg_key = 11;
//
uint32 msg_status = 12;
//
bool sys_cancel = 13;
//
uint32 is_multi_chat = 14;
// session_seqno
uint64 withdraw_seqno = 15;
//
string notify_code =16;
//
uint32 msg_source = 17;
}
//
message NotifyInfo {
//
uint32 msg_type = 1;
//
uint64 talker_id = 2;
//
uint32 session_type =3;
}
//
message ReqServerNotify {
//
uint64 lastest_seqno = 1;
// sync msg时 sync到此类消息
Msg instant_msg = 2;
//
NotifyInfo notify_info = 3;
}
@@ -1,189 +0,0 @@
syntax = "proto3";
package bilibili.broadcast.message.main;
import "google/protobuf/empty.proto";
//
service NativePage {
//
//
rpc watchNotify (google.protobuf.Empty) returns (NativePageEvent);
}
//
service Resource {
//
//
rpc topActivity (google.protobuf.Empty) returns (TopActivityReply);
}
//
message NativePageEvent {
//
int64 pageID = 1;
//
repeated EventItem items = 2;
}
//
message TopActivityReply {
//
TopOnline online = 1;
//
string hash = 2;
}
//
message Animate {
//
string icon = 1;
//
string json = 2;
//
string svg = 3;
//
int32 loop = 4;
}
//
message CommandDm {
//
int64 id = 1;
//
int64 oid = 2;
//
int64 mid = 3;
//
int32 type = 4;
//
string command = 5;
//
string content = 6;
//
int32 state = 7;
//
int32 progress = 8;
//
string ctime = 9;
//
string mtime = 10;
//
string extra = 11;
//
string idStr = 12;
}
//
message DanmakuElem {
//
int64 id = 1;
//
int32 progress = 2;
//
int32 mode = 3;
//
int32 fontsize = 4;
//
uint32 color = 5;
//
string midHash = 6;
//
string content = 7;
//
int64 ctime = 8;
//
string action = 9;
//
int32 pool = 10;
//
string idStr = 11;
}
//
message DanmukuEvent {
//
DanmakuElem elems = 1;
}
//
message EventItem {
//
int64 itemID = 1;
//
string type = 2;
//
int64 num = 3;
//
string displayNum = 4;
//
string webKey = 5;
//
int64 dimension = 6;
}
//
message RedDot {
//
int32 type = 1;
//
int32 number = 2;
}
//
message TopOnline {
//
int32 type = 1;
//
string icon = 2;
//
string uri = 3;
//
string uniqueId = 4;
//
Animate animate = 5;
//
RedDot redDot = 6;
//
string name = 7;
//
int64 interval = 8;
}
@@ -0,0 +1,63 @@
syntax = "proto3";
package bilibili.broadcast.message.main;
//
message DanmukuEvent {
//
repeated DanmakuElem elems = 1;
}
//
message DanmakuElem {
// dmid
int64 id = 1;
// (ms)
int32 progress = 2;
//
int32 mode = 3;
//
int32 fontsize = 4;
//
uint32 color = 5;
// mid hash
string mid_hash = 6;
//
string content = 7;
//
int64 ctime = 8;
//
string action = 9;
//
int32 pool = 10;
// id str
string id_str = 11;
}
//
message CommandDm {
// id
int64 id = 1;
// cid
int64 oid = 2;
// mid
int64 mid = 3;
//
int32 type = 4;
//
string command = 5;
//
string content = 6;
//
int32 state = 7;
//
int32 progress = 8;
//
string ctime = 9;
//
string mtime = 10;
// json数据
string extra = 11;
// id str类型
string idStr = 12;
}
@@ -0,0 +1,36 @@
syntax = "proto3";
package bilibili.broadcast.message.main;
import "google/protobuf/empty.proto";
//
service NativePage {
//
rpc WatchNotify(google.protobuf.Empty) returns (stream NativePageEvent);
}
//
message NativePageEvent {
// Native页ID
int64 PageID = 1;
//
repeated EventItem Items = 2;
}
//
message EventItem {
//
int64 ItemID = 1;
//
string Type = 2;
//
int64 Num = 3;
//
string DisplayNum = 4;
// h5的组件标识
string WebKey = 5;
//
// 0: 1:
int64 dimension = 6;
}
@@ -0,0 +1,61 @@
syntax = "proto3";
package bilibili.broadcast.message.main;
import "google/protobuf/empty.proto";
//
service Resource {
//
rpc TopActivity(google.protobuf.Empty) returns (stream TopActivityReply);
}
//
message TopActivityReply {
//
TopOnline online = 1;
// online内容进行hash和上次结果一样则不重新加载
string hash = 2;
}
//
message TopOnline {
//
// 1: 2:
int32 type = 1;
//
string icon = 2;
//
string uri = 3;
// ()
string unique_id = 4;
//
Animate animate = 5;
//
RedDot red_dot = 6;
//
string name = 7;
//
int64 interval = 8;
}
//
message Animate {
// icon
string icon = 1;
// 7
string json = 2;
// s10活动svg动画
string svg = 3;
// (0 )
int32 loop = 4;
}
//
message RedDot {
//
// 1: 2:
int32 type = 1;
//
int32 number = 2;
}
@@ -0,0 +1,11 @@
syntax = "proto3";
package bilibili.broadcast.message.note;
//
message Sync {
// id
int64 note_id = 1;
//
string hash = 2;
}
@@ -0,0 +1,228 @@
syntax = "proto3";
package bilibili.broadcast.message.ogv;
//
enum PlayStatus {
//
Pause = 0;
//
Play = 1;
//
End = 2;
}
//
enum RoomType {
//
Private = 0;
//
Open = 1;
}
//
enum MessageDomain {
//
DefaultDomain = 0;
//
RoomMid = 1;
//
SystemInfo = 2;
}
//
enum MessageType {
//
DefaultType = 0;
//
ChatMessage = 1;
//
SystemMessage = 2;
}
//
enum TriggerType {
//
DefaultTrigger = 0;
//
Relation = 1;
}
//
message RoomMemberChangeEvent {
// id
int64 room_id = 1;
// id
int64 owner_id = 2;
//
repeated UserInfoProto members = 3;
//
MessageProto message = 4;
}
//
message ProgressSyncEvent {
// id
int64 room_id = 1;
// season_id
int64 season_id = 2;
// episode_id
int64 episode_id = 3;
//
PlayStatus status = 4;
//
int64 progress = 5;
//
MessageProto message = 6;
}
//
message RoomUpdateEvent {
// id
int64 room_id = 1;
//
RoomType type = 2;
//
MessageProto message = 3;
}
//
message RoomDestroyEvent {
// id
int64 room_id = 1;
//
MessageProto message = 4;
}
//
message RoomTriggerEvent {
//
int64 mid = 1;
//
MessageProto message = 2;
//
TriggerType trigger = 3;
}
//
message UserInfoProto {
// id
int64 mid = 1;
// url
string face = 2;
//
string nickname = 3;
//
int32 level = 4;
//
string sign = 5;
//
VipProto vip = 6;
//
OfficialProto official = 7;
//
PendantProto pendant = 8;
// buvid
string buvid = 9;
}
//
message MessageProto {
// ep "还没有其他小伙伴,[去邀请>]<https://big.bilibili.com/mobile/giftIndex?mid=123>"
string content = 1;
//
// 0:json格式的文本消息 1:()
int32 content_type = 2;
}
//
message VipProto {
int32 type = 1;
int32 status = 2;
int64 due_date = 3;
int32 vip_pay_type = 4;
int32 theme_type = 5;
//
// 0: 1: 2:绿
int32 avatar_subscript = 6;
// #FFFB9E60
string nickname_color = 7;
}
//
message OfficialProto {
int32 role = 1;
string title = 2;
string desc = 3;
int32 type = 4;
}
//
message PendantProto {
int32 pid = 1;
string name = 2;
string image = 3;
int64 expire = 4;
string image_enhance = 5;
}
//
message MessageEvent {
// id
int64 room_id = 1;
// id
int64 msg_id = 2;
//
int64 ts = 3;
// id
int64 oid = 4;
//
MessageDomain domain = 5;
//
MessageType type = 6;
//
MessageProto message = 7;
//
UserInfoProto user = 8;
// id str类型
string msg_id2 = 9;
}
//
message RemoveChatEvent {
// id
int64 room_id = 1;
// id
int64 msg_id = 2;
//
MessageProto message = 3;
}
// "一起看"
message FreyaEventBody {
// id
int64 room_id = 1;
//
repeated int64 white_mid = 2;
//
repeated int64 ignore_mid = 3;
//
oneof event {
//
RoomMemberChangeEvent member_change = 4;
//
ProgressSyncEvent progress = 5;
//
RoomUpdateEvent room_update = 6;
//
MessageEvent message = 7;
//
RemoveChatEvent remove_chat = 8;
//
RoomDestroyEvent room_destroy = 9;
//
RoomTriggerEvent room_trigger = 10;
}
//
int64 sequence_id = 100;
}
@@ -0,0 +1,44 @@
syntax = "proto3";
package bilibili.broadcast.message.ogv;
//
message LiveStartEvent {}
//
message LiveEndEvent {}
// 线
message LiveOnlineEvent {
//线
int64 online = 1;
}
//
message LiveUpdateEvent {
//
// 1:线 2:
int32 after_premiere_type = 1;
// ms
int64 start_time = 2;
// id
string id = 3;
//
// progress - delay_time
int64 progress = 4;
}
//
message CMDBody {
//
oneof event {
//
LiveStartEvent start = 1;
//
LiveEndEvent emergency = 2;
// 线
LiveOnlineEvent online = 3;
//
LiveUpdateEvent update = 4;
}
}
@@ -0,0 +1,21 @@
syntax = "proto3";
package bilibili.broadcast.message.ticket;
//
enum RoomStatus {
// :
Pause = 0;
// :
Play = 1;
// :
End = 2;
}
//
message RoomEvent {
// RoomStatus
RoomStatus room_status = 1;
//
string room_message = 2;
}
@@ -0,0 +1,77 @@
syntax = "proto3";
package bilibili.broadcast.message.tv;
import "google/protobuf/empty.proto";
//
service Tv {
//
rpc Proj(google.protobuf.Empty) returns (stream ProjReply);
//
rpc LiveStatus(google.protobuf.Empty) returns (stream LiveStatusNotify);
//
rpc Esports(google.protobuf.Empty) returns (stream EsportsNotify);
//
rpc Publicity(google.protobuf.Empty) returns (stream PublicityNotify);
//
rpc LiveSkip(google.protobuf.Empty) returns (stream LiveSkipNotify);
}
//
message ProjReply {
//
// 1: 2: 3:退 4:seek播放进度 5: 6:
int64 cmd_type = 1;
// id
int64 mid = 2;
// 稿id
int64 aid = 3;
// id
int64 cid = 4;
//
// 0:ugc 1:pgc 2:pugv
int64 video_type = 5;
// idpgc和pugv需要传
int64 ep_id = 6;
// id
int64 season_id = 7;
// seek cmd位seek时有值
int64 seek_ts = 8;
//
string extra = 9;
}
//
message LiveStatusNotify {
//
// 1: 2: 3: 4:
int64 status = 1;
//
string msg = 2;
//
int64 cid = 3;
}
//
message EsportsNotify {
//
int64 cid = 1;
}
//
message PublicityNotify {
// id
int64 publicity_id = 1;
//
int64 room_id = 2;
//
// 0: 1: 2:
int64 status = 3;
}
//
message LiveSkipNotify {
// id
int64 live_id = 1;
}
@@ -0,0 +1,96 @@
syntax = "proto3";
package bilibili.broadcast.v1;
import "bilibili/rpc/status.proto";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
// broadcast操作target_path
service Broadcast {
//
rpc Auth(AuthReq) returns (AuthResp);
// 44530s545
rpc Heartbeat(HeartbeatReq) returns (HeartbeatResp);
// target_path
rpc Subscribe(TargetPath) returns (google.protobuf.Empty);
// target_path
rpc Unsubscribe(TargetPath) returns (google.protobuf.Empty);
//
rpc MessageAck(MessageAckReq) returns (google.protobuf.Empty);
}
// broadcast连接隧道
service BroadcastTunnel {
// stream连接隧道
rpc CreateTunnel(stream BroadcastFrame) returns (stream BroadcastFrame);
}
// authorization验证绑定用户mid
message AuthReq {
// iduuid
string guid = 1;
// iduuid
string conn_id = 2;
// id
int64 last_msg_id = 3;
}
//
message AuthResp {}
//
message HeartbeatReq{}
//
message HeartbeatResp{}
// target_path
message TargetPath {
// target_paths
repeated string target_paths = 1;
}
//
message MessageAckReq {
// id
int64 ack_id = 1;
// ack来源
string ack_origin = 2;
// target_path便
string target_path = 3;
}
// message_id:
// client: id
// server: id
// sequence:
// client: frame seq++req/resp
// server: 0
message FrameOption {
// id
int64 message_id = 1;
// frame序号
int64 sequence = 2;
// (MessageAckReq)
// downstream true
// upstream true
// is_ack
// is_ack, ()
bool is_ack = 3;
//
bilibili.rpc.Status status = 4;
// ack来源, downstream时候由服务端填写.
string ack_origin = 5;
}
// target_path:
// "/" Service-Name "/" {method name} gRPC Request Path
message BroadcastFrame {
//
FrameOption options = 1;
// target_path
string target_path = 2;
// pb内容
google.protobuf.Any body = 3;
}
@@ -0,0 +1,19 @@
syntax = "proto3";
package bilibili.broadcast.v1;
import "google/protobuf/empty.proto";
// Laser
service Laser {
//
rpc WatchLogUploadEvent(google.protobuf.Empty) returns (stream LaserLogUploadResp);
}
//
message LaserLogUploadResp {
// id
int64 taskid = 1;
//
string date = 2;
}
+13
View File
@@ -0,0 +1,13 @@
syntax = "proto3";
package bilibili.broadcast.v1;
import "google/protobuf/empty.proto";
message ModResourceResp {}
// ModManager
service ModManager {
//
rpc WatchResource(google.protobuf.Empty) returns (stream ModResourceResp);
}
+126
View File
@@ -0,0 +1,126 @@
syntax = "proto3";
package bilibili.broadcast.v1;
import "google/protobuf/empty.proto";
// Push
service Push {
rpc WatchMessage(google.protobuf.Empty) returns (stream PushMessageResp);
}
//
message PushMessageResp {
//
enum Biz {
//
BIZ_UNKNOWN = 0;
//
BIZ_VIDEO = 1;
//
BIZ_LIVE = 2;
//
BIZ_ACTIVITY = 3;
}
//
enum Type {
//
TYPE_UNKNOWN = 0;
//
TYPE_DEFAULT = 1;
//
TYPE_HOT = 2;
//
TYPE_REALTIME = 3;
//
TYPE_RECOMMEND = 4;
}
//
enum Position {
//
POS_UNKNOWN = 0;
//
POS_TOP = 1;
}
// Deprecated: id使string
int64 old_taskid = 1;
//
// 1: 2: 3:
Biz biz = 2;
//
// 1: 2: 3: 4:
Type type = 3;
//
string title = 4;
//
string summary = 5;
//
string img = 6;
//
string link = 7;
// 1
Position position = 8;
// 3
int32 duration = 9;
//
int64 expire = 10;
// id
string taskid = 11;
//
// UGC: ugc-video-detail
// PGC: pgc-video-detail
// : pgc-video-detail-theater
// : live-room-detail
// Story: ugc-video-detail-vertical
// playlist-video-detail
repeated PageBlackList page_blackList = 12;
// pvid
repeated PageView page_view = 13;
//
TargetResource target_resource = 14;
}
//
message PageBlackList {
//
string id = 1;
}
//
message PageView {
//
string id = 1;
}
//
enum LinkType {
//
LINK_TYPE_UNKNOWN = 0;
//
LINK_TYPE_BANGUMI = 1;
//
LINK_TYPE_VIDEO = 2;
//
LINK_TYPE_LIVE = 3;
}
//
message TargetResource {
//: roomid
//UGC: avid
//PGC: seasonid
//Story: avid
//
//Type: LINK_TYPE_BANGUMI ()
//Resource: {"seasonid":"123"}
//
//Type: LINK_TYPE_VIDEO ()
//Resource: {"avid":"123"}
//
//Type: LINK_TYPE_LIVE ()
//Resource: {"roomid":"123"}
//
LinkType Type = 1;
//
map<string,string> Resource = 2;
}
+72
View File
@@ -0,0 +1,72 @@
syntax = "proto3";
package bilibili.broadcast.v1;
import "bilibili/rpc/status.proto";
import "google/protobuf/any.proto";
//
service BroadcastRoom {
//
rpc Enter(stream RoomReq) returns (stream RoomResp);
}
//
message RoomJoinEvent {}
//
message RoomLeaveEvent {}
//
message RoomOnlineEvent {
//
int32 online = 1;
}
//
message RoomMessageEvent {
//
string target_path = 1;
//
google.protobuf.Any body = 2;
}
//
message RoomErrorEvent {
//
bilibili.rpc.Status status = 1;
}
//
message RoomReq {
// {type}://{room_id}
string id = 1;
oneof event {
//
RoomJoinEvent join = 2;
//
RoomLeaveEvent leave = 3;
//
RoomOnlineEvent online = 4;
//
RoomMessageEvent msg = 5;
}
}
//
message RoomResp {
// {type}://{room_id}
string id = 1;
oneof event {
//
RoomJoinEvent join = 2;
//
RoomLeaveEvent leave = 3;
//
RoomOnlineEvent online = 4;
//
RoomMessageEvent msg = 5;
//
RoomErrorEvent err = 6;
}
}
+26
View File
@@ -0,0 +1,26 @@
syntax = "proto3";
package bilibili.broadcast.v1;
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
// debug/release包都会通过弹窗响应该消息
//
// Test
service Test {
//
rpc WatchTestEvent(google.protobuf.Empty) returns (stream TestResp);
}
message TestResp {
// id
int64 taskid = 1 [json_name="taskid"];
//
int64 timestamp = 2 [json_name="timestamp"];
//
string message = 3 [json_name="message"];
//
google.protobuf.Any extra = 4;
}
@@ -0,0 +1,21 @@
syntax = "proto3";
package bilibili.broadcast.v2;
import "google/protobuf/empty.proto";
// Laser
service Laser {
// Laser事件
rpc WatchEvent(google.protobuf.Empty) returns (stream LaserEventResp);
}
// Laser事件
message LaserEventResp {
// id
int64 taskid = 1;
//
string action = 2;
// json字符串
string params = 3;
}
@@ -1,163 +0,0 @@
syntax = "proto3";
package bilibili.cheese.gateway.player.v1;
import "bilibili/app/playurl/v1.proto";
service PlayURL {
//url接口
//https://app.bilibili.com/bilibili.cheese.gateway.player.v1.PlayURL/PlayView
rpc PlayView (playViewReq) returns (PlayViewReply);
}
//url-
message playViewReq {
//epid
int64 epid = 1;
//cid
int64 cid = 2;
//
int64 qn = 3;
//
int32 fnver = 4;
//
int32 fnval = 5;
//
//0: 1:flv下载 2:dash下载
uint32 download = 6;
//url强制是用域名
//0:使ip 1:使http 2:使https
int32 forceHost = 7;
//4K
bool fourk = 8;
//
string spmid = 9;
//
string fromSpmid = 10;
//
int32 teenagersMode = 11;
//
CodeType codetype = 12;
//
bool isPreview = 13;
}
//url-
message PlayViewReply {
//
bilibili.app.playurl.v1.VideoInfo info = 1;
//
PlayAbilityConf PlayConf = 2;
}
//
enum CodeType {
//
NOCODE = 0;
//H.264
CODE264 = 1;
//H.265
CODE265 = 2;
}
//
message PlayAbilityConf {
//
bool backgroundPlayDisable=1;
//
bool flipDisable=2;
//
bool castDisable=3;
//
bool feedbackDisable=4;
//
bool subtitleDisable=5;
//
bool playbackRateDisable=6;
//
bool timeUpDisable=7;
//
bool playbackModeDisable=8;
//
bool scaleModeDisable=9;
//
bool likeDisable=10;
//
bool dislikeDisable=11;
//
bool coinDisable=12;
//
bool elecDisable=13;
//
bool shareDisable=14;
//
bool screenShotDisable=15;
//
bool lockScreenDisable=16;
//
bool recommendDisable=17;
//
bool playbackSpeedDisable=18;
//
bool definitionDisable=19;
//
bool selectionsDisable=20;
//
bool nextDisable=21;
//
bool editDmDisable=22;
//
bool smallWindowDisable=23;
//
bool shakeDisable=24;
//
bool outerDmDisable=25;
//
bool innerDmDisable=26;
//
bool freyaEnterDisable=27;
//
bool dolbyDisable=28;
}
@@ -0,0 +1,146 @@
syntax = "proto3";
package bilibili.cheese.gateway.player.v1;
import "bilibili/app/playurl/v1/playurl.proto";
// url
service PlayURL {
//
rpc PlayView (PlayViewReq) returns (PlayViewReply);
//
rpc Project (ProjectReq) returns (ProjectReply);
}
// -
message PlayViewReq {
// epid()
int64 ep_id = 1;
// cid
int64 cid = 2;
//
int64 qn = 3;
//
int32 fnver = 4;
//
int32 fnval = 5;
//
// 0: 1:flv下载 2:dash下载
uint32 download = 6;
// url强制是用域名
// 0:使ip 1:使http 2:使https
int32 force_host = 7;
// 4K
bool fourk = 8;
// spm
string spmid = 9;
// spm
string from_spmid = 10;
//
int32 teenagers_mode = 11;
//
bilibili.app.playurl.v1.CodeType prefer_codec_type = 12;
//
bool is_preview = 13;
}
// -
message ProjectReq {
// epid()
int64 ep_id = 1;
// cid
int64 cid = 2;
//
int64 qn = 3;
//
int32 fnver = 4;
//
int32 fnval = 5;
//
// 0: 1:flv下载 2:dash下载
uint32 download = 6;
// url强制是用域名
// 0:使ip 1:使http 2:使https
int32 force_host = 7;
// 4K
bool fourk = 8;
// spm
string spmid = 9;
// spm
string from_spmid = 10;
//
// 0: 1: 2:
int32 protocol = 11;
//
// 0: 1:OTT设备
int32 device_type = 12;
// flv格式
bool flv_proj = 13;
}
// -
message PlayViewReply {
// url信息
bilibili.app.playurl.v1.VideoInfo video_info = 1;
//
PlayAbilityConf play_conf = 2;
}
//
message PlayAbilityConf {
//
bool background_play_disable = 1;
//
bool flip_disable = 2;
//
bool cast_disable = 3;
//
bool feedback_disable = 4;
//
bool subtitle_disable = 5;
//
bool playback_rate_disable = 6;
//
bool time_up_disable = 7;
//
bool playback_mode_disable = 8;
//
bool scale_mode_disable = 9;
//
bool like_disable = 10;
//
bool dislike_disable = 11;
//
bool coin_disable = 12;
//
bool elec_disable = 13;
//
bool share_disable = 14;
//
bool screen_shot_disable = 15;
//
bool lock_screen_disable = 16;
//
bool recommend_disable = 17;
//
bool playback_speed_disable = 18;
//
bool definition_disable = 19;
//
bool selections_disable = 20;
//
bool next_disable = 21;
//
bool edit_dm_disable = 22;
//
bool outer_dm_disable = 25;
//
bool inner_dm_disable = 26;
//
bool small_window_disable = 27;
}
// -
message ProjectReply {
bilibili.app.playurl.v1.PlayURLReply project = 1;
}
@@ -1,546 +0,0 @@
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;
}
@@ -0,0 +1,531 @@
syntax = "proto3";
package bilibili.community.service.dm.v1;
//
service DM {
//
rpc DmSegMobile (DmSegMobileReq) returns (DmSegMobileReply);
//
rpc DmView (DmViewReq) returns (DmViewReply);
//
rpc DmPlayerConfig (DmPlayerConfigReq) returns (Response);
// ott弹幕列表
rpc DmSegOtt(DmSegOttReq) returns(DmSegOttReply);
// SDK弹幕列表
rpc DmSegSDK(DmSegSDKReq) returns(DmSegSDKReply);
}
// SDK-
message DmSegSDKReq {
// 稿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 segmentIndex = 4;
//
int32 teenagersMode = 5;
}
// -
message DmSegMobileReply{
//
repeated DanmakuElem elems = 1;
//
// 0: 1:
int32 state = 2;
// ai评分值
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(bfs)
repeated string specialDms = 4;
//
DanmakuFlagConfig aiFlag = 5;
//
DanmuPlayerViewConfig playerConfig = 6;
//
int32 sendBoxStyle = 7;
//
bool allow = 8;
// check box
string checkBox = 9;
// check box
string checkBoxShowMsg = 10;
//
string textPlaceholder = 11;
//
string inputPlaceholder = 12;
// cid维度屏蔽的正则规则
repeated string report_filter_content = 13;
}
// 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;
}
//
message CommandDm {
// id
int64 id = 1;
// cid
int64 oid = 2;
// mid
string mid = 3;
//
string command = 4;
//
string content = 5;
//
int32 progress = 6;
//
string ctime = 7;
//
string mtime = 8;
// json数据
string extra = 9;
// id str类型
string idStr = 10;
}
//
message DmSegConfig {
//
int64 page_size = 1;
//
int64 total = 2;
}
//
message VideoMask {
// cid
int64 cid = 1;
//
// 0:web端 1:
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;
}
// 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 idStr = 2;
//
string lan = 3;
//
string lanDoc = 4;
// url
string subtitleUrl = 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;
}
//
message DanmakuElem {
// dmid
int64 id = 1;
// (ms)
int32 progress = 2;
//
int32 mode = 3;
//
int32 fontsize = 4;
//
uint32 color = 5;
// mid hash
string midHash = 6;
//
string content = 7;
//
int64 ctime = 8;
// :[1,10]
int32 weight = 9;
//
string action = 10;
//
int32 pool = 11;
// dmid str
string idStr = 12;
// (bin求AND)
// bit0: bit1: bit2:
int32 attr = 13;
}
//
enum DMAttrBit {
//
DMAttrBitProtect = 0;
//
DMAttrBitFromLive = 1;
//
DMAttrHighLike = 2;
}
// -
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;
}
// ai云屏蔽条目
message DanmakuFlag {
// dmid
int64 dmid = 1;
//
uint32 flag = 2;
}
//
message DanmakuFlagConfig {
//
int32 rec_flag = 1;
//
string rec_text = 2;
//
int32 rec_switch = 3;
}
// ai云屏蔽列表
message DanmakuAIFlag {
// ai云屏蔽条目
repeated DanmakuFlag dm_flags = 1;
}
//
message DanmuPlayerViewConfig {
//
DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1;
//
DanmuPlayerConfig danmukuPlayerConfig = 2;
//
repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3;
}
//
message DanmuDefaultPlayerConfig {
// 使
bool player_danmaku_use_default_config = 1;
//
bool player_danmaku_ai_recommended_switch = 4;
//
int32 player_danmaku_ai_recommended_level = 5;
//
bool player_danmaku_blocktop = 6;
//
bool player_danmaku_blockscroll = 7;
//
bool player_danmaku_blockbottom = 8;
//
bool player_danmaku_blockcolorful = 9;
//
bool player_danmaku_blockrepeat = 10;
//
bool player_danmaku_blockspecial = 11;
//
float player_danmaku_opacity = 12;
//
float player_danmaku_scalingfactor = 13;
//
float player_danmaku_domain = 14;
//
int32 player_danmaku_speed = 15;
//
bool inline_player_danmaku_switch = 16;
}
//
message DanmuPlayerConfig {
//
bool player_danmaku_switch = 1;
//
bool player_danmaku_switch_save = 2;
// 使
bool player_danmaku_use_default_config = 3;
//
bool player_danmaku_ai_recommended_switch = 4;
//
int32 player_danmaku_ai_recommended_level = 5;
//
bool player_danmaku_blocktop = 6;
//
bool player_danmaku_blockscroll = 7;
//
bool player_danmaku_blockbottom = 8;
//
bool player_danmaku_blockcolorful = 9;
//
bool player_danmaku_blockrepeat = 10;
//
bool player_danmaku_blockspecial = 11;
//
float player_danmaku_opacity = 12;
//
float player_danmaku_scalingfactor = 13;
//
float player_danmaku_domain = 14;
//
int32 player_danmaku_speed = 15;
//
bool player_danmaku_enableblocklist = 16;
//
bool inline_player_danmaku_switch = 17;
//
int32 inline_player_danmaku_config = 18;
}
//
message DanmuPlayerDynamicConfig {
//
int32 progress = 1;
//
float playerDanmakuDomain = 2;
}
//
message PlayerDanmakuSwitch {bool value = 1;}
//
message PlayerDanmakuSwitchSave {bool value = 1;}
// 使
message PlayerDanmakuUseDefaultConfig {bool value = 1;}
//
message PlayerDanmakuAiRecommendedSwitch {bool value = 1;}
//
message PlayerDanmakuAiRecommendedLevel {bool value = 1;}
//
message PlayerDanmakuBlocktop {bool value = 1;}
//
message PlayerDanmakuBlockscroll {bool value = 1;}
//
message PlayerDanmakuBlockbottom {bool value = 1;}
//
message PlayerDanmakuBlockcolorful {bool value = 1;}
//
message PlayerDanmakuBlockrepeat {bool value = 1;}
//
message PlayerDanmakuBlockspecial {bool value = 1;}
//
message PlayerDanmakuOpacity {float value = 1;}
//
message PlayerDanmakuScalingfactor {float value = 1;}
//
message PlayerDanmakuDomain {float value = 1;}
//
message PlayerDanmakuSpeed {int32 value = 1;}
//
message PlayerDanmakuEnableblocklist {bool value = 1;}
//
message InlinePlayerDanmakuSwitch {bool value = 1;}