修改【readme】 添加【安卓端登录】appsec 添加大量【proto结构文件】

This commit is contained in:
SocialSisterYi
2021-02-03 00:02:04 +08:00
parent adfb20f144
commit 07d0396bbc
33 changed files with 7848 additions and 1578 deletions

View File

@@ -0,0 +1,62 @@
syntax = "proto3";
package bilibili.account.fission.v1;
//Fission裂变
service Fission {
//活动入口
//
rpc entrance (EntranceReq) returns (EntranceReply);
//首页弹窗
//
rpc window (WindowReq) returns (WindowReply);
}
//活动入口-请求
message EntranceReq {
}
//活动入口-回复
message EntranceReply {
//展示图标
string icon = 1;
//活动名称
string name = 2;
//活动跳转链接
string url = 3;
//动画效果
AnimateIcon animateIcon = 4;
}
//首页弹窗-请求
message WindowReq {
}
//首页弹窗-回复
message WindowReply {
//弹窗类型
//0:弹窗
//1:普通页面
int32 type = 1;
//跳转链接
string url = 2;
//
string reportData = 3;
}
//
message AnimateIcon {
//icon文件
string icon = 1;
//动效json文件
string json = 2;
}

View File

@@ -0,0 +1,632 @@
syntax = "proto3";
package bilibili.ad.v1;
import "google/protobuf/wrappers.proto";
//
message AdAutoPlayVideoDto {
//avid
int64 avid = 1;
//cid
int64 cid = 2;
//分P
int64 page = 3;
//
string from = 4;
//是否自动播放
string url = 5;
//是否自动播放
string cover = 6;
//是否自动播放
bool autoPlay = 7;
//按钮是否动态变色
bool btnDycColor = 8;
//按钮动态变色时间 ms
int32 btnDycTime = 9;
//用于做联播是否是同一个视频的id
int64 bizId = 10;
//开始播放三方监控
repeated string process0Urls = 11;
//播放3S三方监控
repeated string play3SUrls = 12;
//播放5S三方监控
repeated string play5SUrls = 13;
//横竖屏
int32 orientation = 14;
}
//
message AdBusinessMarkDto {
//商业标样式
//0:不展示标
//1:实心+文字
//2:空心框+文字
//3:纯文字标
//4:纯图片标
int32 type = 1;
//商业标文案
string text = 2;
//商业标文案颜色,如#80FFFFFF RGBA
string textColor = 3;
//夜间模式文字色
string textColorNight = 4;
//背景色
string bgColor = 5;
//夜间模式背景色
string bgColorNight = 6;
//边框色
string borderColor = 7;
//夜间模式边框色
string borderColorNight = 8;
//图片商业标
string imgUrl = 9;
//图片高度
int32 imgHeight = 10;
//图片宽度
int32 imgWidth = 11;
//
string bgBorderColor = 12;
}
//
message AdButtonDto {
//类型
//1:落地页
//2:应用唤起
//3:应用下载
int32 type = 1;
//按钮文案
string text = 2;
//按钮跳转地址
string jumpUrl = 3;
//跳转监测链接
string reportUrls = 4;
//唤起schema
string dlsucCallupUrl = 5;
}
//
message AdCardDto {
//卡片类型
int32 cardType = 1;
//标题
string title = 2;
//描述
string desc = 3;
//额外描述
string extraDesc = 4;
//长描述
string longDesc = 5;
//短标题, 弹幕广告目录面板标题
string shortTitle = 6;
//弹幕/浮层广告的弹幕标题
string danmuTitle = 7;
//弹幕/浮层广告的弹幕高度整型分母为100
int32 danmuHeight = 8;
//弹幕/浮层广告的弹幕宽度整型分母为100
int32 danmuWidth = 9;
//弹幕/浮层广告生存时间,单位为毫秒
int32 danmuLife = 10;
//弹幕/浮层开始时间,单位为毫秒
int32 danmuBegin = 11;
//背景色值(含透明度)如#80FFFFFF
string danmuColor = 12;
//弹幕/浮层广告H5落地页
string danmuH5Url = 13;
//弹幕/浮层 广告icon
string danmuIcon = 14;
//折叠时间,永驻浮层折叠时间,单位为毫秒
int32 foldTime = 15;
//广告标文案
string adTag = 16;
//cover数组
repeated AdCoverDto covers = 17;
//卡片跳转链接
string jumpUrl = 18;
//
string imaxLandingPageJsonString = 19;
//app唤起schema
string callupUrl = 20;
//univeral link域名
string universalApp = 21;
//原价, 单位为分
string oriPrice = 22;
//现价, 同上
int32 curPrice = 23;
//券后/现价 价格描述
string priceDesc = 24;
//价格单位符号
string priceSymbol = 25;
//券后价格 "1000"
string goodsCurPrice = 26;
//原价 "¥1002"
string goodsOriPrice = 27;
//开放平台商品
AdGoodDto good = 28;
//打分? 满分为100
int32 rank = 29;
//热度
int32 hotScore = 30;
//按钮
AdButtonDto button = 31;
//广告主logo
string adverLogo = 32;
//广告主name
string adverName = 33;
//广告主主页链接
string adverPageUrl = 34;
//视频弹幕,视频广告用
repeated string videoBarrage = 35;
//商业标信息
AdBusinessMarkDto adTagStyle = 36;
//自动播放视频
AdAutoPlayVideoDto video = 37;
//反馈面板功能模块,屏蔽、投诉、广告介绍
AdFeedbackPanelDto feedbackPanel = 38;
//
int64 adverMid = 39;
//
int64 adverAccountId = 40;
//
string duration = 41;
//
repeated QualityInfo qualityInfos = 42;
//
string dynamicText = 43;
//
AdverDto adver = 44;
}
//
message AdContentExtraDto {
//动态布局
string layout = 1;
//展现监控url
repeated string showUrls = 2;
//点击监控url
repeated string clickUrls = 3;
//弹幕创意列表展示第三方上报
repeated string danmuListShowUrls = 4;
//弹幕创意列表点击第三方上报
repeated string danmuListClickUrls = 5;
//弹幕详情页展示第三方上报
repeated string danmuDetailShowUrls = 6;
//弹幕商品添加购物车第三方上报
repeated string danmuTrolleyAddUrls = 7;
//useWebView默认false
bool useAdWebV2 = 8;
//app唤起白名单
repeated string openWhitelist = 9;
//app下载白名单
AppPackageDto downloadWhitelist = 10;
//卡片相关信息
AdCardDto card = 11;
//视频播放和弹幕播放上报控制时间 ms
int32 reportTime = 12;
//是否优先唤起app store
int32 appstorePriority = 13;
//广告售卖类型
int32 salesType = 14;
//落地页是否预加载
int32 preloadLandingpage = 15;
//是否需要展示风险行业提示
bool specialIndustry = 16;
//风险行业提示
string specialIndustryTips = 17;
//是否展示下载弹框
bool enableDownloadDialog = 18;
//是否允许分享
bool enableShare = 19;
//个人空间广告入口类型
//1:橱窗
//2:商品店铺
//3:小程序
int32 upzoneEntranceType = 20;
//个人空间广告入口上报id,橱窗id(当前用Mid)、店铺id或者小程序id
int32 upzoneEntranceReportId = 21;
//分享数据
AdShareInfoDto shareInfo = 22;
//topview图片链接闪屏预下载用
string topviewPicUrl = 23;
//topview视频链接闪屏预下载用
string topviewVideoUrl = 24;
//点击区域
//0:表示banner可点击
//1:表示素材可点击
int32 clickArea = 25;
//
int64 shopId = 26;
//
int64 upMid = 27;
//
string trackId = 28;
//
int32 enableStoreDirectLaunch = 29;
}
//
message AdCoverDto {
//图片链接
string url = 1;
//动图循环次数
//0:无限循环
int32 loop = 2;
//图片点击跳转地址,截至目前为空
string jumpUrl = 3;
//跳转监测链接, 数组单个图片的监控出区别于click_urls应前端要求。此字段截至目前为空使用时需再次确认
repeated string reportUrls = 4;
//图片高度
int32 imageHeight = 5;
//图片宽度
int32 imageWidth = 6;
}
//
message AdDto {
//广告创意ID
int64 creativeId = 1;
//广告闭环上报回传数据
string adCb = 2;
//额外广告数据
AdContentExtraDto extra = 3;
//广告标记
int32 cmMark = 4;
//
int64 topViewId = 5;
//
int32 creativeType = 6;
//
int32 cardType = 7;
//
int32 creativeStyle = 8;
//
int32 isAd = 9;
//
CreativeDto creativeContent = 10;
}
//
message AdFeedbackPanelDto {
//面板类型,广告、推广
string panelTypeText = 1;
//反馈面版信息
repeated AdFeedbackPanelModuleDto feedbackPanelDetail = 2;
}
//
message AdFeedbackPanelModuleDto {
//模块id
int32 moduleId = 1;
//icon url
string iconUrl = 2;
//跳转类型
//1:气泡
//2:H5
int32 jumpType = 3;
//跳转地址
string jumpUrl = 4;
//文案
string text = 5;
//二级文案数组
AdSecondFeedbackPanelDto secondaryPanel = 6;
}
//
message AdGoodDto {
//电商商品ID
int64 itemId = 1;
//电商SKU ID
int64 skuId = 2;
//店铺ID
int64 shopId = 3;
//SKU库存
int64 skuNum = 4;
}
//
message AdOgvEpDto {
//分集epid
int64 epid = 1;
//是否显示 "荐"
bool hasRecommend = 2;
}
//
message AdSecondFeedbackPanelDto {
//屏蔽理由id
int32 reasonId = 1;
//理由文案
string text = 2;
}
//
message AdShareInfoDto {
//分享标题
string title = 1;
//分享副标题
string subtitle = 2;
//分享图片url
string imageUrl = 3;
}
//
message AdsControlDto {
//视频是否有弹幕,如有,需请求弹幕广告
int32 hasDanmu = 1;
//有弹幕的分P视频的cid
repeated int64 cids = 2;
//有弹幕的ogv ep
repeated AdOgvEpDto eps = 3;
}
//
message AdverDto {
//
int64 adverId = 1;
//
string adverLogo = 2;
//
string adverName = 3;
//
int32 adverType = 4;
//
string adverPageUrl = 5;
//
string adverDesc = 6;
}
//
message AppPackageDto {
//包大小, 单位bytes
int64 size = 1;
//
string displayName = 2;
//
string apkName = 3;
//url
string url = 4;
//bili schema url
string biliUrl = 5;
//包md5
string md5 = 6;
//包icon
string icon = 7;
//
string devName = 8;
//
string authUrl = 9;
//
string authName = 10;
//
string version = 11;
//
string updateTime = 12;
}
//
message CreativeDto {
//
string title = 1;
//
string description = 2;
//
string imageUrl = 3;
//
string imageMd5 = 4;
//
string url = 5;
//
string clickUrl = 6;
//
string showUrl = 7;
//
int64 videoId = 8;
//
string thumbnailUrl = 9;
//
string thumbnailUrlMd5 = 10;
//
string logoUrl = 11;
//
string logoMd5 = 12;
//
string username = 13;
}
//
message QualityInfo {
//
string icon = 1;
//
string text = 2;
}
//
message SourceContentDto {
//广告请求ID
string requestId = 1;
//广告资源位source ID
int32 sourceId = 2;
//广告资源位resource ID
int32 resourceId = 3;
//广告位上报标记,对广告返回数据恒为true
bool isAdLoc = 4;
//0:内容
//1:广告
//与天马现有逻辑一致, 0有含义
google.protobuf.Int32Value serverType = 5;
//客户端IP回传拼接
string clientIp = 6;
//广告卡片位置在一刷中的位置, 天马用, 0有含义
google.protobuf.Int32Value cardIndex = 7;
//广告资源位source 位次
int32 index = 8;
//广告内容
AdDto adContent = 9;
}

