更新【proto文件】

This commit is contained in:
SocialSisterYi 2021-02-05 18:32:00 +08:00
parent 84eab33d9e
commit c454b3a409
18 changed files with 1919 additions and 1442 deletions

View File

@ -2,6 +2,294 @@ syntax = "proto3";
package bilibili.app.card.v1;
//
message Card {
oneof item {
//
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 SmallCoverV5 {
//
Base base = 1;
//
string coverGif = 2;
//
Up up = 3;
//
string coverRightText1 = 4;
//1UP主昵称
string rightDesc1 = 5;
//2
string rightDesc2 = 6;
//
ReasonStyle rcmdReasonStyle = 7;
//
HotwordEntrance hotwordEntrance = 8;
//
ReasonStyle cornerMarkStyle = 9;
//1id
int32 rightIcon1 = 10;
//2id
int32 rightIcon2 = 11;
//
ReasonStyle leftCornerMarkStyle = 12;
}
//
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 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 HotTopic {
//
Base base = 1;
//
string desc = 2;
//
repeated HotTopicItem items = 3;
}
//
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 MiddleCoverV3 {
//
Base base = 1;
//
string desc1 = 2;
//
string desc2 = 3;
//
ReasonStyle coverBadgeStyle = 4;
}
//
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 PopularTopEntrance {
//
Base base = 1;
//
repeated EntranceItem items = 2;
}
//
message RcmdOneItem {
//
Base base = 1;
//
ReasonStyle topRcmdReasonStyle = 2;
//
SmallCoverRcmdItem item = 3;
}
//
message AdInfo {
//
int64 creativeId = 1;
@ -112,27 +400,28 @@ message Avatar {
int32 defalutCover = 7;
}
//
//
message Base {
//
//
string cardType = 1;
//
//?
string cardGoto = 2;
//
//
//av:稿 mid:
string goto = 3;
//
//
string param = 4;
//
//url
string cover = 5;
//
//
string title = 6;
//
//uri
string uri = 7;
//
@ -144,7 +433,7 @@ message Base {
//
PlayerArgs playerArgs = 10;
//
//
int64 idx = 11;
//
@ -153,7 +442,8 @@ message Base {
//
Mask mask = 13;
//
//
//recommend: operation:?
string fromType = 14;
//
@ -165,84 +455,50 @@ message Base {
//
Button descButton = 17;
//
//v4
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;
//
//
//2:
int32 type = 6;
//
//v2
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 {
//
@ -288,75 +544,33 @@ message DislikeReason {
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;
//
//url
string icon = 2;
//
//
string title = 3;
//
//id
string moduleId = 4;
//
//uri
string uri = 5;
//
//id
int64 entranceId = 6;
//
//
Bubble bubble = 7;
//
//?
int32 entranceType = 8;
}
//
message HotTopic {
//
Base base = 1;
//
string desc = 2;
//
repeated HotTopicItem items = 3;
}
//
message HotTopicItem {
//
@ -387,111 +601,6 @@ message HotwordEntrance {
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 {
//
@ -522,21 +631,6 @@ message Mask {
Button button = 2;
}
//
message MiddleCoverV3 {
//
Base base = 1;
//
string desc1 = 2;
//
string desc2 = 3;
//
ReasonStyle coverBadgeStyle = 4;
}
//
message PlayerArgs {
//
@ -570,57 +664,37 @@ message PlayerArgs {
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;
//
//url
string iconUrl = 5;
//
//-
string textColorNight = 6;
//
//-
string bgColorNight = 7;
//
//-
string borderColorNight = 8;
//
//url-
string iconNightUrl = 9;
//
//id
//1: 2:
int32 bgStyle = 10;
//
@ -642,162 +716,94 @@ message ReasonStyle {
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;
//
//url
string cover = 4;
//
//稿avid
int64 aid = 5;
//
//稿bvid
string bvid = 6;
//
//
map<string,bool> shareTo = 7;
//
//UP主昵称
string author = 8;
//
//UP主UID
int64 authorId = 9;
//
//
string shortLink = 10;
//
//
string playNumber = 11;
}
//
//
message SmallCoverRcmdItem {
//
//
string title = 1;
//
//url
string cover = 2;
//
//uri
string uri = 3;
//
//
string param = 4;
//
//
//av:稿
string goto = 5;
//
//
string coverRightText1 = 6;
//
//1UP主昵称
string rightDesc1 = 7;
//
//2
string rightDesc2 = 8;
//
string coverGif = 9;
//
//1id
int32 rightIcon1 = 10;
//
//2id
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;
//
@ -824,7 +830,7 @@ message ThreePoint {
//
repeated DislikeReason feedbacks = 2;
//
//
int32 watchLater = 3;
}
@ -882,12 +888,12 @@ message ThreePointV3 {
int32 defaultId = 11;
}
//
//v4
message ThreePointV4 {
//
//
SharePlane sharePlane = 1;
//
//
WatchLater watchLater = 2;
}
@ -945,11 +951,11 @@ message Up {
string cooperation = 8;
}
//
//
message WatchLater {
//
//稿avid
int64 aid = 1;
//
//稿bvid
string bvid = 2;
}

View File

@ -3,27 +3,27 @@ syntax = "proto3";
package bilibili.app.playurl.v1;
//
//url
service PlayURL {
//
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayConf
rpc playConf (PlayConfReq) returns (PlayConfReply);
rpc PlayConf (PlayConfReq) returns (PlayConfReply);
//
//
rpc playConfEdit (PlayConfEditReq) returns (PlayConfEditReply);
rpc PlayConfEdit (PlayConfEditReq) returns (PlayConfEditReply);
//url
//url
//
rpc playURL (PlayURLReq) returns (PlayURLReply);
rpc PlayURL (PlayURLReq) returns (PlayURLReply);
//
//
//https://app.bilibili.com/bilibili.app.playurl.v1.PlayURL/PlayView
rpc playView (PlayViewReq) returns (PlayViewReply);
rpc PlayView (PlayViewReq) returns (PlayViewReply);
//
//
rpc project (ProjectReq) returns (ProjectReply);
rpc Project (ProjectReq) returns (ProjectReply);
}
//-
@ -59,10 +59,10 @@ message PlayURLReq {
//
int64 qn = 3;
//
//
int32 fnver = 4;
//
//
int32 fnval = 5;
//
@ -125,7 +125,7 @@ message PlayURLReply {
VideoType type = 13;
}
//-
//-
message PlayViewReq {
//稿avid
int64 aid = 1;
@ -166,7 +166,7 @@ message PlayViewReq {
CodeType preferCodecType = 12;
}
//-
//-
message PlayViewReply {
//
VideoInfo info = 1;
@ -261,16 +261,16 @@ message CloudConf {
FieldValue fieldValue = 3;
}
//
//
enum CodeType {
//
NOCODE_VALUE = 0;
//
NOCODE = 0;
//
CODE264_VALUE = 1;
//H.264
CODE264 = 1;
//
CODE265_VALUE = 2;
//H.265
CODE265 = 2;
}
//
@ -388,7 +388,7 @@ message DashItem {
}
//dash视频流
message DashVideo{
message DashVideo {
//线
string baseUrl=1;
@ -415,7 +415,7 @@ message DashVideo{
}
//
message DolbyItem{
message DolbyItem {
//
int32 type=1;
@ -424,7 +424,7 @@ message DolbyItem{
}
//
message Event{
message Event {
//
Shake shake=1;
}
@ -459,95 +459,95 @@ message FormatDescription {
string superscript = 6;
}
//
message PlayAbilityConf{
//
//
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{
message PlayArcConf {
//
ArcConf backgroundPlayConf=1;
@ -629,7 +629,7 @@ message PlayArcConf{
//
ArcConf freyaEnterConf=27;
//
//
ArcConf dolbyConf=28;
}
@ -679,7 +679,7 @@ message ResponseDash {
}
//
message ResponseUrl{
message ResponseUrl {
//
uint32 order = 1;
@ -700,19 +700,19 @@ message ResponseUrl{
}
//
message SegmentVideo{
message SegmentVideo {
//
repeated ResponseUrl segment=1;
}
//
message Shake{
message Shake {
//
string file=1;
}
//
message Stream{
message Stream {
//
StreamInfo info=1;
@ -727,7 +727,7 @@ message Stream{
}
//
message StreamInfo{
message StreamInfo {
// qn
uint32 quality=1;
@ -769,7 +769,7 @@ message StreamInfo{
}
//
message Limit{
message Limit {
//
string title=1;
@ -790,7 +790,7 @@ message UpgradeButton {
}
//
message UpgradeLimit{
message UpgradeLimit {
//
int32 code =1;
@ -805,7 +805,7 @@ message UpgradeLimit{
}
//url信息
message VideoInfo{
message VideoInfo {
//
uint32 quality=1;

View File

@ -1,47 +1,48 @@
syntax = "proto3";
package bilibili.app.show.popular.v1;
package bilibili.app.show.v1;
import "bilibili/app/playurl/v1.proto";
import "bilibili/app/card/v1.proto";
//
//
service Popular {
//
//
rpc index (PopularResultReq) returns (PopularReply);
//
//https://app.bilibili.com/bilibili.app.show.v1.Popular/Index
rpc Index (PopularResultReq) returns (PopularReply);
}
//-
//-
message PopularResultReq {
//
//ididx
int64 idx = 1;
//
//
//1: 2:
int32 loginEvent = 2;
//
//
int32 qn = 3;
//
//
int32 fnver = 4;
//
//
int32 fnval = 5;
//
//使
int32 forceHost = 6;
//
//4K
int32 fourk = 7;
//
sfixed32 spmid = 8;
//
//param
sfixed32 lastParam = 9;
//
//ver
sfixed32 ver = 10;
//
@ -60,80 +61,80 @@ message PopularResultReq {
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;
//
//url
string bottomTextCover = 3;
//
//url
string bottomTextUrl = 4;
//
//
repeated EntranceShow topItems = 5;
//
//url
string headImage = 6;
//
//
repeated EntranceShow pageItems = 7;
//
//?
int32 hit = 8;
}
//
//
message EntranceShow {
//
//url
string icon = 1;
//
//
string title = 2;
//
//id
string moduleId = 3;
//
//uri
string uri = 4;
//
//
Bubble bubble = 5;
//
//id
int64 entranceId = 6;
//
//url
string topPhoto = 7;
//
//?
int32 entranceType = 8;
}

View File

@ -1,146 +1,153 @@
syntax = "proto3";
package bilibili.app.show.rank.v1;
package bilibili.app.show.v1;
//
//
service Rank {
//
//
rpc rankAll (RankAllResultReq) returns (RankListReply);
//
//https://app.bilibili.com/bilibili.app.show.v1.Rank/RankAll
rpc RankAll (RankAllResultReq) returns (RankListReply);
//
//
rpc rankRegion (RankRegionResultReq) returns (RankListReply);
//
//https://app.bilibili.com/bilibili.app.show.v1.Rank/RankRegion
rpc RankRegion (RankRegionResultReq) returns (RankListReply);
}
//-
//-
message RankAllResultReq {
//
//"all"
string order = 1;
//
//
//1
int32 pn = 2;
//
//
//100100
int32 ps = 3;
}
//-
//-
message RankRegionResultReq {
//
//tid
//0:
int32 rid = 1;
//
//
//1
int32 pn = 2;
//
//
//100100
int32 ps = 3;
}
//-
//-
message RankListReply {
//
//
repeated Item items = 1;
}
//
//
message Item {
//
//
string title = 1;
//
//url
string cover = 2;
//
//稿avid
string param = 3;
//
//uri
string uri = 4;
//
//url?
string redirectUrl = 5;
//
//
//av:稿
string goto = 6;
//
//
int32 play = 7;
//
//
int32 danmaku = 8;
//
//UP主UID
int64 mid = 9;
//
//UP主昵称
string name = 10;
//
//UP主头像url
string face = 11;
//
//
int32 reply = 12;
//
//
int32 favourite = 13;
//
//
int64 pubDate = 14;
//
//tid
int32 rid = 15;
//
//
string rname = 16;
//
//
int64 duration = 17;
//
//
int32 like = 18;
//
//1P cid
int64 cid = 19;
//
//
int64 pts = 20;
//
//
string cooperation = 21;
//
//
int32 attribute = 22;
//
//UP主粉丝数
int64 follower = 23;
//
//UP主认证信息
OfficialVerify officialVerify = 24;
//
//UP收起子项列表
repeated Item children = 25;
//
//
Relation relation = 26;
}
//
//
message OfficialVerify {
//
//
//-1: 0: 1:
int32 type = 1;
//
//
string desc = 2;
}
//
//
message Relation {
//
//id
int32 status = 1;
//
//
int32 isFollow = 2;
//
//
int32 isFollowed = 3;
}

View File

@ -10,46 +10,8 @@ service PlayURL {
rpc PlayView (playViewReq) returns (PlayViewReply);
}
enum CodeType{
NOCODE = 0;
CODE264 = 1;
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;
}
//url
//
message playViewReq{
//url-
message playViewReq {
//epid
int64 epid = 1;
@ -59,10 +21,10 @@ message playViewReq{
//
int64 qn = 3;
//
//
int32 fnver = 4;
//
//
int32 fnval = 5;
//
@ -82,7 +44,7 @@ message playViewReq{
//
string fromSpmid = 10;
//
//
int32 teenagersMode = 11;
//
@ -91,11 +53,111 @@ message playViewReq{
//
bool isPreview = 13;
}
//
message PlayViewReply{
//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;
}

View File

@ -2,6 +2,181 @@ 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{
//
@ -72,128 +247,231 @@ message DanmakuFlagConfig{
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
@ -265,123 +543,4 @@ message VideoSubtitle{
//
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

@ -18,6 +18,10 @@ service Reply {
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/DialogList
rpc DialogList(DialogListReq) returns (DialogListReply);
//
//
rpc previewList (PreviewListReq) returns (PreviewListReply);
//
//https://app.bilibili.com/bilibili.main.community.reply.v1.Reply/SearchItemPreHook
rpc SearchItemPreHook(SearchItemPreHookReq) returns (SearchItemPreHookReply);
@ -27,6 +31,213 @@ service Reply {
rpc SearchItem(SearchItemReq) returns (SearchItemReply);
}
//-
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 PreviewListReq {
//
int64 oid = 1;
//
int64 type = 2;
//
CursorReq cursor = 3;
}
//?-
message PreviewListReply {
//
CursorReply cursor = 1;
//
repeated ReplyInfo replies = 2;
//
SubjectControl subjectControl = 3;
//
ReplyInfo upTop = 4;
//
ReplyInfo adminTop = 5;
//
ReplyInfo voteTop = 6;
}
//?-
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;
}
//
enum Mode{
//
@ -597,178 +808,4 @@ message SearchItem{
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

@ -0,0 +1,184 @@
syntax = "proto3";
package bilibili.metadata;
/**********环境参数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;
}
/**********环境参数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;
}
/**********区域标识**********/
//x-bili-locale-bin
message Locale {
//App设置的locale
LocaleIds c_locale = 1;
//locale
LocaleIds s_locale = 2;
//sim卡的国家码+
string sim_code = 3;
//
string timezone = 4;
}
//
message LocaleIds{
//
string language = 1;
//
string script = 2;
//
string region = 3;
}
/**********网络类型标识**********/
//x-bili-network-bin
message Network{
//
Type type = 1;
//
TFType tf = 2;
//
string oid = 3;
}
//
enum Type{
//
NT_UNKNOWN = 0;
//wifi
WIFI = 1;
//
CELLULAR = 2;
//
OFFLINE = 3;
//
ETHERNET = 5;
//
OTHERNET = 4;
}
//
enum TFType {
//
TF_UNKNOWN = 0;
//
U_CARD = 1;
//
U_PKG = 2;
//
C_CARD = 3;
//
C_PKG = 4;
//
T_CARD = 5;
//
T_PKG = 6;
}
/**********限制条件**********/
message Restriction {
//
bool teenagers_mode = 1;
//
bool lessons_mode = 2;
//
ModeType mode = 3;
//app审核review状态
bool review = 4;
}
//
enum ModeType{
//
NORMAL = 0;
//
TEENAGERS = 1;
//
LESSONS = 2;
}

View File

@ -1,46 +0,0 @@
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,30 +0,0 @@
syntax = "proto3";
package bilibili.metadata.locale;
message LocaleIds{
//
string language = 1;
//
string script = 2;
//
string region = 3;
}
//
//x-bili-locale-bin
message Locale {
//App设置的locale
LocaleIds c_locale = 1;
//locale
LocaleIds s_locale = 2;
//sim卡的国家码+
string sim_code = 3;
//
string timezone = 4;
}

View File

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

View File

@ -1,61 +0,0 @@
syntax = "proto3";
package bilibili.metadata.network;
//
enum Type{
//
NT_UNKNOWN = 0;
//wifi
WIFI = 1;
//
CELLULAR = 2;
//
OFFLINE = 3;
//
ETHERNET = 5;
//
OTHERNET = 4;
}
//
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;
//
TFType tf = 2;
//
string oid = 3;
}

View File

@ -1,30 +0,0 @@
syntax = "proto3";
package bilibili.metadata.restriction;
//
enum ModeType{
//
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

@ -1,349 +1,18 @@
//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;
//url
service PlayURL {
//url
//https://app.bilibili.com/bilibili.pgc.gateway.player.v2.PlayURL/PlayView
rpc PlayView (PlayViewReq) returns (PlayViewReply);
}
//
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{
//url-
message PlayViewReq{
//epid
int64 epid = 1;
@ -353,10 +22,10 @@ message playViewReq{
//
int64 qn = 3;
//
//
int32 fnver = 4;
//
//
int32 fnval = 5;
//
@ -390,20 +59,558 @@ message playViewReq{
//
bool isNeedViewInfo = 15;
}
//
//url-
message PlayViewReply{
//
VideoInfo info=1;
VideoInfo info = 1;
//
PlayAbilityConf PlayConf=2;
PlayAbilityConf PlayConf = 2;
//
PlayViewBusinessInfo Business=3;
PlayViewBusinessInfo Business = 3;
//
Event event=4;
Event event = 4;
//
ViewInfo viewInfo=5;
ViewInfo viewInfo = 5;
}
//
enum CodeType {
//
NOCODE = 0;
//H.264
CODE264 = 1;
//H.265
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;
}

View File

@ -6,7 +6,7 @@ import "google/protobuf/any.proto";
//
//grpc-status-details-bin
message Status{
message Status {
//
int32 code = 1;

View File

@ -3,6 +3,8 @@ rem 递归编译proto
set lang="python"
set patch=%CD%
for /r %patch% %%a in (*.proto) do (
protoc.exe -I %patch% --%lang%_out=. %%~fa
echo comp %%~fa ok!
)
protoc -I %patch% --%lang%_out=. %%~fa
echo comp %%~fa
)
echo all done
pause >nul

6
grpc_api/comp_proto.sh Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# 递归编译proto
lang='python'
patch=$(cd $(dirname $0); pwd)
find $patch -name '*.proto' -exec protoc -I $patch --${lang}_out=. {} \; -exec echo comp {} \;
echo 'all Done'

View File

@ -1,6 +1,7 @@
# grpc接口定义protobuf结构体
- `comp_proto.bat`---win递归批量编译脚本
- `conp_proto.sh`---linux递归编译脚本
注:
@ -10,18 +11,18 @@
## grpc头部
- [bilibili.metadata.locale](bilibili/metadata/locale.proto):区域信息
- [bilibili.metadata.network](bilibili/metadata/network.proto):网络信息
- [bilibili.metadata](bilibili/metadata/metadata.proto):环境参数
- [bilibili.metadata.restriction](bilibili/metadata/restriction.proto):限制值
- [bilibili.metadata.device](bilibili/metadata/device.proto):设备信息
- [bilibili.metadata](bilibili/metadata.proto):环境参数
- [bilibili.rpc](bilibili/rpc.proto):响应错误信息
## 接口请求定义
- [blibili.app.archive.v1](bilibili/app/archive_v1.proto)稿件信息v1模块
- [blibili.app.playurl.v1](bilibili/app/playurl_v1.proto)APP端视频播放v1接口
- [blibili.app.view.v1](bilibili/app/view_v1.proto)视频页v1接口
- [bilibili.pgc.gateway.player.v2](bilibili/pgc/gateway_player_v2.proto)APP端PGC播放v2接口
- [bilibili.cheese.gateway.player.v1](bilibili/cheese_gateway_player_v1.proto)APP端课程播放v1接口
- [bilibili.main.community.reply.v1](bilibili/main_community_reply_v1.proto)评论区v1接口
- [blibili.app.archive.v1](bilibili/app/archive/v1.proto):稿件信息
- [bilibili.app.card.v1](bilibili/app/card/v1.proro):卡片
- [blibili.app.playurl.v1](bilibili/app/playurl/v1.proto)APP端视频播放业务
- [blibili.app.show.v1.Popular](bilibili/app/show/popular/v1.proto):热门内容
- [blibili.app.show.v1.Rank](bilibili/app/show/rank/v1.proto):榜单
- [blibili.app.view.v1](bilibili/app/view/v1.proto):稿件详情页
- [bilibili.cheese.gateway.player.v1](bilibili/cheese/gateway/player/v1.proto)APP端课程播放
- [bilibili.pgc.gateway.player.v2](bilibili/pgc/gateway/player/v2.proto)APP端PGC播放
- [bilibili.community.service.dm.v1](bilibili/community/service/dm/v1.proto):弹幕
- [bilibili.main.community.reply.v1](bilibili/main/community/reply/v1.proto):评论区