213 lines
5.4 KiB
Protocol Buffer
213 lines
5.4 KiB
Protocol Buffer
//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;
|
|
} |