View File

@@ -0,0 +1,103 @@
syntax = "proto3";
package bilibili.api.player.v1;
//
service Heartbeat {
//
//
rpc mobile (HeartbeatReq) returns (HeartbeatReply);
}
//-请求
message HeartbeatReq {
//
int64 serverTime = 1;
//
string session = 2;
//
int64 mid = 3;
//
int64 aid = 4;
//
int64 cid = 5;
//
string sid = 6;
//
int64 epid = 7;
//
string type = 8;
//
int32 subType = 9;
//
int32 quality = 10;
//
int64 totalTime = 11;
//
int64 pausedTime = 12;
//
int64 playedTime = 13;
//
int64 videoDuration = 14;
//
string playType = 15;
//
int64 networkType = 16;
//
int64 lastPlayProgressTime = 17;
//
int64 maxPlayProgressTime = 18;
//
int32 from = 19;
//
string fromSpmid = 20;
//
string spmid = 21;
//
string epidStatus = 22;
//
string playStatus = 23;
//
string userStatus = 24;
//
int64 actualPlayedTime = 25;
//
int32 autoPlay = 26;
//
int64 listPlayTime = 27;
//
int64 detailPlayTime = 28;
}
//-回复
message HeartbeatReply {
//
int64 ts = 1;
}

View File

@@ -0,0 +1,84 @@
syntax = "proto3";
package bilibili.api.probe.v1;
//
service Probe {
//
//
rpc testCode (CodeReq) returns (CodeReply);
//
//
rpc testReq (ProbeReq) returns (ProbeReply);
//
//
rpc testStream (ProbeStreamReq) returns (ProbeStreamReply);
//
//
rpc testSub (ProbeSubReq) returns (ProbeSubReply);
}
//-请求
message CodeReq {
//
int64 code = 1;
}
//-回复
message CodeReply {
}
//-请求
message ProbeReq {
//
int64 mid = 1;
//
string buvid = 2;
}
//-回复
message ProbeReply {
//
string content = 1;
//
int64 timestamp = 2;
}
//-请求
message ProbeStreamReq {
//
int64 mid = 1;
//
int64 sequence = 2;
}
//-回复
message ProbeStreamReply {
//
int64 sequence = 1;
//
int64 timestamp = 2;
//
string content = 3;
}
//-请求
message ProbeSubReq {
//
int64 buvid = 1;
}
//-回复
message ProbeSubReply {
//
int64 messageId = 1;
}

View File

@@ -0,0 +1,243 @@
//稿件信息v1模块
syntax = "proto3";
package bilibili.app.archive.v1;
//稿件基本信息
message Arc{
//稿件avid
int64 aid = 1;
//稿件分P数
int64 videos = 2;
//分区tid
int32 typeId = 3;
//二级分区名
string typeName = 4;
//稿件版权
//1:原创 2:转载
int32 copyright = 5;
//稿件封面url
string pic = 6;
//稿件标题
string title = 7;
//稿件发布时间
int64 pubdate = 8;
//用户投稿时间
int64 ctime = 9;
//稿件简介
string desc = 10;
//稿件状态
int32 state = 11;
//访问属性
//0:全部可见 10000:登录可见
int32 access = 12;
//属性位配置
int32 attribute = 13;
//空
string tag = 14;
//空
repeated string tags = 15;
//稿件总时长
int64 duration = 16;
//参与的活动id
int64 missionId = 17;
//绑定的商单id
int64 orderId = 18;
//pgc稿件强制重定向url
string redirectUrl = 19;
//
int64 forward = 20;
//控制标志
Rights rights = 21;
//UP主信息
Author author = 22;
//状态数
Stat stat = 23;
//
string reportResult = 24;
//投稿时发送的动态内容
string dynamic = 25;
//稿件1P cid
int64 firstCid = 26;
//稿件1P 分辨率
Dimension dimension = 27;
//合作组成员列表
repeated StaffInfo staffInfo = 28;
//ugc合集id
int64 seasonId = 29;
//新版属性位配置
int64 attributeV2 = 30;
}
//作者信息
message Author{
//UID
int64 mid = 1;
//昵称
string name = 2;
//头像url
string face = 3;
}
//分辨率信息
message Dimension{
//宽度
int64 width = 1;
//高度
int64 height = 2;
//方向
//0:横屏 1:竖屏
int64 rotate = 3;
}
//分P视频
message Page{
//视频cid
int64 cid = 1;
//分P序号
int32 page = 2;
//源类型
//vupload:B站 qq:腾讯 hunan:芒果
string from = 3;
//分P标题
string part = 4;
//分P时长
int64 duration = 5;
//外链vid
string vid = 6;
//分P简介
string desc = 7;
//外链url
string webLink = 8;
//分P分辨率
Dimension dimension = 9;
}
//稿件控制标志
message Rights{
//老版是否付费
int32 bp = 1;
//允许充电
int32 elec = 2;
//允许下载
int32 download = 3;
//是否电影
int32 movie = 4;
//pgc稿件需要付费
int32 pay = 5;
//是否高码率
int32 hd5 = 6;
//是否显示禁止转载标志
int32 noReprint = 7;
//是否允许自动播放
int32 autoplay = 8;
//ugc稿件需要付费
int32 ugcPay = 9;
//是否合作视频
int32 isCooperation = 10;
//是否ugc付费预览
int32 ugcPayPreview = 11;
//是否禁止后台播放
int32 noBackground = 12;
}
//合作成员信息
message StaffInfo{
//成员UID
int64 mid = 1;
//成员角色
string title = 2;
//属性位
int64 attribute = 3;
}
//状态数
message Stat{
//稿件avid
int64 aid = 1;
//播放数
int32 view = 2;
//弹幕数
int32 danmaku = 3;
//评论数
int32 reply = 4;
//收藏数
int32 fav = 5;
//投币数
int32 coin = 6;
//分享数
int32 share = 7;
//当前排名
int32 nowRank = 8;
//历史最高排名
int32 hisRank = 9;
//点赞数
int32 like = 10;
//点踩数
//前端恒为0
int32 dislike = 11;
}

View File

@@ -1,102 +0,0 @@
//稿件信息v1模块
syntax = "proto3";
package bilibili.app.archive.v1;
//用户信息
message Author{
int64 mid = 1;//UID
string name = 2;//昵称
string face = 3;//头像url
}
//分辨率信息
message Dimension{
int64 width = 1;//宽
int64 height = 2;//高
int64 rotate = 3;//旋转
}
//分P视频
message Page{
int64 cid = 1;//cid
int32 page = 2;//分P
string from = 3;//源类型
string part = 4;
int64 duration = 5;
string vid = 6;
string desc = 7;
string webLink = 8;
Dimension dimension = 9;//分辨率
}
//允许配置
message Rights{
int32 bp = 1;
int32 elec = 2;
int32 download = 3;
int32 movie = 4;
int32 pay = 5;
int32 hd5 = 6;
int32 noReprint = 7;
int32 autoplay = 8;
int32 ugcPay = 9;
int32 isCooperation = 10;
int32 ugcPayPreview = 11;
int32 noBackground = 12;
}
//合作成员
message StaffInfo{
int64 mid = 1;//UID
string title = 2;//成员备注
int64 attribute = 3;//
}
//状态数
message Stat{
int64 aid = 1;//avid
int32 view = 2;//播放
int32 danmaku = 3;//弹幕
int32 reply = 4;//评论
int32 fav = 5;//收藏
int32 coin = 6;//投币
int32 share = 7;//分享
int32 nowRank = 8;//当前排名
int32 hisRank = 9;//历史最好排名
int32 like = 10;//点赞
int32 dislike = 11;//点踩
}
//稿件基本信息
message Arc{
int64 aid = 1; //稿件avid
int64 videos = 2; //稿件分P数
int32 typeId = 3; //分区tid
string typeName = 4; //子分区名
int32 copyright = 5; //稿件类型
string pic = 6; //稿件封面url
string title = 7; //稿件标题
int64 pubdate = 8;
int64 ctime = 9;
string desc = 10; //简介
int32 state = 11; //稿件状态
int32 access = 12;
int32 attribute = 13; //属性位配置
string tag = 14;
repeated string tags = 15;
int64 duration = 16; //总时长
int64 missionId = 17; //参与的活动id
int64 orderId = 18;
string redirectUrl = 19; //重定向url
int64 forward = 20;
Rights rights = 21;
Author author = 22; //UP主信息
Stat stat = 23; //状态数
string reportResult = 24;
string dynamic = 25; //动态内容
int64 firstCid = 26; //1P cid
Dimension dimension = 27; //1P 分辨率
repeated StaffInfo staffInfo = 28; //合作组成员列表
int64 seasonId = 29;
int64 attributeV2 = 30;
}

View File

