add: new united playurl grpc interface (#642)

This commit is contained in:
陈寒彤 2023-03-28 04:08:46 +03:00 committed by GitHub
parent 280f69f7ee
commit 28e8a7cbf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2590 additions and 2485 deletions

View File

@ -0,0 +1,14 @@
syntax = "proto3";
package bilibili.app.playerunite.pgcanymodel;
import "bilibili/pgc/gateway/player/v2/playurl.proto";
message PGCAnyModel {
bilibili.pgc.gateway.player.v2.PlayViewBusinessInfo business = 3;
bilibili.pgc.gateway.player.v2.Event event = 4;
bilibili.pgc.gateway.player.v2.ViewInfo view_info = 5;
bilibili.pgc.gateway.player.v2.PlayAbilityExtConf play_ext_conf = 6;
bilibili.pgc.gateway.player.v2.PlayExtInfo play_ext_info = 7;
}

View File

@ -0,0 +1,27 @@
syntax = "proto3";
package bilibili.app.playerunite.ugcanymodel;
message ButtonStyle {
string text = 1;
string text_color = 2;
string bg_color = 3;
string jump_link = 4;
}
enum PlayLimitCode {
PLC_UNKNOWN = 0;
PLC_NOTPAYED = 1;
}
message PlayLimit {
PlayLimitCode code = 1;
string message = 2;
string sub_message = 3;
ButtonStyle button = 4;
}
message UGCAnyModel {
PlayLimit play_limit = 1;
}

View File

@ -0,0 +1,45 @@
syntax = "proto3";
package bilibili.app.playerunite.v1;
import "bilibili/playershared/playershared.proto";
import "google/protobuf/any.proto";
// url
service Player {
//
rpc PlayViewUnite (PlayViewUniteReq) returns (PlayViewUniteReply);
}
//
message PlayViewUniteReq {
// VOD信息
bilibili.playershared.VideoVod vod = 1;
//
string spmid = 2;
//
string from_spmid = 3;
// , ep_id等
map<string, string> extra_content = 4;
}
//
message PlayViewUniteReply {
//
bilibili.playershared.VodInfo vod_info = 1;
//
bilibili.playershared.PlayArcConf play_arc_conf = 2;
//
bilibili.playershared.PlayDeviceConf play_device_conf = 3;
//
bilibili.playershared.Event event = 4;
// 使 pgcanymodel / ugcanymodel proto any转换成对应业务码结构体
google.protobuf.Any supplement = 5;
//
bilibili.playershared.PlayArc play_arc = 6;
//
bilibili.playershared.QnTrialInfo qn_trial_info = 7;
//
bilibili.playershared.History history = 8;
}

View File

@ -2,17 +2,27 @@ syntax = "proto3";
package bilibili.playershared; package bilibili.playershared;
//
message ArcConf { message ArcConf {
bool is_support = 1; bool is_support = 1;
bool disable = 2; bool disable = 2;
ExtraContent extra_connent = 3; ExtraContent extra_content = 3;
repeated int32 unsupport_scene = 4; repeated int32 unsupport_scene = 4;
} }
//
message Button {
//
string text = 1;
//
string link = 2;
//
map<string, string> report_params = 3;
}
// //
enum CodeType { enum CodeType {
NOCODE = 0; // NOCODE = 0; //
CODE264 = 1; // H264 CODE264 = 1; // H264
CODE265 = 2; // H265 CODE265 = 2; // H265
CODEAV1 = 3; // AV1 CODEAV1 = 3; // AV1
@ -59,15 +69,17 @@ enum ConfType {
LISTEN = 36; LISTEN = 36;
} }
//
message ConfValue { message ConfValue {
oneof value { oneof value {
// dash // DASH
int32 switch_val = 1; int32 switch_val = 1;
// //
int32 selected_val = 2; int32 selected_val = 2;
} }
} }
//
message DeviceConf { message DeviceConf {
ConfValue conf_value = 1; ConfValue conf_value = 1;
} }
@ -94,15 +106,22 @@ message ExtraContent {
// //
message History { message History {
//
uint64 progress = 1;
// //
string toast = 2; HistoryInfo current_video = 1;
// //
uint64 last_play_cid = 3; HistoryInfo related_video = 2;
} }
message HistoryInfo {
//
int64 progress = 1;
//
int64 last_play_cid = 2;
}
//
message PlayDeviceConf { message PlayDeviceConf {
//
map<int32, DeviceConf> arc_confs = 1; map<int32, DeviceConf> arc_confs = 1;
} }
@ -118,7 +137,9 @@ message Scheme {
UNKNOWN = 0; UNKNOWN = 0;
SHOW_TOAST = 1; SHOW_TOAST = 1;
} }
//
ActionType action_type = 1; ActionType action_type = 1;
//
string toast = 2; string toast = 2;
} }
@ -337,7 +358,7 @@ message DolbyItem {
// //
Type type = 1; Type type = 1;
// //
DashItem audio = 2; repeated DashItem audio = 2;
} }
// HIRES伴音流信息 // HIRES伴音流信息
@ -370,21 +391,19 @@ message VolumeInfo {
// //
message PlayArc { message PlayArc {
//
VideoType video_type = 1; VideoType video_type = 1;
//
uint64 aid = 2; uint64 aid = 2;
//
uint64 cid = 3; uint64 cid = 3;
//
DrmTechType drm_tech_type = 4; DrmTechType drm_tech_type = 4;
} }
// -: PlayArcConf // -: PlayArcConf
message PlayArcConf { message PlayArcConf {
map<int32, PlayArc> arc_confs = 1; map<int32, ArcConf> arc_confs = 1;
}
// :
message QnTrialButton {
string text = 1;
string link = 2;
} }
// -: // -:
@ -398,19 +417,19 @@ message QnTrialInfo {
// //
int32 time_length = 4; int32 time_length = 4;
// //
QnTrialToast start_toast = 5; Toast start_toast = 5;
// //
QnTrialToast end_toast = 6; Toast end_toast = 6;
// //
QnTrialButton quality_open_tip_btn = 8; Button quality_open_tip_btn = 8;
} }
// : Toast信息 // Toast信息
message QnTrialToast { message Toast {
// toast文案 // toast文案
string text = 1; string text = 1;
// toast按钮 // toast按钮
QnTrialButton button = 2; Button button = 2;
} }
// //

View File

@ -2,11 +2,11 @@ syntax = "proto3";
package bilibili.web.interfaces.v1; package bilibili.web.interfaces.v1;
// //
message AccInfo { message AccInfo {
// // UID
int64 mid = 1; int64 mid = 1;
// //
string name = 2; string name = 2;
// //
string sex = 3; string sex = 3;