bilibili-API-collect/grpc_api/bilibili/community/service/dm/v1.proto

546 lines
8.4 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package bilibili.community.service.dm.v1;
2021-02-05 18:32:00 +08:00
//弹幕
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;
}
2021-02-05 18:32:00 +08:00
//
message DanmuDefaultPlayerConfig{
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuUseDefaultConfig = 1;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuAiRecommendedSwitch = 4;
2021-02-05 18:32:00 +08:00
//
int32 playerDanmakuAiRecommendedLevel = 5;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlocktop = 6;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockscroll = 7;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockbottom = 8;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockcolorful = 9;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockrepeat = 10;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockspecial = 11;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuOpacity = 12;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuScalingfactor = 13;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuDomain = 14;
2021-02-05 18:32:00 +08:00
//
int32 playerDanmakuSpeed = 15;
2021-02-05 18:32:00 +08:00
//
bool inlinePlayerDanmakuSwitch = 16;
}
2021-02-05 18:32:00 +08:00
//
message DanmuPlayerConfig{
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuSwitch = 1;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuSwitchSave = 2;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuUseDefaultConfig = 3;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuAiRecommendedSwitch = 4;
2021-02-05 18:32:00 +08:00
//
int32 playerDanmakuAiRecommendedLevel = 5;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlocktop = 6;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockscroll = 7;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockbottom = 8;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockcolorful = 9;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockrepeat = 10;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuBlockspecial = 11;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuOpacity = 12;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuScalingfactor = 13;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuDomain = 14;
2021-02-05 18:32:00 +08:00
//
int32 playerDanmakuSpeed = 15;
2021-02-05 18:32:00 +08:00
//
bool playerDanmakuEnableblocklist = 16;
2021-02-05 18:32:00 +08:00
//
bool inlinePlayerDanmakuSwitch = 17;
2021-02-05 18:32:00 +08:00
//
int32 inlinePlayerDanmakuConfig = 18;
}
2021-02-05 18:32:00 +08:00
//
message DanmuPlayerDynamicConfig{
2021-02-05 18:32:00 +08:00
//
int32 progress = 1;
2021-02-05 18:32:00 +08:00
//
float playerDanmakuDomain = 2;
}
2021-02-05 18:32:00 +08:00
//
message DanmuPlayerViewConfig{
2021-02-05 18:32:00 +08:00
//
DanmuDefaultPlayerConfig danmukuDefaultPlayerConfig = 1;
2021-02-05 18:32:00 +08:00
//
DanmuPlayerConfig danmukuPlayerConfig = 2;
2021-02-05 18:32:00 +08:00
//
repeated DanmuPlayerDynamicConfig danmukuPlayerDynamicConfig = 3;
}
2021-02-05 18:32:00 +08:00
//
message InlinePlayerDanmakuSwitch{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuAiRecommendedLevel{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuAiRecommendedSwitch{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuBlockbottom{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuBlockcolorful{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuBlockrepeat{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuBlockscroll{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuBlockspecial{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuBlocktop{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuDomain{
2021-02-05 18:32:00 +08:00
//
float value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuEnableblocklist{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuOpacity{
2021-02-05 18:32:00 +08:00
//
float value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuScalingfactor{
2021-02-05 18:32:00 +08:00
//
float value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuSpeed{
2021-02-05 18:32:00 +08:00
//
int32 value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuSwitch{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuSwitchSave{
2021-02-05 18:32:00 +08:00
//
bool value = 1;
}
2021-02-05 18:32:00 +08:00
//
message PlayerDanmakuUseDefaultConfig{
2021-02-05 18:32:00 +08:00
//
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;
}