@@ -0,0 +1,955 @@
syntax = "proto3";
package bilibili.app.card.v1;
message AdInfo {
//
int64 creativeId = 1;
//
int32 creativeType = 2;
//
int32 cardType = 3;
//
CreativeContent creativeContent = 4;
//
string adCb = 5;
//
int64 resource = 6;
//
int32 source = 7;
//
string requestId = 8;
//
bool isAd = 9;
//
int64 cmMark = 10;
//
int32 index = 11;
//
bool isAdLoc = 12;
//
int32 cardIndex = 13;
//
string clientIp = 14;
//
bytes extra = 15;
//
int32 creativeStyle = 16;
}
//
message Args {
//
int32 type = 1;
//
int64 upId = 2;
//
string upName = 3;
//
int32 rid = 4;
//
string rname = 5;
//
int64 tid = 6;
//
string tname = 7;
//
string trackId = 8;
//
string state = 9;
//
int32 convergeType = 10;
//
int64 aid = 11;
}
//
message Avatar {
//
string cover = 1;
//
string text = 2;
//
string uri = 3;
//
int32 type = 4;
//
string event = 5;
//
string eventV2 = 6;
//
int32 defalutCover = 7;
}
//
message Base {
//
string cardType = 1;
//
string cardGoto = 2;
//
string goto = 3;
//
string param = 4;
//
string cover = 5;
//
string title = 6;
//
string uri = 7;
//
ThreePoint threePoint = 8;
//
Args args = 9;
//
PlayerArgs playerArgs = 10;
//
int64 idx = 11;
//
AdInfo adInfo = 12;
//
Mask mask = 13;
//
string fromType = 14;
//
repeated ThreePointV2 threePointV2 = 15;
//
repeated ThreePointV3 threePointV3 = 16;
//
Button descButton = 17;
//
ThreePointV4 threePointV4 = 18;
}
//
message Bubble {
//
string bubbleContent = 1;
//
int32 version = 2;
//
int64 stime = 3;
}
//
message Button {
//
string text = 1;
//
string param = 2;
//
string uri = 3;
//
string event = 4;
//
int32 selected = 5;
//
int32 type = 6;
//
string eventV2 = 7;
//
Relation relation = 8;
}
//
message Card {
oneof itemCase {
//
SmallCoverV5 smallCoverV5 = 1;
//
LargeCoverV1 largeCoverV1 = 2;
//
ThreeItemAllV2 threeItemAllV2 = 3;
//
ThreeItemV1 threeItemV1 = 4;
//
HotTopic hotTopic = 5;
//
DynamicHot dynamicHot = 6;
//
MiddleCoverV3 middleCoverV3 = 7;
//
LargeCoverV4 largeCoverV4 = 8;
//
PopularTopEntrance popularTopEntrance = 9;
//
RcmdOneItem rcmdOneItem = 10;
}
}
//
message CreativeContent {
//
string title = 1;
//
string description = 2;
//
int64 videoId = 3;
//
string username = 4;
//
string imageUrl = 5;
//
string imageMd5 = 6;
//
string logUrl = 7;
//
string logMd5 = 8;
//
string url = 9;
//
string clickUrl = 10;
//
string showUrl = 11;
}
//
message DislikeReason {
//
int64 id = 1;
//
string name = 2;
}
//
message DynamicHot {
//
Base base = 1;
//
string topLeftTitle = 2;
//
string desc1 = 3;
//
string desc2 = 4;
//
string moreUri = 5;
//
string moreText = 6;
//
repeated string covers = 7;
//
string coverRightText = 8;
//
ReasonStyle topRcmdReasonStyle = 9;
}
//
message EntranceItem {
//
string goto = 1;
//
string icon = 2;
//
string title = 3;
//
string moduleId = 4;
//
string uri = 5;
//
int64 entranceId = 6;
//
Bubble bubble = 7;
//
int32 entranceType = 8;
}
//
message HotTopic {
//
Base base = 1;
//
string desc = 2;
//
repeated HotTopicItem items = 3;
}
//
message HotTopicItem {
//
string cover = 1;
//
string uri = 2;
//
string param = 3;
//
string name = 4;
}
//
message HotwordEntrance {
//
int64 hotwordId = 1;
//
string hotText = 2;
//
string h5Url = 3;
//
string icon = 4;
}
//
message LargeCoverV1 {
//
Base base = 1;
//
string coverGif = 2;
//
Avatar avatar = 3;
//
string coverLeftText1 = 4;
//
string coverLeftText2 = 5;
//
string coverLeftText3 = 6;
//
string coverBadge = 7;
//
string topRcmdReason = 8;
//
string bottomRcmdReason = 9;
//
string desc = 10;
//
int32 officialIcon = 11;
//
int32 canPlay = 12;
//
ReasonStyle topRcmdReasonStyle = 13;
//
ReasonStyle bottomRcmdReasonStyle = 14;
//
ReasonStyle rcmdReasonStyleV2 = 15;
//
ReasonStyle leftCoverBadgeStyle = 16;
//
ReasonStyle rightCoverBadgeStyle = 17;
//
string coverBadge2 = 18;
//
LikeButton likeButton = 19;
//
int32 titleSingleLine = 20;
//
string coverRightText = 21;
}
//
message LargeCoverV4 {
//
Base base = 1;
//
string coverLeftText1 = 2;
//
string coverLeftText2 = 3;
//
string coverLeftText3 = 4;
//
string coverBadge = 5;
//
int32 canPlay = 6;
//
Up up = 7;
//
string shortLink = 8;
//
string shareSubtitle = 9;
//
string playNumber = 10;
//
string bvid = 11;
//
string subParam = 12;
}
//
message LikeButton {
//
int64 aid = 1;
//
int32 count = 2;
//
bool showCount = 3;
//
string event = 4;
//
int32 selected = 5;
//
string eventV2 = 6;
}
//
message Mask {
//
Avatar avatar = 1;
//
Button button = 2;
}
//
message MiddleCoverV3 {
//
Base base = 1;
//
string desc1 = 2;
//
string desc2 = 3;
//
ReasonStyle coverBadgeStyle = 4;
}
//
message PlayerArgs {
//
int32 isLive = 1;
//
int64 aid = 2;
//
int64 cid = 3;
//
int32 subType = 4;
//
int64 roomId = 5;
//
int64 epId = 7;
//
int32 isPreview = 8;
//
string type = 9;
//
int64 duration = 10;
//
int64 seasonId = 11;
}
//
message PopularTopEntrance {
//
Base base = 1;
//
repeated EntranceItem items = 2;
}
//
message RcmdOneItem {
//
Base base = 1;
//
ReasonStyle topRcmdReasonStyle = 2;
//
SmallCoverRcmdItem item = 3;
}
//
message ReasonStyle {
//
string text = 1;
//
string textColor = 2;
//
string bgColor = 3;
//
string borderColor = 4;
//
string iconUrl = 5;
//
string textColorNight = 6;
//
string bgColorNight = 7;
//
string borderColorNight = 8;
//
string iconNightUrl = 9;
//
int32 bgStyle = 10;
//
string uri = 11;
//
string iconBgUrl = 12;
//
string event = 13;
//
string eventV2 = 14;
//
int32 rightIconType = 15;
//
string leftIconType = 16;
}
//
message Relation {
//
int32 status = 1;
//
int32 isFollow = 2;
//
int32 isFollowed = 3;
}
//
message SharePlane {
//
string title = 1;
//
string shareSubtitle = 2;
//
string desc = 3;
//
string cover = 4;
//
int64 aid = 5;
//
string bvid = 6;
//
map<string,bool> shareTo = 7;
//
string author = 8;
//
int64 authorId = 9;
//
string shortLink = 10;
//
string playNumber = 11;
}
//
message SmallCoverRcmdItem {
//
string title = 1;
//
string cover = 2;
//
string uri = 3;
//
string param = 4;
//
string goto = 5;
//
string coverRightText1 = 6;
//
string rightDesc1 = 7;
//
string rightDesc2 = 8;
//
string coverGif = 9;
//
int32 rightIcon1 = 10;
//
int32 rightIcon2 = 11;
}
//
message SmallCoverV5 {
//
Base base = 1;
//
string coverGif = 2;
//
Up up = 3;
//
string coverRightText1 = 4;
//
string rightDesc1 = 5;
//
string rightDesc2 = 6;
//
ReasonStyle rcmdReasonStyle = 7;
//
HotwordEntrance hotwordEntrance = 8;
//
ReasonStyle cornerMarkStyle = 9;
//
int32 rightIcon1 = 10;
//
int32 rightIcon2 = 11;
//
ReasonStyle leftCornerMarkStyle = 12;
}
//
message ThreeItemAllV2 {
//
Base base = 1;
//
ReasonStyle topRcmdReasonStyle = 2;
//
repeated TwoItemHV1Item item = 3;
}
//
message ThreeItemV1 {
//
Base base = 1;
//
int32 titleIcon = 2;
//
string moreUri = 3;
//
string moreText = 4;
//
repeated ThreeItemV1Item items = 5;
}
//
message ThreeItemV1Item {
//
Base base = 1;
//
string coverLeftText = 2;
//
int32 coverLeftIcon = 3;
//
string desc1 = 4;
//
string desc2 = 5;
//
string badge = 6;
}
//
message ThreePoint {
//
repeated DislikeReason dislikeReasons = 1;
//
repeated DislikeReason feedbacks = 2;
//
int32 watchLater = 3;
}
//
message ThreePointV2 {
//
string title = 1;
//
string subtitle = 2;
//
repeated DislikeReason reasons = 3;
//
string type = 4;
//
int64 id = 5;
}
//
message ThreePointV3 {
//
string title = 1;
//
string selectedTitle = 2;
//
string subtitle = 3;
//
repeated DislikeReason reasons = 4;
//
string type = 5;
//
int64 id = 6;
//
int32 selected = 7;
//
string icon = 8;
//
string selectedIcon = 9;
//
string url = 10;
//
int32 defaultId = 11;
}
//
message ThreePointV4 {
//
SharePlane sharePlane = 1;
//
WatchLater watchLater = 2;
}
//
message TwoItemHV1Item {
//
string title = 1;
//
string cover = 2;
//
string uri = 3;
//
string param = 4;
//
Args args = 5;
//
string goto = 6;
//
string coverLeftText1 = 7;
//
int32 coverLeftIcon1 = 8;
//
string coverRightText = 9;
}
//
message Up {
//
int64 id = 1;
//
string name = 2;
//
string desc = 3;
//
Avatar avatar = 4;
//
int32 officialIcon = 5;
//
Button descButton = 6;
//
string cooperation = 8;
}
//
message WatchLater {
//
int64 aid = 1;
//
string bvid = 2;
}

View File

@@ -0,0 +1,594 @@
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;
}

View File

