修改【readme】 添加【安卓端登录】appsec 添加大量【proto结构文件】
This commit is contained in:
409
grpc_api/bilibili/pgc/gateway/player/v2.proto
Normal file
409
grpc_api/bilibili/pgc/gateway/player/v2.proto
Normal 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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user