@@ -0,0 +1,844 @@
//APP端视频播放v1接口
syntax = "proto3";
package bilibili.app.playurl.v1;
//
service PlayURL {
//获取播放界面配置
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf
rpc playConf (PlayConfReq) returns (PlayConfReply);
//
//
rpc playConfEdit (PlayConfEditReq) returns (PlayConfEditReply);
//视频url
//
rpc playURL (PlayURLReq) returns (PlayURLReply);
//视频播放业务数据
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView
rpc playView (PlayViewReq) returns (PlayViewReply);
//
//
rpc project (ProjectReq) returns (ProjectReply);
}
//获取播放界面配置-请求
message PlayConfReq {
}
//获取播放界面配置-回复
message PlayConfReply {
//播放控件用户自定义配置
PlayAbilityConf playConf = 1;
}
//-请求
message PlayConfEditReq {
//
repeated PlayConfState playConf = 1;
}
//-回复
message PlayConfEditReply {
}
//视频url-请求
message PlayURLReq {
//稿件avid
int64 aid = 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;
}
//视频url-回复
message PlayURLReply {
//
uint32 quality = 1;
//
string format = 2;
//
uint64 timelength = 3;
//
uint32 videoCodecid = 4;
//
uint32 fnver = 5;
//
uint32 fnval = 6;
//
bool videoProject = 7;
//
repeated ResponseUrl durl = 8;
//
ResponseDash dash = 9;
//
int32 noRexcode = 10;
//
UpgradeLimit upgradeLimit = 11;
//
repeated FormatDescription supportFormats = 12;
//
VideoType type = 13;
}
//-请求
message PlayViewReq {
//稿件avid
int64 aid = 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 preferCodecType = 12;
}
//-回复
message PlayViewReply {
//视频流信息
VideoInfo info = 1;
//播放控件用户自定义配置
PlayAbilityConf PlayConf = 2;
//互动视频升级提示
UpgradeLimit upgradeLimit = 3;
//
Chronos chronos = 4;
//播放控件稿件配置
PlayArcConf playArc = 5;
//事件
Event event = 6;
}
//-请求
message ProjectReq {
//稿件avid
int64 aid = 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 protocol = 11;
//
int32 deviceType = 12;
}
//-回复
message ProjectReply {
//
PlayURLReply project = 1;
}
//配置项
message ArcConf {
//是否开启
bool isSupport=1;
}
//
message Chronos {
//
string md5=1;
//
string file=2;
}
//
message CloudConf {
//
bool show = 1;
//
ConfType confType = 2;
//
FieldValue fieldValue = 3;
}
//
enum CodeType {
//
NOCODE_VALUE = 0;
//
CODE264_VALUE = 1;
//
CODE265_VALUE = 2;
}
//
enum ConfType {
//
NoType_VALUE = 0;
//
FLIPCONF_VALUE = 1;
//
CASTCONF_VALUE = 2;
//
FEEDBACK_VALUE = 3;
//
SUBTITLE_VALUE = 4;
//
PLAYBACKRATE_VALUE = 5;
//
TIMEUP_VALUE = 6;
//
PLAYBACKMODE_VALUE = 7;
//
SCALEMODE_VALUE = 8;
//
BACKGROUNDPLAY_VALUE = 9;
//
LIKE_VALUE = 10;
//
DISLIKE_VALUE = 11;
//
COIN_VALUE = 12;
//
ELEC_VALUE = 13;
//
SHARE_VALUE = 14;
//
SCREENSHOT_VALUE = 15;
//
LOCKSCREEN_VALUE = 16;
//
RECOMMEND_VALUE = 17;
//
PLAYBACKSPEED_VALUE = 18;
//
DEFINITION_VALUE = 19;
//
SELECTIONS_VALUE = 20;
//
NEXT_VALUE = 21;
//
EDITDM_VALUE = 22;
//
SMALLWINDOW_VALUE = 23;
//
SHAKE_VALUE = 24;
//
OUTERDM_VALUE = 25;
//
INNERDM_VALUE = 26;
//
PANORAMA_VALUE = 27;
//
DOLBY_VALUE = 28;
}
//
message DashItem {
//
uint32 id=1;
//主线流
string baseUrl=2;
//备用流
repeated string backupUrl=3;
//带宽
uint32 bandwidth=4;
//
uint32 codecid=5;
//md5
string md5=6;
//大小
uint64 size=7;
}
//dash视频流
message DashVideo{
//主线流
string baseUrl=1;
//备用流
repeated string backupUrl=2;
//带宽
uint32 bandwidth=3;
//
uint32 codecid=4;
//md5
string md5=5;
//大小
uint64 size=6;
//
uint32 audioId=7;
//是否非全二压
bool noRexcode=8;
}
//杜比音频信息
message DolbyItem{
//
int32 type=1;
//音频流
DashItem audio=2;
}
//事件
message Event{
//震动
Shake shake=1;
}
//
message FieldValue {
//
oneof valueCase {
//
bool value = 1;
}
}
//
message FormatDescription {
//
int32 quality = 1;
//
string format = 2;
//
string description = 3;
//
string newDescription = 4;
//
string displayDesc = 5;
//
string superscript = 6;
}
//播放控件用户自定义配置
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;
}
//播放控件稿件配置
message PlayArcConf{
//后台播放
ArcConf backgroundPlayConf=1;
//镜像反转
ArcConf flipConf=2;
//投屏
ArcConf castConf=3;
//反馈
ArcConf feedbackConf=4;
//字幕
ArcConf subtitleConf=5;
//播放速度
ArcConf playbackRateConf=6;
//定时停止
ArcConf timeUpConf=7;
//播放方式
ArcConf playbackModeConf=8;
//画面尺寸
ArcConf scaleModeConf=9;
//赞
ArcConf likeConf=10;
//踩
ArcConf dislikeConf=11;
//投币
ArcConf coinConf=12;
//充电
ArcConf elecConf=13;
//分享
ArcConf shareConf=14;
//截图
ArcConf screenShotConf=15;
//锁定
ArcConf lockScreenConf=16;
//相关推荐
ArcConf recommendConf=17;
//播放速度
ArcConf playbackSpeedConf=18;
//清晰度
ArcConf definitionConf=19;
//选集
ArcConf selectionsConf=20;
//下一集
ArcConf nextConf=21;
//编辑弹幕
ArcConf editDmConf=22;
//小窗
ArcConf smallWindowConf=23;
//震动
ArcConf shakeConf=24;
//
ArcConf outerDmConf=25;
//
ArcConf innerDmConf=26;
//
ArcConf freyaEnterConf=27;
//
ArcConf dolbyConf=28;
}
//
message PlayConfState {
//
ConfType confType = 1;
//
bool show = 2;
//
FieldValue fieldValue = 3;
}
//
enum PlayErr {
//
NoErr_VALUE = 0;
//
WithMultiDeviceLoginErr_VALUE = 1;
}
//
message PlayerArgs {
//
int64 qn = 1;
//
int64 fnver = 2;
//
int64 fnval = 3;
//
int64 forceHost = 4;
}
//
message ResponseDash {
//
repeated DashItem video = 1;
//
repeated DashItem audio = 2;
}
//分段流条目
message ResponseUrl{
//分段序号
uint32 order = 1;
//分段时长
uint64 length = 2;
//分段大小
uint64 size = 3;
//主线流
string url = 4;
//备用流
repeated string backupUrl = 5;
//md5
string md5 = 6;
}
//分段视频流
message SegmentVideo{
//分段视频流列表
repeated ResponseUrl segment=1;
}
//震动
message Shake{
//
string file=1;
}
//视频流信息
message Stream{
//元数据
StreamInfo info=1;
//
oneof contentCase {
//dash流
DashVideo dashvideo=2;
//分段流
SegmentVideo segmentvideo=3;
}
}
//流媒体元数据
message StreamInfo{
//清晰度 qn
uint32 quality=1;
//格式
string format=2;
//格式描述
string description=3;
//错误码
uint32 errCode=4;
//不满足条件信息
Limit limit=5;
//是否需要vip
bool needVip=6;
//是否需要登录
bool needLogin=7;
//是否完整
bool intact=8;
//是否非全二压
bool noRexcode=9;
//
int64 attribute=10;
//新版格式描述
string newDescription=11;
//格式文字
string displayDesc=12;
//新版格式描述备注
string superscript=13;
}
//不满足条件信息
message Limit{
//
string title=1;
//
string uri=2;
//
string msg=3;
}
//
message UpgradeButton {
//
string title = 1;
//
string link = 2;
}
//互动视频升级提示
message UpgradeLimit{
//错误码
int32 code =1;
//错误信息
string message =2;
//图片url
string image =3;
//按钮信息
UpgradeButton button=4;
}
//视频url信息
message VideoInfo{
//视频清晰度
uint32 quality=1;
//视频格式
string format=2;
//视频时长
uint64 timelength=3;
//
uint32 videoCodecid=4;
//视频流
repeated Stream streamList=5;
//伴音流
repeated DashItem audio=6;
//杜比伴音流
DolbyItem dolby=7;
}
//
enum VideoType {
//
Unknown_VALUE = 0;
//
FLV_VALUE = 1;
//
DASH_VALUE = 2;
//
MP4_VALUE = 3;
}

View File

@@ -1,213 +0,0 @@
//APP端视频播放v1接口
syntax = "proto3";
package bilibili.app.playurl.v1;
message VideoInfo{
message stream{
message streamInfo{
message Limit{
string title=1;
string uri=2;
string msg=3;
}
uint32 quality=1;//清晰度
string format=2;//格式
string description=3;//格式描述
uint32 errCode=4;
Limit limit=5;
bool needVip=6;//需要vip
bool needLogin=7;//需要登录
bool intact=8;
bool noRexcode=9;
int64 attribute=10;
string newDescription=11;//新版格式描述
string displayDesc=12;//格式文字
string superscript=13;//新版格式描述备注
}
message DashVideo{
string baseUrl=1;//主线流
repeated string backupUrl=2;//备用流
uint32 bandwidth=3;//带宽
uint32 codecid=4;
string md5=5;//md5
uint64 size=6;//大小
uint32 audioId=7;
bool noRexcode=8;
}
message SegmentVideo{
message ResponseUrl{
uint32 order=1;
uint64 length=2;
uint64 size=3;
string url=4;
repeated string backupUrl=5;
string md5=6;
}
repeated ResponseUrl segment=1;
}
streamInfo info=1;//元数据
DashVideo dashvideo=2;//dash流
SegmentVideo segmentvideo=3;//flv流
}
message DashAudio{
uint32 id=1;
string baseUrl=2;//主线流
repeated string backupUrl=3;//备用流
uint32 bandwidth=4;//带宽
uint32 codecid=5;//
string md5=6;//md5
uint64 size=7;//大小
}
message DolbyItem{
int32 type=1;
DashAudio audio=2;
}
uint32 quality=1;//视频清晰度
string format=2;//视频格式
uint64 timelength=3;//视频时长
uint32 videoCodecid=4;//
repeated stream streamList=5;//视频流
repeated DashAudio audio=6;//伴音流
DolbyItem dolby=7;//杜比伴音流
}
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;
}
message UpgradeLimit{
message Report{
string showEventId=1;
string clickEventId=2;
string extends=3;
}
message ButtonInfo{
message BadgeInfo{
string text=1;
string bgColor=2;
string bgColorNight=3;
}
string text=1;
string textColor=2;
string textColorNight=3;
string bgColor=4;
string bgColorNight=5;
string link=6;
string actionType=7;
BadgeInfo badgeInfo=8;
Report report=9;
}
int32 code =1;
string message =2;
string image =3;
ButtonInfo button=4;
}
message Chronos{
string md5=1;
string file=2;
}
message PlayArcConf{
message ArcConf{
bool isSupport=1;
}
ArcConf backgroundPlayConf=1;
ArcConf flipConf=2;
ArcConf castConf=3;
ArcConf feedbackConf=4;
ArcConf subtitleConf=5;
ArcConf playbackRateConf=6;
ArcConf timeUpConf=7;
ArcConf playbackModeConf=8;
ArcConf scaleModeConf=9;
ArcConf likeConf=10;
ArcConf dislikeConf=11;
ArcConf coinConf=12;
ArcConf elecConf=13;
ArcConf shareConf=14;
ArcConf screenShotConf=15;
ArcConf lockScreenConf=16;
ArcConf recommendConf=17;
ArcConf playbackSpeedConf=18;
ArcConf definitionConf=19;
ArcConf selectionsConf=20;
ArcConf nextConf=21;
ArcConf editDmConf=22;
ArcConf smallWindowConf=23;
ArcConf shakeConf=24;
ArcConf outerDmConf=25;
ArcConf innerDmConf=26;
ArcConf freyaEnterConf=27;
ArcConf dolbyConf=28;
}
message Event{
message Shake{
string file=1;
}
Shake shake=1;
}
//获取视频url
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView
//请求
message PlayURLReq{
int64 aid = 1; //avid
int64 cid = 2; //cid
int64 qn = 3; //清晰度
int32 fnver = 4; //流类型
int32 fnval = 5;
uint32 download = 6; //下载配置 0:播放 1:flv下载 2:dash下载
int32 forceHost = 7;
bool fourk = 8; //是否4K
string spmid = 9;
string fromSpmid = 10;
}
//回复
message PlayViewReply{
VideoInfo info = 1; //视频信息
PlayAbilityConf PlayConf = 2; //播放界面配置
UpgradeLimit upgradeLimit = 3;
Chronos chronos = 4;
PlayArcConf playArc = 5;
Event event = 6;
}
//获取播放界面配置
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf
//请求
message PlayConfReq{
}
//回复
message PlayConfReply{
PlayAbilityConf playConf = 1;
}

View File

@@ -0,0 +1,27 @@
syntax = "proto3";
package bilibili.app.show.gateway.v1;
import "bilibili/broadcast/message/main.proto";
//
service AppShow {
//
//
rpc getActProgress (GetActProgressReq) returns (GetActProgressReply);
}
//-请求
message GetActProgressReq {
//
int64 pageID = 1;
//
int64 mid = 2;
}
//-回复
message GetActProgressReply {
//
bilibili.broadcast.message.main.NativePageEvent event = 1;
}

View File

@@ -0,0 +1,139 @@
syntax = "proto3";
package bilibili.app.show.popular.v1;
import "bilibili/app/playurl/v1.proto";
import "bilibili/app/card/v1.proto";
//
service Popular {
//
//
rpc index (PopularResultReq) returns (PopularReply);
}
//-请求
message PopularResultReq {
//
int64 idx = 1;
//
int32 loginEvent = 2;
//
int32 qn = 3;
//
int32 fnver = 4;
//
int32 fnval = 5;
//
int32 forceHost = 6;
//
int32 fourk = 7;
//
sfixed32 spmid = 8;
//
sfixed32 lastParam = 9;
//
sfixed32 ver = 10;
//
int64 entranceId = 11;
//
sfixed32 locationIds = 12;
//
int32 sourceId = 13;
//
int32 flush = 14;
//
bilibili.app.playurl.v1.PlayerArgs playerArgs = 15;
}
//-回复
message PopularReply {
//
repeated bilibili.app.card.v1.Card items = 1;
//
Config config = 2;
//
string ver = 3;
}
//
message Bubble {
//
string bubbleContent = 1;
//
int32 version = 2;
//
int64 stime = 3;
}
//
message Config {
//
string itemTitle = 1;
//
string bottomText = 2;
//
string bottomTextCover = 3;
//
string bottomTextUrl = 4;
//
repeated EntranceShow topItems = 5;
//
string headImage = 6;
//
repeated EntranceShow pageItems = 7;
//
int32 hit = 8;
}
//
message EntranceShow {
//
string icon = 1;
//
string title = 2;
//
string moduleId = 3;
//
string uri = 4;
//
Bubble bubble = 5;
//
int64 entranceId = 6;
//
string topPhoto = 7;
//
int32 entranceType = 8;
}

View File

@@ -0,0 +1,146 @@
syntax = "proto3";
package bilibili.app.show.rank.v1;
//
service Rank {
//
//
rpc rankAll (RankAllResultReq) returns (RankListReply);
//
//
rpc rankRegion (RankRegionResultReq) returns (RankListReply);
}
//-请求
message RankAllResultReq {
//
string order = 1;
//
int32 pn = 2;
//
int32 ps = 3;
}
//-请求
message RankRegionResultReq {
//
int32 rid = 1;
//
int32 pn = 2;
//
int32 ps = 3;
}
//-回复
message RankListReply {
//
repeated Item items = 1;
}
//
message Item {
//
string title = 1;
//
string cover = 2;
//
string param = 3;
//
string uri = 4;
//
string redirectUrl = 5;
//
string goto = 6;
//
int32 play = 7;
//
int32 danmaku = 8;
//
int64 mid = 9;
//
string name = 10;
//
string face = 11;
//
int32 reply = 12;
//
int32 favourite = 13;
//
int64 pubDate = 14;
//
int32 rid = 15;
//
string rname = 16;
//
int64 duration = 17;
//
int32 like = 18;
//
int64 cid = 19;
//
int64 pts = 20;
//
string cooperation = 21;
//
int32 attribute = 22;
//
int64 follower = 23;
//
OfficialVerify officialVerify = 24;
//
repeated Item children = 25;
//
Relation relation = 26;
}
//
message OfficialVerify {
//
int32 type = 1;
//
string desc = 2;
}
//
message Relation {
//
int32 status = 1;
//
int32 isFollow = 2;
//
int32 isFollowed = 3;
}

View File

@@ -0,0 +1,67 @@
syntax = "proto3";
package bilibili.app.show.region.v1;
//
service Region {
//
//
rpc region (RegionReq) returns (RegionReply);
}
//
message RegionReq {
//
string lang = 1;
}
//
message RegionReply {
//
repeated RegionInfo regions = 1;
}
//
message RegionConfig {
//
string scenesName = 1;
//
string scenesType = 2;
}
//
message RegionInfo {
//
int32 tid = 1;
//
int32 reid = 2;
//
string name = 3;
//
string logo = 4;
//
string goto = 5;
//
string param = 6;
//
string uri = 7;
//
int32 type = 8;
//
int32 isBangumi = 9;
//
repeated RegionInfo children = 10;
//
repeated RegionConfig config = 11;
}

View File

@@ -0,0 +1,139 @@
syntax = "proto3";
package bilibili.app.space.v1;
//
service Space {
//
//
rpc archive (ArchiveReq) returns (ArchiveReply);
}
//-请求
message ArchiveReq {
//
int64 vmid = 1;
//
int32 pn = 2;
//
int32 ps = 3;
//
string order = 4;
}
//-回复
message ArchiveReply {
//
repeated BiliSpaceVideo item = 1;
//
int32 count = 2;
//
EpisodicButton episodicButton = 3;
//
repeated OrderConfig order = 4;
}
//
message Badge {
//
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 BiliSpaceVideo {
//
string title = 1;
//
string tname = 2;
//
int64 duration = 3;
//
string cover = 4;
//
string uri = 5;
//
string param = 6;
//
string danmaku = 7;
//
int32 play = 8;
//
int64 ctime = 9;
//
bool state = 10;
//
bool isPopular = 11;
//
repeated Badge badges = 12;
//
string coverRight = 13;
//
string bvid = 14;
//
bool isSteins = 15;
//
bool isUgcpay = 16;
//
bool isCooperation = 17;
}
//
message EpisodicButton {
//
string text = 1;
//
string uri = 2;
}
//
message OrderConfig {
//
string title = 1;
//
string value = 2;
}

View File

@@ -0,0 +1,180 @@
syntax = "proto3";
package bilibili.app.splash.v1;
import "google/protobuf/any.proto";
//
service Splash {
//
//
rpc list (SplashReq) returns (SplashReply);
}
//-请求
message SplashReq {
//
int32 width = 1;
//
int32 height = 2;
//
string birth = 3;
//
string adExtra = 4;
//
string network = 5;
}
//-回复
message SplashReply {
//
int32 maxTime = 1;
//
int32 minInterval = 2;
//
int32 pullInterval = 3;
//
repeated SplashItem list = 4;
//
repeated ShowStrategy show = 5;
}
//
message ShowStrategy {
//
int32 id = 1;
//
int64 stime = 2;
//
int64 etime = 3;
}
//
message SplashItem {
//
int32 id = 1;
//
int32 type = 2;
//
int32 cardType = 3;
//
int32 duration = 4;
//
int64 beginTime = 5;
//
int64 endTime = 6;
//
string thumb = 7;
//
string hash = 8;
//
string logoUrl = 9;
//
string logoHash = 10;
//
string videoUrl = 11;
//
string videoHash = 12;
//
int32 videoWidth = 13;
//
int32 videoHeight = 14;
//
string schema = 15;
//
string schemaTitle = 16;
//
string schemaPackageName = 17;
//
repeated string schemaCallupWhiteList = 18;
//
int32 skip = 19;
//
string uri = 20;
//
string uriTitle = 21;
//
int32 source = 22;
//
int32 cmMark = 23;
//
string adCb = 24;
//
int64 resourceId = 25;
//
string requestId = 26;
//
string clientIp = 27;
//
bool isAd = 28;
//
bool isAdLoc = 29;
//
google.protobuf.Any extra = 30;
//
int64 cardIndex = 31;
//
int64 serverType = 32;
//
int64 index = 33;
//
string clickUrl = 34;
//
string showUrl = 35;
//
int32 timeTarget = 36;
//
int32 encryption = 37;
//
bool enablePreDownload = 38;
//
bool enableBackgroundDownload = 39;
}

View File

@@ -0,0 +1,42 @@
syntax = "proto3";
package bilibili.app.wall.v1;
//
service Wall {
//
//
rpc ruleInfo (RuleRequest) returns (RulesReply);
}
//-请求
message RuleRequest {
}
//-回复
message RulesReply {
//
map<string,RulesInfo> rulesInfo = 1;
}
//
message RuleInfo {
//
bool tf = 1;
//
string m = 2;
//
string a = 3;
//
string p = 4;
}
//
message RulesInfo {
//
repeated RuleInfo rulesInfo = 1;
}

View File

@@ -0,0 +1,189 @@
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;
}

View File

@@ -1,8 +1,20 @@
//APP端课程播放v1接口
syntax = "proto3";
package bilibili.cheese.gateway.player.v1;
import public "bilibili/app/playurl_v1.proto";
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);
}
enum CodeType{
NOCODE = 0;
CODE264 = 1;
CODE265 = 2;
}
message PlayAbilityConf{
bool backgroundPlayDisable=1;
@@ -36,30 +48,54 @@ message PlayAbilityConf{
}
//url
//https://app.bilibili.com/bilibili.cheese.gateway.player.v1.PlayURL/PlayView
//
message playViewReq{
enum CodeType{
NOCODE = 0;
CODE264 = 1;
CODE265 = 2;
}
int64 epid = 1; //epid
int64 cid = 2; //cid
int64 qn = 3; //
//epid
int64 epid = 1;
//cid
int64 cid = 2;
//
int64 qn = 3;
//
int32 fnver = 4;
int32 fnval = 5; //
uint32 download = 6; // 0: 1:flv下载 2:dash下载
//
int32 fnval = 5;
//
//0: 1:flv下载 2:dash下载
uint32 download = 6;
//url强制是用域名
//0:使ip 1:使http 2:使https
int32 forceHost = 7;
bool fourk = 8; //4K
//4K
bool fourk = 8;
//
string spmid = 9;
//
string fromSpmid = 10;
//
int32 teenagersMode = 11;
CodeType codetype = 12; //
//
CodeType codetype = 12;
//
bool isPreview = 13;
}
//
message PlayViewReply{
bilibili.app.playurl.v1.VideoInfo info = 1; //
PlayAbilityConf PlayConf = 2; //
//
bilibili.app.playurl.v1.VideoInfo info = 1;
//
PlayAbilityConf PlayConf = 2;
}

View File

@@ -0,0 +1,387 @@
syntax = "proto3";
package bilibili.community.service.dm.v1;
//
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 Response{
int32 code = 1;
string message = 2;
}
//单个字幕信息
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;
}
//修改弹幕配置
//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmPlayerConfig
//请求
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 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;
}
//获取弹幕元数据
//https://app.bilibili.com/bilibili.community.service.dm.v1.DM/DmView
//请求
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;
}

View File

@@ -0,0 +1,774 @@
//评论区v1接口
syntax = "proto3";
package bilibili.main.community.reply.v1;
import "google/protobuf/any.proto";
service Reply {
//主评论列表接口
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/MainList
rpc MainList(MainListReq) returns (MainListReply);
//二级评论明细接口
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DetailList
rpc DetailList(DetailListReq) returns (DetailListReply);
//对话评论树接口
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList
rpc DialogList(DialogListReq) returns (DialogListReply);
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook
rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply);
//搜索评论区插入项目接口
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItem
rpc SearchItem(SearchItemReq) returns (SearchItemReply);
}
//排序方式
enum Mode{
//
DEFAULT = 0;
//
UNSPECIFIED = 1;
//按时间
MAIN_LIST_TIME = 2;
//按热度
MAIN_LIST_HOT = 3;
}
//页面游标请求
message CursorReq{
//下页数据
int64 next = 1;
//上页数据
int64 prev = 2;
//排序方式
Mode mode = 4;
}
//页面游标回复
message CursorReply{
//下页数据
int64 next = 1;
//上页数据
int64 prev = 2;
//是否到顶
bool isBegin = 3;
//是否到底
bool isEnd = 4;
//排序方式
Mode mode = 5;
}
//
enum SearchItemType{
//
DEFAULT_ITEM_TYPE = 0;
//
GOODS_VALUE = 1;
//
VIDEO_VALUE = 2;
//
ARTICLE_VALUE = 3;
}
//
enum DetailListScene{
//评论区展开
REPLY = 0;
//回复消息推送
MSG_FEED = 1;
}
//
message SearchItemCursorReq{
//
int64 next = 1;
//
SearchItemType itemType = 2;
}
//
message SearchItemCursorReply{
//
bool hasNext = 1;
//
int64 next = 2;
}
//用户信息
message Member{
//UID
int64 mid = 1;
//昵称
string name = 2;
//性别
string sex = 3;
//头像url
string face = 4;
//等级
int64 level = 5;
//认证类型
int64 officialVerifyType = 6;
/****VIP相关****/
//会员类型
int64 vipType = 7;
//会员状态
int64 vipStatus = 8;
//会员样式
int64 vipThemeType = 9;
//会员铭牌样式url
string vipLabelPath = 10;
/****装扮相关****/
//头像框url
string garbPendantImage = 11;
//装扮卡url
string garbCardImage = 12;
//有关注按钮时的装扮卡url
string garbCardImageWithFocus = 13;
//专属装扮页面url
string garbCardJumpUrl = 14;
//专属装扮id
string garbCardNumber = 15;
//专属装扮id显示颜色
string garbCardFanColor = 16;
//是否为专属装扮卡
bool garbCardIsFan = 17;
/****粉丝勋章相关****/
//粉丝勋章名
string fansMedalName = 18;
//粉丝勋章等级
int64 fansMedalLevel = 19;
//粉丝勋章显示颜色
int64 fansMedalColor = 20;
}
//表情项
message Emote{
//表情大小
//1:小 2:大
int64 size = 1;
//表情url
string url = 2;
}
//话题项
message Topic{
//跳转url
string link = 1;
//话题id
int64 id = 2;
}
//超链项
message Url{
//标题
string title = 1;
//
int64 state = 2;
//图标url
string prefixIcon = 3;
//
string appUrlSchema = 4;
//
string appName = 5;
//
string appPackageName = 6;
//
string clickReport = 7;
}
//投票信息
message Vote{
//投票id
int64 id = 1;
//投票标题
string title = 2;
//参与人数
int64 count = 3;
}
//评论主体信息
message Content{
//评论文本
string message = 1;
//at到的用户信息
map<string,Member> menber = 2;
//需要渲染的表情转义
map<string,Emote> emote = 3;
//需要高亮的话题转义
map<string,Topic> topic = 4;
//需要高亮的超链转义
map<string,Url> url = 5;
//投票信息
Vote vote = 6;
}
//评论条目控制字段
message ReplyControl{
//操作行为标志
//0:无 1:已点赞 2:已点踩
int64 action = 1;
//是否UP觉得很赞
bool upLike = 2;
//是否存在UP回复
bool upReply = 3;
//是否显示关注按钮
bool showFollowBtn = 4;
//是否协管
bool isAssist = 5;
//评论标签?
string labelText = 6;
//是否关注
bool following = 7;
//是否粉丝
bool followed = 8;
//是否被自己拉黑
bool blocked = 9;
//是否存在折叠的二级评论
bool hasFoldedReply = 10;
//是否折叠
bool isFoldedReply = 11;
//是否UP置顶
bool isUpTop = 12;
//是否管理置顶
bool isAdminTop = 13;
//是否置顶投票评论
bool isVoteTop = 14;
//最大收起显示行数
int64 maxLine = 15;
//
bool invisible = 16;
}
//评论条目信息
message ReplyInfo{
//二级评论列表
repeated ReplyInfo replies = 1;
//评论rpid
int64 id = 2;
//评论区对象id
int64 oid = 3;
//评论区类型
int64 type = 4;
//发布者UID
int64 mid = 5;
//根评论rpid
int64 root = 6;
//父评论rpid
int64 parent = 7;
//对话评论rpid
int64 dialog = 8;
//点赞数
int64 like = 9;
//发布时间
int64 ctime = 10;
//回复数
int64 count = 11;
//评论主体信息
Content content = 12;
//发布者信息
Member member = 13;
//评论控制字段
ReplyControl replyControl = 14;
}
//评论区控制字段
message SubjectControl{
//UP主UID
int64 upMid = 1;
//自己是否为协管
bool isAssist = 2;
//是否只读
bool readOnly = 3;
//是否有发起投票权限
bool hasVoteAccess = 4;
//是否有发起抽奖权限
bool hasLotteryAccess = 5;
//是否有被折叠评论
bool hasFoldedReply = 6;
//空评论区背景文案
string bgText = 7;
//是否被UP拉黑
bool upBlocked = 8;
//是否有发起活动权限
bool hasActivityAccess = 9;
//标题展示控制
bool showTitle = 10;
//是否显示UP主操作标志
bool showUpAction = 11;
//是否显示评论区排序切换按钮
int64 switcherType = 12;
//是否禁止输入框
bool inputDisable = 13;
//根评论输入框背景文案
string rootText = 14;
//子评论输入框背景文案
string childText = 15;
//评论总数
int64 count = 16;
//评论区标题
string title = 17;
}
//
message Notice{
//
int64 id = 1;
//
string content = 2;
//
string link = 3;
}
//
message Lottery{
//
int64 lotteryId = 1;
//
int64 lotteryStatus = 2;
//
int64 lotteryMid = 3;
//
int64 lotteryTime = 4;
//
int64 oid = 5;
//
int64 type = 6;
//
int64 ctime = 7;
//
Content content = 8;
//
Member member = 9;
//
ReplyControl replyControl = 10;
}
//
message Activity{
//
int64 activityId = 1;
//
int64 activityState = 2;
//
string activityPlaceholder = 3;
}
//
message UpSelection{
//
int64 pendingCount = 1;
//
int64 ignoreCount = 2;
}
//
message CM{
//
google.protobuf.Any sourceContent = 1;
}
//
message ArticleSearchItem{
//
string title = 1;
//
string upNickname = 2;
//
repeated string covers = 3;
}
//
message GoodsSearchItem{
//
int64 id = 1;
//
string name = 2;
//
string price = 3;
//
string income = 4;
//
string img = 5;
//
string label = 6;
}
//
enum VideoItemCase{
//
VIDEOITEM_NOT_SET = 0;
//
UGC = 2;
//
PGC = 3;
}
//
message UGCVideoSearchItem{
//
string title = 1;
//
string upNickname = 2;
//
int64 duration = 3;
//
string cover = 4;
}
//
message PGCVideoSearchItem{
//
string title = 1;
//
string category = 2;
//
string cover = 3;
}
//
message VideoSearchItem{
//
VideoItemCase type = 1;
//
UGCVideoSearchItem UGCVideo = 2;
//
PGCVideoSearchItem PGCVideo = 3;
}
//
enum ItemCase{
//
ITEM_NOT_SET = 0;
//
GOODS = 2;
//
VIDEO = 3;
//
ARTICLE = 4;
}
//
message SearchItem{
//
string url = 1;
//
GoodsSearchItem goods = 2;
//
VideoSearchItem video = 3;
//
ArticleSearchItem article = 4;
}
//
message SearchItemReplyExtraInfo{
//
string eventId = 1;
}
//主评论列表
//请求
message MainListReq{
//目标评论区id
int64 oid = 1;
//评论区类型
int64 type = 2;
//页面游标
CursorReq cursor = 3;
//
string extra = 4;
//
string adExtra = 5;
//
int64 rpid = 6;
}
//回复
message MainListReply{
//页面游标
CursorReply cursor = 1;
//评论列表
repeated ReplyInfo replies = 2;
//评论区显示控制
SubjectControl subjectControl = 3;
//UP置顶评论
ReplyInfo upTop = 4;
//管理员置顶评论
ReplyInfo adminTop = 5;
//投票置顶评论
ReplyInfo voteTop = 6;
//
Notice notice = 7;
//抽奖评论
Lottery lottery = 8;
//
Activity activity = 9;
//
UpSelection upSelection = 10;
//
CM cm = 11;
}
//二级评论明细
//请求
message DetailListReq{
//目标评论区id
int64 oid = 1;
//评论区类型
int64 type = 2;
//根评论rpid
int64 root = 3;
//目标评论rpid
int64 rpid = 4;
//页面游标
CursorReq cursor = 5;
//来源标识
DetailListScene scene = 6;
}
//回复
message DetailListReply{
//页面游标
CursorReply cursor = 1;
//评论区显示控制
SubjectControl subjectControl = 2;
//根评论信息(带二级评论)
ReplyInfo root = 3;
//
Activity activity = 4;
}
//对话评论树
//请求
message DialogListReq{
//目标评论区id
int64 oid = 1;
//评论区类型
int64 type = 2;
//根评论rpid
int64 root = 3;
//目标评论rpid
int64 rpid = 4;
//页面游标
CursorReq cursor = 5;
}
//回复
message DialogListReply{
//页面游标
CursorReply cursor = 1;
//评论区显示控制
SubjectControl subjectControl = 2;
//评论树列表
repeated ReplyInfo replies = 3;
//
Activity activity = 4;
}
//搜索提示信息?
//请求
message SearchItemPreHookReq{
//目标评论区id
int64 oid = 1;
//评论区类型
int64 type = 2;
}
//回复
message SearchItemPreHookReply{
//
string placeholderText = 1;
//
string backgroundText = 2;
//
repeated SearchItemType orderedType = 3;
}
//搜索评论区插入项目
//请求
message SearchItemReq{
//页面游标
SearchItemCursorReq cursor = 1;
//目标评论区id
int64 oid = 2;
//评论区类型
int64 type = 3;
//搜索关键词
string keyword = 4;
}
//回复
message SearchItemReply{
//
SearchItemCursorReply cursor = 1;
//
repeated SearchItem items = 2;
//
SearchItemReplyExtraInfo extra = 3;
}

View File

@@ -1,340 +0,0 @@
//评论区v1接口
syntax = "proto3";
package bilibili.main.community.reply.v1;
import "google/protobuf/any.proto";
message CursorReq{
enum Mode{
DEFAULT = 0;
UNSPECIFIED = 1;
MAIN_LIST_TIME = 2;
MAIN_LIST_HOT = 3;
}
int64 next = 1;
int64 prev = 2;
Mode mode = 3; //排序模式
}
message CursorReply{
enum Mode{
DEFAULT = 0;
UNSPECIFIED = 1;
MAIN_LIST_TIME = 2;
MAIN_LIST_HOT = 3;
}
int64 next = 1;
int64 prev = 2;
bool isBegin = 3;
bool isEnd = 4;
Mode mode = 5;
}
enum SearchItemType{
DEFAULT_ITEM_TYPE = 0;
GOODS_VALUE = 1;
VIDEO_VALUE = 2;
ARTICLE_VALUE = 3;
}
message SearchItemCursorReq{
int64 next = 1;
SearchItemType itemType = 2;
}
message SearchItemCursorReply{
bool hasNext = 1;
int64 next = 2;
}
message Member{
int64 mid = 1; //UID
string name = 2; //昵称
string sex = 3; //性别
string face = 4; //头像url
int64 level = 5; //等级
int64 officialVerifyType = 6; //认证类型
int64 vipType = 7; //会员类型
int64 vipStatus = 8; //会员状态
int64 vipThemeType = 9;
string vipLabelPath = 10;
string garbPendantImage = 11; //头像框url
string garbCardImage = 12; //装扮卡url
string garbCardImageWithFocus = 13;
string garbCardJumpUrl = 14;//专属装扮页url
string garbCardNumber = 15;//专属装扮id
string garbCardFanColor = 16;//专属装扮id显示颜色
bool garbCardIsFan = 17;//是否为专属装扮卡
string fansMedalName = 18;
int64 fansMedalLevel = 19;
int64 fansMedalColor = 20;
}
message Content{
message Emote{
int64 size = 1;//表情大小 1:小 2:大
string url = 2;//标签url
}
message Topic{
string link = 1;
int64 id = 2;
}
message Url{
string title = 1; //标题
int64 state = 2;
string prefixIcon = 3; //图标url
string appUrlSchema = 4;
string appName = 5;
string appPackageName = 6;
string clickReport = 7;
}
message Vote{
int64 id = 1;
string title = 2;
int64 count = 3;
}
string message = 1; //评论正文
map<string,Member> menber = 2; //at到的用户信息
map<string,Emote> emote = 3; //表情转义
map<string,Topic> topic = 4; //话题转义
map<string,Url> url = 5; //扩展应用转义
Vote vote = 6;
}
message ReplyControl{
int64 action = 1; //操作标志 0:无 1:已点赞 2:已点踩
bool upLike = 2; //是否UP觉得很赞
bool upReply = 3; //是否存在UP回复
bool showFollowBtn = 4; //是否显示关注按钮
bool isAssist = 5;
string labelText = 6;
bool following = 7; //是否关注
bool followed = 8; //是否粉丝
bool blocked = 9;
bool hasFoldedReply = 10;
bool isFoldedReply = 11;
bool isUpTop = 12; //是否UP置顶
bool isAdminTop = 13; //是否管理置顶
bool isVoteTop = 14; //是否投票评论
int64 maxLine = 15; //最大收起行数
bool invisible = 16;
}
message ReplyInfo{
repeated ReplyInfo replies = 1; //二级评论
int64 id = 2; //rpid
int64 oid = 3; //对象id
int64 type = 4; //评论区类型id
int64 mid = 5; //发布者UID
int64 root = 6; //根评论rpid
int64 parent = 7; //父评论rpid
int64 dialog = 8; //对话评论rpid
int64 like = 9; //点赞数
int64 ctime = 10; //发布时间
int64 count = 11; //回复数
Content content = 12; //评论主体信息
Member member = 13; //评论发布者信息
ReplyControl replyControl = 14; //评论显示控制项
}
message SubjectControl{
int64 upMid = 1; //UP主UID
bool isAssist = 2;
bool readOnly = 3;
bool hasVoteAccess = 4;
bool hasLotteryAccess = 5;
bool hasFoldedReply = 6;
string bgText = 7; //空评论背景文字
bool upBlocked = 8;
bool hasActivityAccess = 9;
bool showTitle = 10;
bool showUpAction = 11;
int64 switcherType = 12;
bool inputDisable = 13;
string rootText = 14; //输入框背景文字
string childText = 15;
int64 count = 16; //评论总数
string title = 17; //评论区标题
}
message Notice{
int64 id = 1;
string content = 2;
string link = 3;
}
message Lottery{
int64 lotteryId = 1;
int64 lotteryStatus = 2;
int64 lotteryMid = 3;
int64 lotteryTime = 4;
int64 oid = 5;
int64 type = 6;
int64 ctime = 7;
Content content = 8;
Member member = 9;
ReplyControl replyControl = 10;
}
message Activity{
int64 activityId = 1;
int64 activityState = 2;
string activityPlaceholder = 3;
}
message UpSelection{
int64 pendingCount = 1;
int64 ignoreCount = 2;
}
message CM{
google.protobuf.Any sourceContent = 1;
}
message SearchItem{
message ArticleSearchItem{
string title = 1;
string upNickname = 2;
repeated string covers = 3;
}
message GoodsSearchItem{
int64 id = 1;
string name = 2;
string price = 3;
string income = 4;
string img = 5;
string label = 6;
}
message VideoSearchItem{
enum VideoItemCase{
VIDEOITEM_NOT_SET = 0;
UGC = 2;
PGC = 3;
}
message UGCVideoSearchItem{
string title = 1;
string upNickname = 2;
int64 duration = 3;
string cover = 4;
}
message PGCVideoSearchItem{
string title = 1;
string category = 2;
string cover = 3;
}
VideoItemCase type = 1;
UGCVideoSearchItem UGCVideo = 2;
PGCVideoSearchItem PGCVideo = 3;
}
enum ItemCase{
ITEM_NOT_SET = 0;
GOODS = 2;
VIDEO = 3;
ARTICLE = 4;
}
string url = 1;
GoodsSearchItem goods = 2;
VideoSearchItem video = 3;
ArticleSearchItem article = 4;
}
message SearchItemReplyExtraInfo{
string eventId = 1;
}
//评论列表
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/MainList
//请求
message MainListReq{
int64 oid = 1; //目标评论区id
int64 type = 2; //评论区类型
CursorReq cursor = 3; //页面选择
string extra = 4;
string adExtra = 5;
int64 rpid = 6;
}
//回复
message MainListReply{
CursorReply cursor = 1; //页面信息
repeated ReplyInfo replies = 2; //评论条目
SubjectControl subjectControl = 3; //评论区显示控制
ReplyInfo upTop = 4; //UP置顶评论
ReplyInfo adminTop = 5; //管理置顶评论
ReplyInfo voteTop = 6; //投票评论
Notice notice = 7;
Lottery lottery = 8; //抽奖评论
Activity activity = 9;
UpSelection upSelection = 10;
CM cm = 11;
}
//二级评论明细
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DetailList
//请求
message DetailListReq{
enum DetailListScene{
REPLY = 0; //评论区展开
MSG_FEED = 1; //回复消息推送
}
int64 oid = 1; //目标评论区id
int64 type = 2; //评论区类型
int64 root = 3; //根评论rpid
int64 rpid = 4; //目标评论rpid
CursorReq cursor = 5; //页面选择
DetailListScene scene = 6; //来源标识
}
//回复
message DetailListReply{
CursorReply cursor = 1; //页面信息
SubjectControl subjectControl = 2; //评论区显示控制
ReplyInfo root = 3; //根评论信息(带二级评论)
Activity activity = 4;
}
//对话评论回复树
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList
//请求
message DialogListReq{
int64 oid = 1; //目标评论区id
int64 type = 2; //评论区类型
int64 root = 3; //根评论rpid
int64 rpid = 4; //目标评论rpid
CursorReq cursor = 5; //页面选择
}
//回复
message DialogListReply{
CursorReply cursor = 1; //页面信息
SubjectControl subjectControl = 2; //评论区显示控制
repeated ReplyInfo replies = 3; //评论树列表
Activity activity = 4;
}
//搜索提示信息?
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook
//请求
message SearchItemPreHookReq{
int64 oid = 1; //目标评论区id
int64 type = 2; //评论区类型
}
//回复
message SearchItemPreHookReply{
string placeholderText = 1;
string backgroundText = 2;
repeated SearchItemType orderedType = 3;
}
//搜索评论区插入项目
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItem
//请求
message SearchItemReq{
SearchItemCursorReq cursor = 1; //页面选择
int64 oid = 2; //目标评论区id
int64 type = 3; //评论区类型
string keyword = 4; //搜索关键词
}
//回复
message SearchItemReply{
SearchItemCursorReply cursor = 1;
repeated SearchItem items = 2;
SearchItemReplyExtraInfo extra = 3;
}

View File

@@ -1,20 +1,46 @@
syntax = "proto3";
package bilibili.metadata.device;
//环境参数1
//x-bili-device-bin
message Device{
//产品id
int32 appId = 1;
//构建id
int32 build = 2;
//设备buvid
string buvid = 3;
//包类型
string mobiApp = 4;
//平台类型
string platform = 5;
//设备类型
string device = 6;
//渠道
string channel = 7;
//品牌
string brand = 8;
//型号
string model = 9;
//系统版本
string osver = 10;
//
string fpLocal = 11;
//
string fpRemote = 12;
//APP版本号
string versionName = 13;
}

View File

@@ -1,10 +1,30 @@
syntax = "proto3";
package bilibili.metadata.locale;
message LocaleIds{
//
string language = 1;
//
string script = 2;
//
string region = 3;
}
//区域标识
//x-bili-locale-bin
message LocaleIds{
string language = 1;
string script = 2;
string region = 3;
}
message Locale {
//App设置的locale
LocaleIds c_locale = 1;
//系统默认的locale
LocaleIds s_locale = 2;
//sim卡的国家码+运营商码
string sim_code = 3;
//时区
string timezone = 4;
}

View File

@@ -1,23 +1,28 @@
syntax = "proto3";
package bilibili.metadata;
//环境参数2
//x-bili-metadata-bin
message Metadata{
//登录Token
string accessKey = 1;
//包类型
string mobiApp = 2;
//设备类型
string device = 3;
//构建id
int32 build = 4;
//渠道
string channel = 5;
//设备buvid
string buvid = 6;
//平台类型
string platform = 7;
}
import "google/protobuf/any.proto";
//接口回复报错信息
//grpc-status-details-bin
message Status{
int32 code = 1; //错误码
string message = 2; //错误信息
repeated google.protobuf.Any details = 3; //套娃专用
}

View File

@@ -1,25 +1,61 @@
syntax = "proto3";
package bilibili.metadata.network;
//网络类型
enum Type{
//未知
NT_UNKNOWN = 0;
WIFI = 1; //wifi
CELLULAR = 2; //蜂窝网络
OFFLINE = 3; //离线
ETHERNET = 5; //以太网
OTHERNET = 4; //其他
//wifi
WIFI = 1;
//蜂窝网络
CELLULAR = 2;
//未连接
OFFLINE = 3;
//以太网
ETHERNET = 5;
//其他
OTHERNET = 4;
}
/*
enum Tf{
//免流类型
enum TFType {
//正常计费
TF_UNKNOWN = 0;
}*/
//联通卡
U_CARD = 1;
//联通包
U_PKG = 2;
//移动卡
C_CARD = 3;
//移动包
C_PKG = 4;
//电信卡
T_CARD = 5;
//电信包
T_PKG = 6;
}
//网络类型标识
//x-bili-network-bin
message Network{
Type type = 1; //网络类型
//Tf tf = 2;
int32 tf = 2;
//网络类型
Type type = 1;
//免流类型
TFType tf = 2;
//运营商
string oid = 3;
}

View File

@@ -1,8 +1,30 @@
syntax = "proto3";
package bilibili.metadata.restriction;
//模式类型
enum ModeType{
NORMAL = 0;
TEENAGERS = 1;
LESSONS = 2;
}
//正常
NORMAL = 0;
//青少年模式
TEENAGERS = 1;
//课堂模式
LESSONS = 2;
}
//限制条件
message Restriction {
//青少年模式开关状态
bool teenagers_mode = 1;
//课堂模式开关状态
bool lessons_mode = 2;
//模式类型
ModeType mode = 3;
//app审核review状态
bool review = 4;
}

View File

@@ -0,0 +1,409 @@
//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView
syntax = "proto3";
package bilibili.pgc.gateway.player.v2;
import "google/protobuf/timestamp.proto";
enum CodeType{
NOCODE = 0;
CODE264 = 1;
CODE265 = 2;
}
//不满足条件信息
message Limit{
//
string title=1;
//
string uri=2;
//
string msg=3;
}
//流媒体元数据
message streamInfo{
//清晰度 qn
uint32 quality=1;
//格式
string format=2;
//格式描述
string description=3;
//错误码
uint32 errCode=4;
//不满足条件信息
Limit limit=5;
//是否需要vip
bool needVip=6;
//是否需要登录
bool needLogin=7;
//是否完整
bool intact=8;
//是否非全二压
bool noRexcode=9;
//
int64 attribute=10;
//新版格式描述
string newDescription=11;
//格式文字
string displayDesc=12;
//新版格式描述备注
string superscript=13;
}
//dash视频流
message DashVideo{
//主线流
string baseUrl=1;
//备用流
repeated string backupUrl=2;
//带宽
uint32 bandwidth=3;
//
uint32 codecid=4;
//md5
string md5=5;
//大小
uint64 size=6;
//
uint32 audioId=7;
//是否非全二压
bool noRexcode=8;
}
//分段流条目
message ResponseUrl{
//分段序号
uint32 order = 1;
//分段时长
uint64 length = 2;
//分段大小
uint64 size = 3;
//主线流
string url = 4;
//备用流
repeated string backupUrl = 5;
//md5
string md5 = 6;
}
//分段视频流
message SegmentVideo{
//分段视频流列表
repeated ResponseUrl segment=1;
}
//视频流信息
message stream{
//元数据
streamInfo info=1;
//dash流
DashVideo dashvideo=2;
//分段流
SegmentVideo segmentvideo=3;
}
//dash音频流
message DashAudio{
//音质id
uint32 id=1;
//主线流
string baseUrl=2;
//备用流
repeated string backupUrl=3;
//带宽
uint32 bandwidth=4;
//
uint32 codecid=5;
//md5
string md5=6;
//大小
uint64 size=7;
}
//杜比音频信息
message DolbyItem{
//
int32 type=1;
//音频流
DashAudio audio=2;
}
//视频url信息
message VideoInfo{
//视频清晰度
uint32 quality=1;
//视频格式
string format=2;
//视频时长
uint64 timelength=3;
//
uint32 videoCodecid=4;
//视频流
repeated stream streamList=5;
//伴音流
repeated DashAudio audio=6;
//杜比伴音流
DolbyItem dolby=7;
}
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;
}
message PlayViewBusinessInfo{
bool isPreview=1;
bool bp=2;
string marlinToken=3;
}
message Shake{
string file=1;
}
message Event{
Shake shake=1;
}
message Report{
string showEventId=1;
string clickEventId=2;
string extends=3;
}
message BadgeInfo{
string text=1;
string bgColor=2;
string bgColorNight=3;
}
message ButtonInfo{
string text=1;
string textColor=2;
string textColorNight=3;
string bgColor=4;
string bgColorNight=5;
string link=6;
string actionType=7;
BadgeInfo badgeInfo=8;
Report report=9;
}
message DialogConfig{
bool isShowCover=1;
bool isOrientationEnable=2;
bool isNestedScrollEnable=3;
bool isForceHalfscreenEnable=4;
}
message TextInfo{
string text=1;
string textColor=2;
string textColorNight=3;
}
message ImageInfo{
string url=1;
}
message Dialog{
int64 code=1;
string msg=2;
string type=3;
string styleType=4;
DialogConfig config=5;
TextInfo title=6;
TextInfo subtitle=7;
ImageInfo image=8;
repeated ButtonInfo button=9;
ButtonInfo bottomDesc=10;
Report report=11;
int32 countDownSec=12;
}
message Toast{
string text=1;
ButtonInfo button=2;
}
message CouponTextInfo{
string positivePreview=1;
string section=2;
}
message CouponToast{
CouponTextInfo textInfo=1;
ButtonInfo button=2;
}
message Coupon{
string couponToken=1;
int64 type=2;
string value=3;
string useDesc=4;
string title=5;
string desc=6;
string payButtonText=7;
string payButtonTextLineThrough=8;
string realAmount=9;
google.protobuf.Timestamp expireTime=10;
}
message PopWin{
string title=1;
repeated Coupon coupon=2;
repeated ButtonInfo button=3;
string bottomText=4;
}
message CouponInfo{
CouponToast toast=1;
PopWin popWin=2;
}
message EndPage{
Dialog dialog=1;
bool hide=2;
}
message ViewInfo{
Dialog dialog=1;
Toast toast=2;
CouponInfo couponInfo=3;
repeated int64 demandNoPayEpids=4;
EndPage endPage=5;
}
//请求
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;
//
int32 forceHost = 7;
//是否允许4K
bool fourk = 8;
//
string spmid = 9;
//
string fromSpmid = 10;
//
int32 teenagersMode = 11;
//编码类型
CodeType codetype = 12;
//
bool isPreview = 13;
//
int64 roomId = 14;
//
bool isNeedViewInfo = 15;
}
//回复
message PlayViewReply{
//视频流信息
VideoInfo info=1;
//用户播放界面配置
PlayAbilityConf PlayConf=2;
//
PlayViewBusinessInfo Business=3;
//
Event event=4;
//
ViewInfo viewInfo=5;
}

View File

@@ -1,245 +0,0 @@
//APP端PGC播放v2接口
//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView
syntax = "proto3";
package bilibili.pgc.gateway.player.v2;
import "google/protobuf/timestamp.proto";
message playViewReq{
enum CodeType{
NOCODE = 0;
CODE264 = 1;
CODE265 = 2;
}
int64 epid = 1; //目标剧集epid
int64 cid = 2; //目标视频cid
int64 qn = 3; //清晰度
int32 fnver = 4;
int32 fnval = 5; //流类型
uint32 download = 6; //下载配置 0:播放 1:flv下载 2:dash下载
int32 forceHost = 7;
bool fourk = 8; //是否4K
string spmid = 9;
string fromSpmid = 10;
int32 teenagersMode = 11;
CodeType codetype = 12; //编码类型
bool isPreview = 13;
int64 roomId = 14;
bool isNeedViewInfo = 15;
}
message VideoInfo{
message stream{
message streamInfo{
message Limit{
string title=1;
string uri=2;
string msg=3;
}
uint32 quality=1;//清晰度
string format=2;//格式
string description=3;//格式描述
uint32 errCode=4;
Limit limit=5;
bool needVip=6;//需要vip
bool needLogin=7;//需要登录
bool intact=8;
bool noRexcode=9;
int64 attribute=10;
string newDescription=11;//新版格式描述
string displayDesc=12;//格式文字
string superscript=13;//新版格式描述备注
}
message DashVideo{
string baseUrl=1;//主线流
repeated string backupUrl=2;//备用流
uint32 bandwidth=3;//带宽
uint32 codecid=4;
string md5=5;//md5
uint64 size=6;//大小
uint32 audioId=7;
bool noRexcode=8;
}
message SegmentVideo{
message ResponseUrl{
uint32 order=1;
uint64 length=2;
uint64 size=3;
string url=4;
repeated string backupUrl=5;
string md5=6;
}
repeated ResponseUrl segment=1;
}
streamInfo info=1;//元数据
DashVideo dashvideo=2;//dash流
SegmentVideo segmentvideo=3;//flv流
}
message DashAudio{
uint32 id=1;
string baseUrl=2;//主线流
repeated string backupUrl=3;//备用流
uint32 bandwidth=4;//带宽
uint32 codecid=5;//
string md5=6;//md5
uint64 size=7;//大小
}
message DolbyItem{
int32 type=1;
DashAudio audio=2;
}
uint32 quality=1;//视频清晰度
string format=2;//视频格式
uint64 timelength=3;//视频时长
uint32 videoCodecid=4;//
repeated stream streamList=5;//视频流
repeated DashAudio audio=6;//伴音流
DolbyItem dolby=7;//杜比伴音流
}
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;
}
message PlayViewBusinessInfo{
bool isPreview=1;
bool bp=2;
string marlinToken=3;
}
message Event{
message Shake{
string file=1;
}
Shake shake=1;
}
message ViewInfo{
message Report{
string showEventId=1;
string clickEventId=2;
string extends=3;
}
message ButtonInfo{
message BadgeInfo{
string text=1;
string bgColor=2;
string bgColorNight=3;
}
string text=1;
string textColor=2;
string textColorNight=3;
string bgColor=4;
string bgColorNight=5;
string link=6;
string actionType=7;
BadgeInfo badgeInfo=8;
Report report=9;
}
message Dialog{
message DialogConfig{
bool isShowCover=1;
bool isOrientationEnable=2;
bool isNestedScrollEnable=3;
bool isForceHalfscreenEnable=4;
}
message TextInfo{
string text=1;
string textColor=2;
string textColorNight=3;
}
message ImageInfo{
string url=1;
}
int64 code=1;
string msg=2;
string type=3;
string styleType=4;
DialogConfig config=5;
TextInfo title=6;
TextInfo subtitle=7;
ImageInfo image=8;
repeated ButtonInfo button=9;
ButtonInfo bottomDesc=10;
Report report=11;
int32 countDownSec=12;
}
message Toast{
string text=1;
ButtonInfo button=2;
}
message CouponInfo{
message CouponToast{
message CouponTextInfo{
string positivePreview=1;
string section=2;
}
CouponTextInfo textInfo=1;
ButtonInfo button=2;
}
message PopWin{
message Coupon{
string couponToken=1;
int64 type=2;
string value=3;
string useDesc=4;
string title=5;
string desc=6;
string payButtonText=7;
string payButtonTextLineThrough=8;
string realAmount=9;
google.protobuf.Timestamp expireTime=10;
}
string title=1;
repeated Coupon coupon=2;
repeated ButtonInfo button=3;
string bottomText=4;
}
CouponToast toast=1;
PopWin popWin=2;
}
message EndPage{
Dialog dialog=1;
bool hide=2;
}
Dialog dialog=1;
Toast toast=2;
CouponInfo couponInfo=3;
repeated int64 demandNoPayEpids=4;
EndPage endPage=5;
}
message PlayViewReply{
VideoInfo info=1;//视频信息
PlayAbilityConf PlayConf=2;//播放界面配置
PlayViewBusinessInfo Business=3;
Event event=4;
ViewInfo viewInfo=5;
}

View File

@@ -1,4 +1,5 @@
syntax = "proto3";
package bilibili.rpc;
import "google/protobuf/any.proto";
@@ -6,7 +7,12 @@ import "google/protobuf/any.proto";
//接口回复报错信息
//grpc-status-details-bin
message Status{
int32 code = 1; //错误码
string message = 2; //错误信息
repeated google.protobuf.Any details = 3; //套娃专用
//业务错误码
int32 code = 1;
//业务错误信息
string message = 2;
//扩展信息嵌套(套娃专用)
repeated google.protobuf.Any details = 3;
}