From 28e8a7cbf0c7cdada610733faa9c0dc89d7a257b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AF=92=E5=BD=A4?= <70561268+cxw620@users.noreply.github.com> Date: Tue, 28 Mar 2023 04:08:46 +0300 Subject: [PATCH] add: new united playurl grpc interface (#642) --- .../playerunite/pgcanymodel/pgcanymodel.proto | 14 + .../playerunite/ugcanymodel/ugcanymodel.proto | 27 + .../bilibili/app/playerunite/v1/playurl.proto | 45 + .../pgc/gateway/player/v2/playurl.proto | 1568 +++++----- .../bilibili/playershared/playershared.proto | 871 +++--- .../web/interfaces/v1/interfaces.proto | 2550 ++++++++--------- 6 files changed, 2590 insertions(+), 2485 deletions(-) create mode 100644 grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto create mode 100644 grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto create mode 100644 grpc_api/bilibili/app/playerunite/v1/playurl.proto diff --git a/grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto b/grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto new file mode 100644 index 0000000..cb1db04 --- /dev/null +++ b/grpc_api/bilibili/app/playerunite/pgcanymodel/pgcanymodel.proto @@ -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; +} + diff --git a/grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto b/grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto new file mode 100644 index 0000000..c5f0ac0 --- /dev/null +++ b/grpc_api/bilibili/app/playerunite/ugcanymodel/ugcanymodel.proto @@ -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; +} + diff --git a/grpc_api/bilibili/app/playerunite/v1/playurl.proto b/grpc_api/bilibili/app/playerunite/v1/playurl.proto new file mode 100644 index 0000000..2f381ba --- /dev/null +++ b/grpc_api/bilibili/app/playerunite/v1/playurl.proto @@ -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 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; +} diff --git a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto index 6a1d1e4..c238880 100644 --- a/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto +++ b/grpc_api/bilibili/pgc/gateway/player/v2/playurl.proto @@ -1,785 +1,785 @@ -syntax = "proto3"; - -package bilibili.pgc.gateway.player.v2; - -import "google/protobuf/timestamp.proto"; - -// 视频url -service PlayURL { - // 播放页信息 - rpc PlayView (PlayViewReq) returns (PlayViewReply); - // - rpc PlayViewComic(PlayViewReq) returns (PlayViewReply); -} - -// 角标信息 -message BadgeInfo { - // 角标文案 - string text = 1; - // 角标色值 - string bg_color = 2; - // 角标色值-夜间模式 - string bg_color_night = 3; - // 文案色值 - string text_color = 4; - // ? 新版本客户端已弃用此项 - GradientColor bg_gradient_color = 5; -} - -// Dialog组件: 底部显示 -message BottomDisplay { - // 文案 - TextInfo title = 1; - // 图标 - string icon = 2; -} - -// 按钮信息 -message ButtonInfo { - // 按钮文案 - string text = 1; - // 按钮字体色值 - string text_color = 2; - // 按钮字体色值-夜间模式 - string text_color_night = 3; - // 按钮背景色 - string bg_color = 4; - // 按钮背景色-夜间模式 - string bg_color_night = 5; - // 按钮链接 - string link = 6; - // 按钮动作类型 - string action_type = 7; - // 角标信息 - BadgeInfo badge_info = 8; - // 埋点上报信息 - Report report = 9; - // 左侧删除线样式文案 - string left_strikethrough_text = 10; - // 缩略按钮文案信息 - TextInfo simple_text_info = 11; - // 缩略按钮背景色值 - string simple_bg_color = 12; - // 缩略按钮字体色值-夜间模式 - string simple_bg_color_night = 13; - // - GradientColor bg_gradient_color = 14; - // - map order_report_params = 15; -} - -// 投屏限制. code = 0 时为无限制, 否则表示不不允许投屏并提示message -message CastTips { - // - int32 code = 1; - // - string message = 2; -} - -// 跳过片头/片尾配置 -message ClipInfo { - // - int64 material_no = 1; - // DASH分段始 - int32 start = 2; - // DASH分段终 - int32 end = 3; - // Clip类型 - ClipType clip_type = 4; - // 跳过片头/片尾时的提示语 - string toast_text = 5; - // - MultiView multi_view = 6; -} - -// 跳过片头/片尾配置: Clip类型 -enum ClipType { - NT_UNKNOWN = 0; // - CLIP_TYPE_OP = 1; // 跳过OP - CLIP_TYPE_ED = 2; // 跳过ED - CLIP_TYPE_HE = 3; // - CLIP_TYPE_MULTI_VIEW = 4; // -} - -// 编码类型 -enum CodeType { - NOCODE = 0; // 默认 - CODE264 = 1; // H.264 - CODE265 = 2; // H.265 -} - -// -message ContinuePlayInfo { - // - int64 continue_play_ep_id = 1; -} - -// 优惠券 -message Coupon { - // 优惠券token - string coupon_token = 1; - // 优惠券类型 - // 1:折扣券 2:满减券 3:兑换券 - int64 type = 2; - // 优惠券面值 - string value = 3; - // 优惠券使用描述 - string use_desc = 4; - // 优惠券标题 - string title = 5; - // 优惠券描述 - string desc = 6; - // 优惠券支付按钮文案 - string pay_button_text = 7; - // 优惠券支付按钮删除线文案 - string pay_button_text_line_through = 8; - // 实付金额 - string real_amount = 9; - // 使用过期时间 - google.protobuf.Timestamp expire_time = 10; -} - -// 优惠券信息 -message CouponInfo { - // 提示框信息 - CouponToast toast = 1; - // 弹窗信息 - PopWin pop_win = 2; -} - -// 优惠券提示框文案信息 -message CouponTextInfo { - // 提示框文案-播正片6分钟预览 - string positive_preview = 1; - // 提示框文案-播非正片分节ep - string section = 2; -} - -// 优惠券提示框信息 -message CouponToast { - // 提示框文案信息 - CouponTextInfo text_info = 1; - // 提示框按钮 - ButtonInfo button = 2; -} - -// dash条目 -message DashItem { - // 清晰度 - uint32 id = 1; - // 主线流 - string base_url = 2; - // 备用流 - repeated string backup_url = 3; - // 带宽 - uint32 bandwidth = 4; - // 编码id - uint32 codecid = 5; - // md5 - string md5 = 6; - // 视频大小 - uint64 size = 7; - // 帧率 - string frame_rate = 8; -} - -// dash视频流 -message DashVideo { - // 主线流 - string base_url = 1; - // 备用流 - repeated string backup_url = 2; - // 带宽 - uint32 bandwidth = 3; - // 编码id - uint32 codecid = 4; - // md5 - string md5 = 5; - // 大小 - uint64 size = 6; - // 伴音质量id - uint32 audio_id = 7; - // 是否非全二压 - bool no_rexcode = 8; - // 帧率 - string frame_rate = 9; - // 宽 - int32 width = 10; - // 高 - int32 height = 11; -} - -// 鉴权浮层 -message Dialog { - // 鉴权限制码 - int64 code = 1; - // 鉴权限制信息 - string msg = 2; - // 浮层类型 - string type = 3; - // 浮层样式类型 - string style_type = 4; - // 浮层配置 - DialogConfig config = 5; - // 标题 - TextInfo title = 6; - // 副标题 - TextInfo subtitle = 7; - // 图片信息 - ImageInfo image = 8; - // 按钮列表 - repeated ButtonInfo button = 9; - // 底部描述 - ButtonInfo bottom_desc = 10; - // 埋点上报信息 - Report report = 11; - // 倒计时 秒 - int32 count_down_sec = 12; - // 右下描述 - TextInfo right_bottom_desc = 13; - // - repeated BottomDisplay bottom_display = 14; -} - -// 鉴权浮层配置 -message DialogConfig { - // 是否显示高斯模糊背景图 - bool is_show_cover = 1; - // 是否响应转屏 - bool is_orientation_enable = 2; - // 是否响应上滑吸顶 - bool is_nested_scroll_enable = 3; - // 是否强制竖屏 - bool is_force_halfscreen_enable = 4; -} - -// 当前分辨率信息 -message Dimension { - // 宽 - int32 width = 1; - // 长 - int32 height = 2; - // 旋转角度 - int32 rotate = 3; -} - -// 杜比音频信息 -message DolbyItem { - // 杜比类型 - enum Type { - NONE = 0; // NONE - COMMON = 1; // 普通杜比音效 - ATMOS = 2; // 全景杜比音效 - } - // 杜比类型 - Type type = 1; - // 音频流 - DashItem audio = 2; -} - -// DRM技术类型 -enum DrmTechType { - NON = 0; // - FAIR_PLAY = 1; // -} - -// 播放结束页 -message EndPage { - // 鉴权浮层 - Dialog dialog = 1; - // 播放完后是否隐藏end_page - bool hide = 2; -} - -// 事件 -message Event { - // 震动 - Shake shake = 1; -} - -// ? 放映室提示语 -message FreyaConfig { - // - string desc = 1; - // - int32 type = 2; - // - int32 issued_cnt = 3; - // - bool is_always_show = 4; - // - int32 screen_number = 5; - // - int32 full_screen_number = 6; -} - -// 渐变色信息 -message GradientColor { - // - string start_color = 1; - // - string end_color = 2; -} - -// 高画质试看信息 -message HighDefinitionTrialInfo { - // - bool trial_able = 1; - // - int32 remaining_times = 2; - // - int32 start = 3; - // - int32 time_length = 4; - // - Toast start_toast = 5; - // - Toast end_toast = 6; - // - Report report = 7; - // - ButtonInfo quality_open_tip_btn = 8; - // - ButtonInfo no_longer_trial_btn = 9; -} - -// 图片信息 -message ImageInfo { - // 图片链接 - string url = 1; -} - -// -enum InlineScene { - UNKNOWN = 0; // - RELATED_EP = 1; // - HE = 2; // - SKIP = 3; // -} - -// -enum InlineType { - TYPE_UNKNOWN = 0; // - TYPE_WHOLE = 1; // - TYPE_HE_CLIP = 2; // - TYPE_PREVIEW = 3; // -} - -// -message MultiView { - // - string button_material = 1; - // - int64 ep_id = 2; - // - int64 cid = 3; - // - int64 avid = 4; -} - -// 大会员广告: 支付提示信息 -message PayTip { - // - string title = 1; - // - string url = 2; - // - string icon = 3; - // - int32 type = 4; - // - int32 show_type = 5; - // - string img = 6; - // - string bg_day_color = 7; - // - string bg_night_color = 8; - // - string bg_line_color = 9; - // - string bg_night_line_color = 10; - // - string text_color = 11; - // - string text_night_color = 12; - // - int64 view_start_time = 13; - // - repeated ButtonInfo button = 14; - // - int32 url_open_type = 15; - // - Report report = 16; - // - int32 angle_style = 17; - // - int32 report_type = 18; - // - map order_report_params = 19; -} - -// 禁用功能配置 -message PlayAbilityConf { - bool background_play_disable = 1; // 后台播放 - bool flip_disable = 2; // 镜像反转 - bool cast_disable = 3; // 投屏 - bool feedback_disable = 4; // 反馈 - bool subtitle_disable = 5; // 字幕 - bool playback_rate_disable = 6; // 播放速度 - bool time_up_disable = 7; // 定时停止 - bool playback_mode_disable = 8; // 播放方式 - bool scale_mode_disable = 9; // 画面尺寸 - bool like_disable = 10; // 赞 - bool dislike_disable = 11; // 踩 - bool coin_disable = 12; // 投币 - bool elec_disable = 13; // 充电 - bool share_disable = 14; // 分享 - bool screen_shot_disable = 15; // 截图 - bool lock_screen_disable = 16; // 锁定 - bool recommend_disable = 17; // 相关推荐 - bool playback_speed_disable = 18; // 播放速度 - bool definition_disable = 19; // 清晰度 - bool selections_disable = 20; // 选集 - bool next_disable = 21; // 下一集 - bool edit_dm_disable = 22; // 编辑弹幕 - bool small_window_disable = 23; // 小窗 - bool shake_disable = 24; // 震动 - bool outer_dm_disable = 25; // 外层面板弹幕设置 - bool inner_dm_disable = 26; // 三点内弹幕设置 - bool freya_enter_disable = 27; // 一起看入口 - bool dolby_disable = 28; // 杜比音效 - bool freya_full_disable = 29; // 全屏一起看入口 - bool skip_oped_switch_disable = 30; // - bool record_screen_disable = 31; // - bool color_optimize_disable = 32; // -} - -// 云控扩展配置信息 -message PlayAbilityExtConf { - // 自定义配置扩展信息 - bool allow_close_subtitle = 1; - // - FreyaConfig freya_config = 2; - // - CastTips cast_tips = 3; -} - -// 错误码 -enum PlayErr { - NoErr = 0; // - WithMultiDeviceLoginErr = 1; // 管控类型的错误码 -} - -// 其他业务信息 -message PlayViewBusinessInfo { - // 当前视频是否是预览 - bool is_preview = 1; - // 用户是否承包过 - bool bp = 2; - // drm使用 - string marlin_token = 3; - // 倍速动效色值 - string playback_speed_color = 4; - // - ContinuePlayInfo continue_play_info = 5; - // 跳过片头/片尾配置 - repeated ClipInfo clip_info = 6; - // - InlineType inline_type = 7; - // - int32 ep_whole_duration = 8; - // 当前分辨率信息 - Dimension dimension = 9; - // - map quality_ext_map = 10; - // - map exp_map = 11; - // DRM技术类型 - DrmTechType drm_tech_type = 12; -} - -// 播放页信息-响应 -message PlayViewReply { - // 视频流信息 - VideoInfo video_info = 1; - // 播放控件用户自定义配置 - PlayAbilityConf play_conf = 2; - // 业务需要的其他信息 - PlayViewBusinessInfo business = 3; - // 事件 - Event event = 4; - // 展示信息 - ViewInfo view_info = 5; - // 自定义配置扩展信息 - PlayAbilityExtConf play_ext_conf = 6; -} - -// 播放页信息-请求 -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; - // 流url强制是用域名 - // 0:允许使用ip 1:使用http 2:使用https - int32 force_host = 7; - // 是否4K - bool fourk = 8; - // 当前页spm - string spmid = 9; - // 上一页spm - string from_spmid = 10; - // 青少年模式 - int32 teenagers_mode = 11; - // 视频编码 - CodeType prefer_codec_type = 12; - // 是否强制请求预览视频 - bool is_preview = 13; - // 一起看房间id - int64 room_id = 14; - // 是否需要展示信息 - bool is_need_view_info = 15; - // 场景控制 - SceneControl scene_control = 16; - // - InlineScene inline_scene = 17; - // - int64 material_no = 18; -} - -// 弹窗信息 -message PopWin { - // 弹窗标题 老字段 - string title = 1; - // 优惠券列表 - repeated Coupon coupon = 2; - // 弹窗按钮列表 - repeated ButtonInfo button = 3; - // 底部文案 老字段 - string bottom_text = 4; - // 弹窗标题 新字段 - TextInfo pop_title = 5; - // 弹窗副标题 - TextInfo subtitle = 6; - // 底部描述 新字段 - ButtonInfo bottom_desc = 7; - // 弹窗小图 - string cover = 8; - // 弹窗类型 - string pop_type = 9; -} - -// 广告组件: 竖屏时视频下部提示栏 -message PromptBar { - // 主标题, 如: "本片含大会员专享内容" - TextInfo title = 1; - // 副标题, 如: "成为大会员可免费看全部剧集" - TextInfo sub_title = 2; - // 副标题前面的icon - string sub_title_icon = 3; - // 背景图 - string bg_image = 4; - // 背景渐变色 - GradientColor bg_gradient_color = 5; - // 按钮 - repeated ButtonInfo button = 6; - // 埋点上报信息 - Report report = 7; - // - string full_screen_ip_icon = 8; - // - GradientColor full_screen_bg_gradient_color = 9; -} - -// 云控拓展视频画质信息 -message QualityExtInfo { - // 是否支持试看 - bool trial_support = 1; -} - -// 埋点上报信息 -message Report { - // 曝光事件 - string show_event_id = 1; - // 点击事件 - string click_event_id = 2; - // 埋点透传参数 - string extends = 3; -} - -// 分段流条目 -message ResponseUrl { - // 分段序号 - uint32 order = 1; - // 分段时长 - uint64 length = 2; - // 分段大小 - uint64 size = 3; - // 主线流 - string url = 4; - // 备用流 - repeated string backup_url = 5; - // md5 - string md5 = 6; -} - -// 场景控制 -message SceneControl { - // 是否收藏播单 - bool fav_playlist = 1; - // 是否小窗 - bool small_window = 2; - // 是否画中画 - bool pip = 3; - // - bool was_he_inline = 4; - // - bool is_need_trial = 5; -} - -//分段视频流 -message SegmentVideo { - //分段视频流列表 - repeated ResponseUrl segment = 1; -} - -// 震动 -message Shake { - // 文件地址 - string file = 1; -} - -// 视频流信息 -message Stream { - // 元数据 - StreamInfo info = 1; - // 流数据 - oneof content { - // dash流 - DashVideo dash_video = 2; - // 分段流 - SegmentVideo segment_video = 3; - } -} - -// 流媒体元数据 -message StreamInfo { - // 清晰度 - uint32 quality = 1; - // 格式 - string format = 2; - // 格式描述 - string description = 3; - // 错误码 - uint32 err_code = 4; - // 不满足条件信息 - StreamLimit limit = 5; - // 是否需要vip - bool need_vip = 6; - // 是否需要登录 - bool need_login = 7; - // 是否完整 - bool intact = 8; - // 是否非全二压 - bool no_rexcode = 9; - // 清晰度属性位 - int64 attribute = 10; - // 新版格式描述 - string new_description = 11; - // 格式文字 - string display_desc = 12; - // 新版格式描述备注 - string superscript = 13; -} - -// 清晰度不满足条件信息 -message StreamLimit { - // 标题 - string title = 1; - // 跳转地址 - string uri = 2; - // 提示信息 - string msg = 3; -} - -// 文案信息 -message TextInfo { - // 文案 - string text = 1; - // 字体色值 - string textColor = 2; - // 字体色值-夜间模式 - string textColorNight = 3; -} - -// toast -message Toast { - // toast文案 老字段 - string text = 1; - // toast按钮 - ButtonInfo button = 2; - // 显示样式类型 - int32 show_style_type = 3; - // 图标 - string icon = 4; - // toast文案 新字段 - TextInfo toast_text = 5; - // 埋点上报信息 - Report report = 6; - // - map order_report_params = 7; -} - -// 视频url信息 -message VideoInfo { - // 视频清晰度 - uint32 quality = 1; - // 视频格式 - string format = 2; - // 视频时长 - uint64 timelength = 3; - // 视频编码id - uint32 video_codecid = 4; - // 视频流 - repeated Stream stream_list = 5; - // 伴音流 - repeated DashItem dash_audio = 6; - // 杜比伴音流 - DolbyItem dolby = 7; -} - -// 展示信息 -message ViewInfo { - // 鉴权浮层 - Dialog dialog = 1; - // toast - Toast toast = 2; - // 优惠券信息 - CouponInfo coupon_info = 3; - // 未购买的超前点播ep列表 - repeated int64 demand_no_pay_epids = 4; - // 播放结束页 - EndPage end_page = 5; - // - map exp_config = 6; - // 弹窗 - PopWin pop_win = 7; - // - PromptBar try_watch_prompt_bar = 8; - // - PayTip pay_tip = 9; - // - HighDefinitionTrialInfo high_definition_trial_info = 10; - // - map ext_dialog = 11; +syntax = "proto3"; + +package bilibili.pgc.gateway.player.v2; + +import "google/protobuf/timestamp.proto"; + +// 视频url +service PlayURL { + // 播放页信息 + rpc PlayView (PlayViewReq) returns (PlayViewReply); + // + rpc PlayViewComic(PlayViewReq) returns (PlayViewReply); +} + +// 角标信息 +message BadgeInfo { + // 角标文案 + string text = 1; + // 角标色值 + string bg_color = 2; + // 角标色值-夜间模式 + string bg_color_night = 3; + // 文案色值 + string text_color = 4; + // ? 新版本客户端已弃用此项 + GradientColor bg_gradient_color = 5; +} + +// Dialog组件: 底部显示 +message BottomDisplay { + // 文案 + TextInfo title = 1; + // 图标 + string icon = 2; +} + +// 按钮信息 +message ButtonInfo { + // 按钮文案 + string text = 1; + // 按钮字体色值 + string text_color = 2; + // 按钮字体色值-夜间模式 + string text_color_night = 3; + // 按钮背景色 + string bg_color = 4; + // 按钮背景色-夜间模式 + string bg_color_night = 5; + // 按钮链接 + string link = 6; + // 按钮动作类型 + string action_type = 7; + // 角标信息 + BadgeInfo badge_info = 8; + // 埋点上报信息 + Report report = 9; + // 左侧删除线样式文案 + string left_strikethrough_text = 10; + // 缩略按钮文案信息 + TextInfo simple_text_info = 11; + // 缩略按钮背景色值 + string simple_bg_color = 12; + // 缩略按钮字体色值-夜间模式 + string simple_bg_color_night = 13; + // + GradientColor bg_gradient_color = 14; + // + map order_report_params = 15; +} + +// 投屏限制. code = 0 时为无限制, 否则表示不不允许投屏并提示message +message CastTips { + // + int32 code = 1; + // + string message = 2; +} + +// 跳过片头/片尾配置 +message ClipInfo { + // + int64 material_no = 1; + // DASH分段始 + int32 start = 2; + // DASH分段终 + int32 end = 3; + // Clip类型 + ClipType clip_type = 4; + // 跳过片头/片尾时的提示语 + string toast_text = 5; + // + MultiView multi_view = 6; +} + +// 跳过片头/片尾配置: Clip类型 +enum ClipType { + NT_UNKNOWN = 0; // + CLIP_TYPE_OP = 1; // 跳过OP + CLIP_TYPE_ED = 2; // 跳过ED + CLIP_TYPE_HE = 3; // + CLIP_TYPE_MULTI_VIEW = 4; // +} + +// 编码类型 +enum CodeType { + NOCODE = 0; // 默认 + CODE264 = 1; // H.264 + CODE265 = 2; // H.265 +} + +// +message ContinuePlayInfo { + // + int64 continue_play_ep_id = 1; +} + +// 优惠券 +message Coupon { + // 优惠券token + string coupon_token = 1; + // 优惠券类型 + // 1:折扣券 2:满减券 3:兑换券 + int64 type = 2; + // 优惠券面值 + string value = 3; + // 优惠券使用描述 + string use_desc = 4; + // 优惠券标题 + string title = 5; + // 优惠券描述 + string desc = 6; + // 优惠券支付按钮文案 + string pay_button_text = 7; + // 优惠券支付按钮删除线文案 + string pay_button_text_line_through = 8; + // 实付金额 + string real_amount = 9; + // 使用过期时间 + google.protobuf.Timestamp expire_time = 10; +} + +// 优惠券信息 +message CouponInfo { + // 提示框信息 + CouponToast toast = 1; + // 弹窗信息 + PopWin pop_win = 2; +} + +// 优惠券提示框文案信息 +message CouponTextInfo { + // 提示框文案-播正片6分钟预览 + string positive_preview = 1; + // 提示框文案-播非正片分节ep + string section = 2; +} + +// 优惠券提示框信息 +message CouponToast { + // 提示框文案信息 + CouponTextInfo text_info = 1; + // 提示框按钮 + ButtonInfo button = 2; +} + +// dash条目 +message DashItem { + // 清晰度 + uint32 id = 1; + // 主线流 + string base_url = 2; + // 备用流 + repeated string backup_url = 3; + // 带宽 + uint32 bandwidth = 4; + // 编码id + uint32 codecid = 5; + // md5 + string md5 = 6; + // 视频大小 + uint64 size = 7; + // 帧率 + string frame_rate = 8; +} + +// dash视频流 +message DashVideo { + // 主线流 + string base_url = 1; + // 备用流 + repeated string backup_url = 2; + // 带宽 + uint32 bandwidth = 3; + // 编码id + uint32 codecid = 4; + // md5 + string md5 = 5; + // 大小 + uint64 size = 6; + // 伴音质量id + uint32 audio_id = 7; + // 是否非全二压 + bool no_rexcode = 8; + // 帧率 + string frame_rate = 9; + // 宽 + int32 width = 10; + // 高 + int32 height = 11; +} + +// 鉴权浮层 +message Dialog { + // 鉴权限制码 + int64 code = 1; + // 鉴权限制信息 + string msg = 2; + // 浮层类型 + string type = 3; + // 浮层样式类型 + string style_type = 4; + // 浮层配置 + DialogConfig config = 5; + // 标题 + TextInfo title = 6; + // 副标题 + TextInfo subtitle = 7; + // 图片信息 + ImageInfo image = 8; + // 按钮列表 + repeated ButtonInfo button = 9; + // 底部描述 + ButtonInfo bottom_desc = 10; + // 埋点上报信息 + Report report = 11; + // 倒计时 秒 + int32 count_down_sec = 12; + // 右下描述 + TextInfo right_bottom_desc = 13; + // + repeated BottomDisplay bottom_display = 14; +} + +// 鉴权浮层配置 +message DialogConfig { + // 是否显示高斯模糊背景图 + bool is_show_cover = 1; + // 是否响应转屏 + bool is_orientation_enable = 2; + // 是否响应上滑吸顶 + bool is_nested_scroll_enable = 3; + // 是否强制竖屏 + bool is_force_halfscreen_enable = 4; +} + +// 当前分辨率信息 +message Dimension { + // 宽 + int32 width = 1; + // 长 + int32 height = 2; + // 旋转角度 + int32 rotate = 3; +} + +// 杜比音频信息 +message DolbyItem { + // 杜比类型 + enum Type { + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 + } + // 杜比类型 + Type type = 1; + // 音频流 + DashItem audio = 2; +} + +// DRM技术类型 +enum DrmTechType { + NON = 0; // + FAIR_PLAY = 1; // +} + +// 播放结束页 +message EndPage { + // 鉴权浮层 + Dialog dialog = 1; + // 播放完后是否隐藏end_page + bool hide = 2; +} + +// 事件 +message Event { + // 震动 + Shake shake = 1; +} + +// ? 放映室提示语 +message FreyaConfig { + // + string desc = 1; + // + int32 type = 2; + // + int32 issued_cnt = 3; + // + bool is_always_show = 4; + // + int32 screen_number = 5; + // + int32 full_screen_number = 6; +} + +// 渐变色信息 +message GradientColor { + // + string start_color = 1; + // + string end_color = 2; +} + +// 高画质试看信息 +message HighDefinitionTrialInfo { + // + bool trial_able = 1; + // + int32 remaining_times = 2; + // + int32 start = 3; + // + int32 time_length = 4; + // + Toast start_toast = 5; + // + Toast end_toast = 6; + // + Report report = 7; + // + ButtonInfo quality_open_tip_btn = 8; + // + ButtonInfo no_longer_trial_btn = 9; +} + +// 图片信息 +message ImageInfo { + // 图片链接 + string url = 1; +} + +// +enum InlineScene { + UNKNOWN = 0; // + RELATED_EP = 1; // + HE = 2; // + SKIP = 3; // +} + +// +enum InlineType { + TYPE_UNKNOWN = 0; // + TYPE_WHOLE = 1; // + TYPE_HE_CLIP = 2; // + TYPE_PREVIEW = 3; // +} + +// +message MultiView { + // + string button_material = 1; + // + int64 ep_id = 2; + // + int64 cid = 3; + // + int64 avid = 4; +} + +// 大会员广告: 支付提示信息 +message PayTip { + // + string title = 1; + // + string url = 2; + // + string icon = 3; + // + int32 type = 4; + // + int32 show_type = 5; + // + string img = 6; + // + string bg_day_color = 7; + // + string bg_night_color = 8; + // + string bg_line_color = 9; + // + string bg_night_line_color = 10; + // + string text_color = 11; + // + string text_night_color = 12; + // + int64 view_start_time = 13; + // + repeated ButtonInfo button = 14; + // + int32 url_open_type = 15; + // + Report report = 16; + // + int32 angle_style = 17; + // + int32 report_type = 18; + // + map order_report_params = 19; +} + +// 禁用功能配置 +message PlayAbilityConf { + bool background_play_disable = 1; // 后台播放 + bool flip_disable = 2; // 镜像反转 + bool cast_disable = 3; // 投屏 + bool feedback_disable = 4; // 反馈 + bool subtitle_disable = 5; // 字幕 + bool playback_rate_disable = 6; // 播放速度 + bool time_up_disable = 7; // 定时停止 + bool playback_mode_disable = 8; // 播放方式 + bool scale_mode_disable = 9; // 画面尺寸 + bool like_disable = 10; // 赞 + bool dislike_disable = 11; // 踩 + bool coin_disable = 12; // 投币 + bool elec_disable = 13; // 充电 + bool share_disable = 14; // 分享 + bool screen_shot_disable = 15; // 截图 + bool lock_screen_disable = 16; // 锁定 + bool recommend_disable = 17; // 相关推荐 + bool playback_speed_disable = 18; // 播放速度 + bool definition_disable = 19; // 清晰度 + bool selections_disable = 20; // 选集 + bool next_disable = 21; // 下一集 + bool edit_dm_disable = 22; // 编辑弹幕 + bool small_window_disable = 23; // 小窗 + bool shake_disable = 24; // 震动 + bool outer_dm_disable = 25; // 外层面板弹幕设置 + bool inner_dm_disable = 26; // 三点内弹幕设置 + bool freya_enter_disable = 27; // 一起看入口 + bool dolby_disable = 28; // 杜比音效 + bool freya_full_disable = 29; // 全屏一起看入口 + bool skip_oped_switch_disable = 30; // + bool record_screen_disable = 31; // + bool color_optimize_disable = 32; // +} + +// 云控扩展配置信息 +message PlayAbilityExtConf { + // 自定义配置扩展信息 + bool allow_close_subtitle = 1; + // + FreyaConfig freya_config = 2; + // + CastTips cast_tips = 3; +} + +// 错误码 +enum PlayErr { + NoErr = 0; // + WithMultiDeviceLoginErr = 1; // 管控类型的错误码 +} + +// 其他业务信息 +message PlayViewBusinessInfo { + // 当前视频是否是预览 + bool is_preview = 1; + // 用户是否承包过 + bool bp = 2; + // drm使用 + string marlin_token = 3; + // 倍速动效色值 + string playback_speed_color = 4; + // + ContinuePlayInfo continue_play_info = 5; + // 跳过片头/片尾配置 + repeated ClipInfo clip_info = 6; + // + InlineType inline_type = 7; + // + int32 ep_whole_duration = 8; + // 当前分辨率信息 + Dimension dimension = 9; + // + map quality_ext_map = 10; + // + map exp_map = 11; + // DRM技术类型 + DrmTechType drm_tech_type = 12; +} + +// 播放页信息-响应 +message PlayViewReply { + // 视频流信息 + VideoInfo video_info = 1; + // 播放控件用户自定义配置 + PlayAbilityConf play_conf = 2; + // 业务需要的其他信息 + PlayViewBusinessInfo business = 3; + // 事件 + Event event = 4; + // 展示信息 + ViewInfo view_info = 5; + // 自定义配置扩展信息 + PlayAbilityExtConf play_ext_conf = 6; +} + +// 播放页信息-请求 +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; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 force_host = 7; + // 是否4K + bool fourk = 8; + // 当前页spm + string spmid = 9; + // 上一页spm + string from_spmid = 10; + // 青少年模式 + int32 teenagers_mode = 11; + // 视频编码 + CodeType prefer_codec_type = 12; + // 是否强制请求预览视频 + bool is_preview = 13; + // 一起看房间id + int64 room_id = 14; + // 是否需要展示信息 + bool is_need_view_info = 15; + // 场景控制 + SceneControl scene_control = 16; + // + InlineScene inline_scene = 17; + // + int64 material_no = 18; +} + +// 弹窗信息 +message PopWin { + // 弹窗标题 老字段 + string title = 1; + // 优惠券列表 + repeated Coupon coupon = 2; + // 弹窗按钮列表 + repeated ButtonInfo button = 3; + // 底部文案 老字段 + string bottom_text = 4; + // 弹窗标题 新字段 + TextInfo pop_title = 5; + // 弹窗副标题 + TextInfo subtitle = 6; + // 底部描述 新字段 + ButtonInfo bottom_desc = 7; + // 弹窗小图 + string cover = 8; + // 弹窗类型 + string pop_type = 9; +} + +// 广告组件: 竖屏时视频下部提示栏 +message PromptBar { + // 主标题, 如: "本片含大会员专享内容" + TextInfo title = 1; + // 副标题, 如: "成为大会员可免费看全部剧集" + TextInfo sub_title = 2; + // 副标题前面的icon + string sub_title_icon = 3; + // 背景图 + string bg_image = 4; + // 背景渐变色 + GradientColor bg_gradient_color = 5; + // 按钮 + repeated ButtonInfo button = 6; + // 埋点上报信息 + Report report = 7; + // + string full_screen_ip_icon = 8; + // + GradientColor full_screen_bg_gradient_color = 9; +} + +// 云控拓展视频画质信息 +message QualityExtInfo { + // 是否支持试看 + bool trial_support = 1; +} + +// 埋点上报信息 +message Report { + // 曝光事件 + string show_event_id = 1; + // 点击事件 + string click_event_id = 2; + // 埋点透传参数 + string extends = 3; +} + +// 分段流条目 +message ResponseUrl { + // 分段序号 + uint32 order = 1; + // 分段时长 + uint64 length = 2; + // 分段大小 + uint64 size = 3; + // 主线流 + string url = 4; + // 备用流 + repeated string backup_url = 5; + // md5 + string md5 = 6; +} + +// 场景控制 +message SceneControl { + // 是否收藏播单 + bool fav_playlist = 1; + // 是否小窗 + bool small_window = 2; + // 是否画中画 + bool pip = 3; + // + bool was_he_inline = 4; + // + bool is_need_trial = 5; +} + +//分段视频流 +message SegmentVideo { + //分段视频流列表 + repeated ResponseUrl segment = 1; +} + +// 震动 +message Shake { + // 文件地址 + string file = 1; +} + +// 视频流信息 +message Stream { + // 元数据 + StreamInfo info = 1; + // 流数据 + oneof content { + // dash流 + DashVideo dash_video = 2; + // 分段流 + SegmentVideo segment_video = 3; + } +} + +// 流媒体元数据 +message StreamInfo { + // 清晰度 + uint32 quality = 1; + // 格式 + string format = 2; + // 格式描述 + string description = 3; + // 错误码 + uint32 err_code = 4; + // 不满足条件信息 + StreamLimit limit = 5; + // 是否需要vip + bool need_vip = 6; + // 是否需要登录 + bool need_login = 7; + // 是否完整 + bool intact = 8; + // 是否非全二压 + bool no_rexcode = 9; + // 清晰度属性位 + int64 attribute = 10; + // 新版格式描述 + string new_description = 11; + // 格式文字 + string display_desc = 12; + // 新版格式描述备注 + string superscript = 13; +} + +// 清晰度不满足条件信息 +message StreamLimit { + // 标题 + string title = 1; + // 跳转地址 + string uri = 2; + // 提示信息 + string msg = 3; +} + +// 文案信息 +message TextInfo { + // 文案 + string text = 1; + // 字体色值 + string textColor = 2; + // 字体色值-夜间模式 + string textColorNight = 3; +} + +// toast +message Toast { + // toast文案 老字段 + string text = 1; + // toast按钮 + ButtonInfo button = 2; + // 显示样式类型 + int32 show_style_type = 3; + // 图标 + string icon = 4; + // toast文案 新字段 + TextInfo toast_text = 5; + // 埋点上报信息 + Report report = 6; + // + map order_report_params = 7; +} + +// 视频url信息 +message VideoInfo { + // 视频清晰度 + uint32 quality = 1; + // 视频格式 + string format = 2; + // 视频时长 + uint64 timelength = 3; + // 视频编码id + uint32 video_codecid = 4; + // 视频流 + repeated Stream stream_list = 5; + // 伴音流 + repeated DashItem dash_audio = 6; + // 杜比伴音流 + DolbyItem dolby = 7; +} + +// 展示信息 +message ViewInfo { + // 鉴权浮层 + Dialog dialog = 1; + // toast + Toast toast = 2; + // 优惠券信息 + CouponInfo coupon_info = 3; + // 未购买的超前点播ep列表 + repeated int64 demand_no_pay_epids = 4; + // 播放结束页 + EndPage end_page = 5; + // + map exp_config = 6; + // 弹窗 + PopWin pop_win = 7; + // + PromptBar try_watch_prompt_bar = 8; + // + PayTip pay_tip = 9; + // + HighDefinitionTrialInfo high_definition_trial_info = 10; + // + map ext_dialog = 11; } \ No newline at end of file diff --git a/grpc_api/bilibili/playershared/playershared.proto b/grpc_api/bilibili/playershared/playershared.proto index d272b7a..47d586c 100644 --- a/grpc_api/bilibili/playershared/playershared.proto +++ b/grpc_api/bilibili/playershared/playershared.proto @@ -1,426 +1,445 @@ -syntax = "proto3"; - -package bilibili.playershared; - - -message ArcConf { - bool is_support = 1; - bool disable = 2; - ExtraContent extra_connent = 3; - repeated int32 unsupport_scene = 4; -} - -// 视频编码 -enum CodeType { - NOCODE = 0; // - CODE264 = 1; // H264 - CODE265 = 2; // H265 - CODEAV1 = 3; // AV1 -} - -// 功能类型 -enum ConfType { - NoType = 0; - FLIPCONF = 1; - CASTCONF = 2; - FEEDBACK = 3; - SUBTITLE = 4; - PLAYBACKRATE = 5; - TIMEUP = 6; - PLAYBACKMODE = 7; - SCALEMODE = 8; - BACKGROUNDPLAY = 9; - LIKE = 10; - DISLIKE = 11; - COIN = 12; - ELEC = 13; - SHARE = 14; - SCREENSHOT = 15; - LOCKSCREEN = 16; - RECOMMEND = 17; - PLAYBACKSPEED = 18; - DEFINITION = 19; - SELECTIONS = 20; - NEXT = 21; - EDITDM = 22; - SMALLWINDOW = 23; - SHAKE = 24; - OUTERDM = 25; - INNERDM = 26; - PANORAMA = 27; - DOLBY = 28; - COLORFILTER = 29; - LOSSLESS = 30; - FREYAENTER = 31; - FREYAFULLENTER = 32; - SKIPOPED = 33; - RECORDSCREEN = 34; - DUBBING = 35; - LISTEN = 36; -} - -message ConfValue { - oneof value { - // dash流 - int32 switch_val = 1; - // 分段流 - int32 selected_val = 2; - } -} - -message DeviceConf { - ConfValue conf_value = 1; -} - -// DRM类型 -enum DrmTechType { - // - UNKNOWN_DRM = 0; - // - FAIR_PLAY = 1; - // - WIDE_VINE = 2; - // 哔哩哔哩自研DRM - BILI_DRM = 3; -} - -// ? 错误码补充信息 -message ExtraContent { - // - string disable_reason = 1; - // - uint64 disable_code = 2; -} - -// 播放历史 -message History { - // 播放进度 - uint64 progress = 1; - // - string toast = 2; - // - uint64 last_play_cid = 3; -} - -message PlayDeviceConf { - map arc_confs = 1; -} - -// 错误码 -enum PlayErr { - NoErr = 0; // - WithMultiDeviceLoginErr = 1; // 管控类型的错误码 -} - -// 方案 -message Scheme { - enum ActionType { - UNKNOWN = 0; - SHOW_TOAST = 1; - } - ActionType action_type = 1; - string toast = 2; -} - -// -enum UnsupportScene { - // - UNKNOWN_SCENE = 0; - // - PREMIERE = 1; -} - -// 视频类型 -enum VideoType { - UNKNOWN = 0; - // 用户生成内容 - UGC = 1; - // 专业生产内容 - PGC = 2; -} - -// 视频流信息 -message Stream { - // 元数据 - StreamInfo stream_info = 1; - // 流数据 - oneof content { - // dash流 - DashVideo dash_video = 2; - // 分段流 - SegmentVideo segment_video = 3; - } -} - -// 视频流信息: 元数据 -message StreamInfo { - // 清晰度 - uint32 quality = 1; - // 格式 - string format = 2; - // 格式描述 - string description = 3; - // 错误码 - uint32 err_code = 4; - // 不满足条件信息 - StreamLimit limit = 5; - // 是否需要vip - bool need_vip = 6; - // 是否需要登录 - bool need_login = 7; - // 是否完整 - bool intact = 8; - // 是否非全二压 - bool no_rexcode = 9; - // 清晰度属性位 - int64 attribute = 10; - // 新版格式描述 - string new_description = 11; - // 格式文字 - string display_desc = 12; - // 新版格式描述备注 - string superscript = 13; - // - bool vip_free = 14; - // - string subtitle = 15; - // 方案 - Scheme scheme = 16; - // 支持drm - bool support_drm = 17; -} - -// Dash条目 -message DashItem { - // 清晰度 - uint32 id = 1; - // 主线流 - string base_url = 2; - // 备用流 - repeated string backup_url = 3; - // 带宽 - uint32 bandwidth = 4; - // 编码id - uint32 codecid = 5; - // md5 - string md5 = 6; - // 大小 - uint64 size = 7; - // 帧率 - string frame_rate = 8; - // DRM密钥 - string widevine_pssh = 9; -} - -// 视频流信息: dash流 -message DashVideo { - // 主线流 - string base_url = 1; - // 备用流 - repeated string backup_url = 2; - // 带宽 - uint32 bandwidth = 3; - // 编码id - uint32 codecid = 4; - // md5 - string md5 = 5; - // 大小 - uint64 size = 6; - // 伴音质量id - uint32 audio_id = 7; - // 是否非全二压 - bool no_rexcode = 8; - // 帧率 - string frame_rate = 9; - // 宽 - int32 width = 10; - // 高 - int32 height = 11; - // DRM密钥 - string widevine_pssh = 12; -} - -// 视频流信息: 分段流 -message SegmentVideo { - repeated ResponseUrl segment = 1; -} - -// 分段流条目 -message ResponseUrl { - // 分段序号 - uint32 order = 1; - // 分段时长 - uint64 length = 2; - // 分段大小 - uint64 size = 3; - // 主线流 - string url = 4; - // 备用流 - repeated string backup_url = 5; - // md5 - string md5 = 6; -} - -// Dash Response, 未使用 -message ResponseDash { - repeated DashItem video = 1; - repeated DashItem audio = 2; -} - -// 视频流信息: 流媒体元数据: 清晰度不满足条件信息 -message StreamLimit { - // 标题 - string title = 1; - // 跳转地址 - string uri = 2; - // 提示信息 - string msg = 3; -} - - -// 播放页信息-请求: 音视频VOD -message VideoVod { - // 视频aid - int32 aid = 1; - // 视频cid - int32 cid = 2; - // 清晰度 - uint64 qn = 3; - // 视频流版本 - int32 fnver = 4; - // 视频流格式 - int32 fnval = 5; - // 下载模式 - // 0:播放 1:flv下载 2:dash下载 - uint32 download = 6; - // 流url强制是用域名 - // 0:允许使用ip 1:使用http 2:使用https - int32 force_host = 7; - // 是否4K - bool fourk = 8; - // 视频编码 - CodeType prefer_codec_type = 9; - // 响度均衡 - uint64 voice_balance = 10; -} - -// 播放页信息-响应: VOD音视频信息 -message VodInfo { - // 视频清晰度 - uint32 quality = 1; - // 视频格式 - string format = 2; - // 视频时长 - uint64 timelength = 3; - // 视频编码id - uint32 video_codecid = 4; - // 视频流 - repeated Stream stream_list = 5; - // 伴音流 - repeated DashItem dash_audio = 6; - // 杜比伴音流 - DolbyItem dolby = 7; - // 响度均衡操作信息 - VolumeInfo volume = 8; - // HIRES伴音流信息 - LossLessItem loss_less_item = 9; -} - -// 杜比伴音流信息 -message DolbyItem { - // 杜比类型 - enum Type { - NONE = 0; // NONE - COMMON = 1; // 普通杜比音效 - ATMOS = 2; // 全景杜比音效 - } - // 杜比类型 - Type type = 1; - // 音频流 - DashItem audio = 2; -} - -// HIRES伴音流信息 -message LossLessItem { - // 是否为hires - bool is_lossless_audio = 1; - // 音频流信息 - DashItem audio = 2; - // 是否需要大会员 - bool need_vip = 3; -} - -// 响度均衡操作信息 -message VolumeInfo { - // Measured integrated loudness 实际综合响度 - double measured_i = 1; - // Measured loudness range 实际响度范围 - double measured_lra = 2; - // Measured true peak 实际响度真峰值 - double measured_tp = 3; - // Measured threshold 实际响度阈值 - double measured_threshold = 4; - // Target offset gain(Gain is applied before the true-peak limiter) 目标增益Offset(增益在真实峰值限制器之前应用) - double target_offset = 5; - // Target integrated loudness 目标综合响度 - double target_i = 6; - // Target true peak 目标响度真峰值 - double target_tp = 7; -} - -// -message PlayArc { - VideoType video_type = 1; - uint64 aid = 2; - uint64 cid = 3; - DrmTechType drm_tech_type = 4; -} - -// 播放页信息-响应: PlayArcConf -message PlayArcConf { - map arc_confs = 1; -} - -// 高画质试看信息: 按钮 -message QnTrialButton { - string text = 1; - string link = 2; -} - -// 播放页信息-响应: 高画质试看信息 -message QnTrialInfo { - // 能否试看高画质 - bool trial_able = 1; - // - int32 remaining_times = 2; - // - int32 start = 3; - // - int32 time_length = 4; - // - QnTrialToast start_toast = 5; - // - QnTrialToast end_toast = 6; - // - QnTrialButton quality_open_tip_btn = 8; -} - -// 高画质试看信息: Toast信息 -message QnTrialToast { - // toast文案 老字段 - string text = 1; - // toast按钮 - QnTrialButton button = 2; -} - -// 事件 -message Event { - // 震动 - Shake shake = 1; -} - -// 震动 -message Shake { - // - string file = 1; -} +syntax = "proto3"; + +package bilibili.playershared; + +// +message ArcConf { + bool is_support = 1; + bool disable = 2; + ExtraContent extra_content = 3; + repeated int32 unsupport_scene = 4; +} + +// 按钮组件 +message Button { + // 按钮文本 + string text = 1; + // 按钮跳转链接 + string link = 2; + // 埋点上报相关 + map report_params = 3; +} + +// 视频编码 +enum CodeType { + NOCODE = 0; // 不指定 + CODE264 = 1; // H264 + CODE265 = 2; // H265 + CODEAV1 = 3; // AV1 +} + +// 功能类型 +enum ConfType { + NoType = 0; + FLIPCONF = 1; + CASTCONF = 2; + FEEDBACK = 3; + SUBTITLE = 4; + PLAYBACKRATE = 5; + TIMEUP = 6; + PLAYBACKMODE = 7; + SCALEMODE = 8; + BACKGROUNDPLAY = 9; + LIKE = 10; + DISLIKE = 11; + COIN = 12; + ELEC = 13; + SHARE = 14; + SCREENSHOT = 15; + LOCKSCREEN = 16; + RECOMMEND = 17; + PLAYBACKSPEED = 18; + DEFINITION = 19; + SELECTIONS = 20; + NEXT = 21; + EDITDM = 22; + SMALLWINDOW = 23; + SHAKE = 24; + OUTERDM = 25; + INNERDM = 26; + PANORAMA = 27; + DOLBY = 28; + COLORFILTER = 29; + LOSSLESS = 30; + FREYAENTER = 31; + FREYAFULLENTER = 32; + SKIPOPED = 33; + RECORDSCREEN = 34; + DUBBING = 35; + LISTEN = 36; +} + +// +message ConfValue { + oneof value { + // DASH流 + int32 switch_val = 1; + // 分段流 + int32 selected_val = 2; + } +} + +// +message DeviceConf { + ConfValue conf_value = 1; +} + +// DRM类型 +enum DrmTechType { + // + UNKNOWN_DRM = 0; + // + FAIR_PLAY = 1; + // + WIDE_VINE = 2; + // 哔哩哔哩自研DRM + BILI_DRM = 3; +} + +// ? 错误码补充信息 +message ExtraContent { + // + string disable_reason = 1; + // + uint64 disable_code = 2; +} + +// 播放历史 +message History { + // + HistoryInfo current_video = 1; + // + HistoryInfo related_video = 2; +} + +message HistoryInfo { + // + int64 progress = 1; + // + int64 last_play_cid = 2; +} + +// +message PlayDeviceConf { + // + map arc_confs = 1; +} + +// 错误码 +enum PlayErr { + NoErr = 0; // + WithMultiDeviceLoginErr = 1; // 管控类型的错误码 +} + +// 方案 +message Scheme { + enum ActionType { + UNKNOWN = 0; + SHOW_TOAST = 1; + } + // + ActionType action_type = 1; + // + string toast = 2; +} + +// +enum UnsupportScene { + // + UNKNOWN_SCENE = 0; + // + PREMIERE = 1; +} + +// 视频类型 +enum VideoType { + UNKNOWN = 0; + // 用户生成内容 + UGC = 1; + // 专业生产内容 + PGC = 2; +} + +// 视频流信息 +message Stream { + // 元数据 + StreamInfo stream_info = 1; + // 流数据 + oneof content { + // dash流 + DashVideo dash_video = 2; + // 分段流 + SegmentVideo segment_video = 3; + } +} + +// 视频流信息: 元数据 +message StreamInfo { + // 清晰度 + uint32 quality = 1; + // 格式 + string format = 2; + // 格式描述 + string description = 3; + // 错误码 + uint32 err_code = 4; + // 不满足条件信息 + StreamLimit limit = 5; + // 是否需要vip + bool need_vip = 6; + // 是否需要登录 + bool need_login = 7; + // 是否完整 + bool intact = 8; + // 是否非全二压 + bool no_rexcode = 9; + // 清晰度属性位 + int64 attribute = 10; + // 新版格式描述 + string new_description = 11; + // 格式文字 + string display_desc = 12; + // 新版格式描述备注 + string superscript = 13; + // + bool vip_free = 14; + // + string subtitle = 15; + // 方案 + Scheme scheme = 16; + // 支持drm + bool support_drm = 17; +} + +// Dash条目 +message DashItem { + // 清晰度 + uint32 id = 1; + // 主线流 + string base_url = 2; + // 备用流 + repeated string backup_url = 3; + // 带宽 + uint32 bandwidth = 4; + // 编码id + uint32 codecid = 5; + // md5 + string md5 = 6; + // 大小 + uint64 size = 7; + // 帧率 + string frame_rate = 8; + // DRM密钥 + string widevine_pssh = 9; +} + +// 视频流信息: dash流 +message DashVideo { + // 主线流 + string base_url = 1; + // 备用流 + repeated string backup_url = 2; + // 带宽 + uint32 bandwidth = 3; + // 编码id + uint32 codecid = 4; + // md5 + string md5 = 5; + // 大小 + uint64 size = 6; + // 伴音质量id + uint32 audio_id = 7; + // 是否非全二压 + bool no_rexcode = 8; + // 帧率 + string frame_rate = 9; + // 宽 + int32 width = 10; + // 高 + int32 height = 11; + // DRM密钥 + string widevine_pssh = 12; +} + +// 视频流信息: 分段流 +message SegmentVideo { + repeated ResponseUrl segment = 1; +} + +// 分段流条目 +message ResponseUrl { + // 分段序号 + uint32 order = 1; + // 分段时长 + uint64 length = 2; + // 分段大小 + uint64 size = 3; + // 主线流 + string url = 4; + // 备用流 + repeated string backup_url = 5; + // md5 + string md5 = 6; +} + +// Dash Response, 未使用 +message ResponseDash { + repeated DashItem video = 1; + repeated DashItem audio = 2; +} + +// 视频流信息: 流媒体元数据: 清晰度不满足条件信息 +message StreamLimit { + // 标题 + string title = 1; + // 跳转地址 + string uri = 2; + // 提示信息 + string msg = 3; +} + + +// 播放页信息-请求: 音视频VOD +message VideoVod { + // 视频aid + int32 aid = 1; + // 视频cid + int32 cid = 2; + // 清晰度 + uint64 qn = 3; + // 视频流版本 + int32 fnver = 4; + // 视频流格式 + int32 fnval = 5; + // 下载模式 + // 0:播放 1:flv下载 2:dash下载 + uint32 download = 6; + // 流url强制是用域名 + // 0:允许使用ip 1:使用http 2:使用https + int32 force_host = 7; + // 是否4K + bool fourk = 8; + // 视频编码 + CodeType prefer_codec_type = 9; + // 响度均衡 + uint64 voice_balance = 10; +} + +// 播放页信息-响应: VOD音视频信息 +message VodInfo { + // 视频清晰度 + uint32 quality = 1; + // 视频格式 + string format = 2; + // 视频时长 + uint64 timelength = 3; + // 视频编码id + uint32 video_codecid = 4; + // 视频流 + repeated Stream stream_list = 5; + // 伴音流 + repeated DashItem dash_audio = 6; + // 杜比伴音流 + DolbyItem dolby = 7; + // 响度均衡操作信息 + VolumeInfo volume = 8; + // HIRES伴音流信息 + LossLessItem loss_less_item = 9; +} + +// 杜比伴音流信息 +message DolbyItem { + // 杜比类型 + enum Type { + NONE = 0; // NONE + COMMON = 1; // 普通杜比音效 + ATMOS = 2; // 全景杜比音效 + } + // 杜比类型 + Type type = 1; + // 音频流 + repeated DashItem audio = 2; +} + +// HIRES伴音流信息 +message LossLessItem { + // 是否为hires + bool is_lossless_audio = 1; + // 音频流信息 + DashItem audio = 2; + // 是否需要大会员 + bool need_vip = 3; +} + +// 响度均衡操作信息 +message VolumeInfo { + // Measured integrated loudness 实际综合响度 + double measured_i = 1; + // Measured loudness range 实际响度范围 + double measured_lra = 2; + // Measured true peak 实际响度真峰值 + double measured_tp = 3; + // Measured threshold 实际响度阈值 + double measured_threshold = 4; + // Target offset gain(Gain is applied before the true-peak limiter) 目标增益Offset(增益在真实峰值限制器之前应用) + double target_offset = 5; + // Target integrated loudness 目标综合响度 + double target_i = 6; + // Target true peak 目标响度真峰值 + double target_tp = 7; +} + +// +message PlayArc { + // + VideoType video_type = 1; + // + uint64 aid = 2; + // + uint64 cid = 3; + // + DrmTechType drm_tech_type = 4; +} + +// 播放页信息-响应: PlayArcConf +message PlayArcConf { + map arc_confs = 1; +} + +// 播放页信息-响应: 高画质试看信息 +message QnTrialInfo { + // 能否试看高画质 + bool trial_able = 1; + // + int32 remaining_times = 2; + // + int32 start = 3; + // + int32 time_length = 4; + // + Toast start_toast = 5; + // + Toast end_toast = 6; + // + Button quality_open_tip_btn = 8; +} + +// Toast信息 +message Toast { + // toast文案 + string text = 1; + // toast按钮 + Button button = 2; +} + +// 事件 +message Event { + // 震动 + Shake shake = 1; +} + +// 震动 +message Shake { + // + string file = 1; +} diff --git a/grpc_api/bilibili/web/interfaces/v1/interfaces.proto b/grpc_api/bilibili/web/interfaces/v1/interfaces.proto index 62ca35f..190c623 100644 --- a/grpc_api/bilibili/web/interfaces/v1/interfaces.proto +++ b/grpc_api/bilibili/web/interfaces/v1/interfaces.proto @@ -1,1275 +1,1275 @@ -syntax = "proto3"; - -package bilibili.web.interfaces.v1; - -// -message AccInfo { - // - int64 mid = 1; - // - string name = 2; - // - string sex = 3; - // - string face = 4; - // - string sign = 5; -} - -// -message AccountCard { - // - string mid = 1; - // - string name = 2; - // - string sex = 3; - // - string rank = 4; - // - string face = 5; - // - int32 spacesta = 6; - // - string sign = 7; - // - CardLevelInfo level_info = 8; - // - PendantInfo pendant = 9; - // - NameplateInfo nameplate = 10; - // - OfficialInfo official = 11; - // - OfficialVerify official_verify = 12; - // - CardVip vip = 13; - // - int64 fans = 14; - // - int64 friend = 15; - // - int64 attention = 16; -} - -// -message ActivityArchiveReply { - // - Arc arc = 1; - // - string bvid = 2; - // - repeated Page pages = 3; - // - ReqUser req_user = 4; - // - repeated Staff staff = 5; - // - OperationRelate right_relate = 6; - // - OperationRelate bottom_relate = 7; -} - -// -message ActivityArchiveReq { - // - int64 aid = 1; - // - string bvid = 2; - // - string activity_key = 3; -} - -// -message ActivityEpisode { - // - int64 id = 1; - // - int64 aid = 2; - // - string bvid = 3; - // - int64 cid = 4; - // - string title = 5; - // - string cover = 6; - // - Author author = 7; - // - Rights rights = 8; -} - -// -message ActivityGame { - // - repeated ActivityGameIframe iframes = 1; - // - string disclaimer = 2; - // - string disclaimer_url = 3; -} - -// -message ActivityGameIframe { - // - string url = 1; - // - int64 height = 2; -} - -// -message ActivityLive { - // - int64 room_id = 1; - // - int64 now_time = 2; - // - int64 start_time = 3; - // - int64 end_time = 4; - // - string hover_pic = 5; - // - string hover_jump_url = 6; - // - int64 break_cycle = 7; - // - repeated LiveTimeline timeline = 8; - // - OperationRelate operation_relate = 9; - // - int64 reply_type = 10; - // - int64 reply_id = 11; - // - string hover_pic_close = 12; - // - string gift_disclaimer = 13; -} - -// -message ActivityLiveTimeInfoReply { - // - int64 now_time = 1; - // - int64 start_time = 2; - // - int64 end_time = 3; - // - repeated LiveTimeline timeline = 4; -} - -// -message ActivityLiveTimeInfoReq { - // - string activity_key = 1; -} - -// -message ActivitySeasonReply { - // - ActivitySeasonStatus status = 1; - // - string title = 2; - // - ActivityLive live = 3; - // - ActivitySubscribe subscribe = 4; - // - ActivityGame game = 5; - // - ActivityView view = 6; - // - ActivityTheme theme = 7; -} - -// -message ActivitySeasonReq { - // - int64 aid = 1; - // - string bvid = 2; - // - string activity_key = 3; -} - -// -message ActivitySeasonSection { - // - int64 id = 1; - // - string title = 2; - // - int64 type = 3; - // - repeated ActivityEpisode episodes = 4; -} - -// -enum ActivitySeasonStatus { - StatusNone = 0; // - StatusLive = 1; // - StatusView = 2; // -} - -// -message ActivitySubscribe { - // - bool status = 1; - // - string title = 2; - // - string button_title = 3; - // - string button_selected_title = 4; - // - int64 season_stat_view = 5; - // - int64 season_stat_danmaku = 6; - // - OrderType order_type = 7; - oneof param { - // - ReserveActivityParam reserve_activity_param = 8; - // - FavSeasonParam fav_season_param = 9; - // - JumpURLParam jump_URL_param = 10; - } -} - -// -message ActivityTheme { - // - string base_color = 1; - // - string loading_bg_color = 2; - // - string operated_bg_color = 3; - // - string default_element_color = 4; - // - string hover_element_color = 5; - // - string selected_element_color = 6; - // - string base_font_color = 7; - // - string info_font_color = 8; - // - string mask_bg_color = 9; - // - string page_bg_color = 10; - // - string center_logo_img = 11; - // - string page_bg_img = 12; - // - string decorations2233_img = 13; - // - string main_banner_bg_img = 14; - // - string main_banner_title_img = 15; - // - string like_animation_img = 16; - // - string combo_like_img = 17; - // - string combo_coin_img = 18; - // - string combo_fav_img = 19; - // - string arrow_btn_img = 20; - // - string share_icon_bg_img = 21; - // - string live_list_location_img = 22; - // - string live_list_location_img_active = 23; - // - string player_loading_img = 24; - // - string share_img = 25; - // - map kv_color = 26; -} - -// -message ActivityView { - // - Arc arc = 1; - // - string bvid = 2; - // - repeated Page pages = 3; - // - repeated Staff staff = 4; - // - ReqUser req_user = 5; - // - OperationRelate right_relate = 6; - // - OperationRelate bottom_relate = 7; - // - repeated ActivitySeasonSection sections = 8; -} - -// -message Arc { - // - int64 aid = 1; - // - int64 videos = 2; - // - int32 type_id = 3; - // - string type_name = 4; - // - int32 copyright = 5; - // - string pic = 6; - // - 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 mission_id = 17; - // - int64 order_id = 18; - // - string redirect_url = 19; - // - int64 forward = 20; - // - Rights rights = 21; - // - Author author = 22; - // - Stat stat = 23; - // - string report_result = 24; - // - string dynamic = 25; - // - int64 first_cid = 26; - // - Dimension dimension = 27; - // - repeated StaffInfo staff_info = 28; - // - int64 season_id = 29; - // - repeated DescV2 desc_v2 = 30; - // - bool is_chargeable_season = 31; - // - bool is_blooper = 32; -} - -// -message Author { - // - int64 mid = 1; - // - string name = 2; - // - string face = 3; -} - -// -message Card { - // - AccountCard card = 1; - // - Space space = 2; - // - bool following = 3; - // - int64 archive_count = 4; - // - int32 article_count = 5; - // - int64 follower = 6; -} - -// -message CardLevelInfo { - // - int32 cur = 1; - // - int32 min = 2; - // - int32 now_exp = 3; - // - int32 next_exp = 4; -} - -// -message CardVip { - // - int32 type = 1; - // - string due_remark = 2; - // - int32 access_status = 3; - // - int32 vip_status = 4; - // - string vip_status_warn = 5; - // - int32 theme_type = 6; -} - -message ClickActivitySeasonReq { - // - OrderType order_type = 1; - oneof param { - // - ReserveActivityParam reserve_activity_param = 2; - // - FavSeasonParam fav_season_param = 3; - // - JumpURLParam jump_URL_param = 4; - } - // - string spmid = 5; - // - int64 action = 6; -} - -// -message DescV2 { - // - string raw_text = 1; - // - int64 type = 2; - // - int64 biz_id = 3; -} - -// -message Dimension { - // - int64 width = 1; - // - int64 height = 2; - // - int64 rotate = 3; -} - -// -message FavSeasonParam { - // - int64 season_id = 1; -} - -// -message HotReply { - // - ReplyPage page = 1; - // - repeated Reply replies = 2; -} - -// -message JumpURLParam { - // - string jump_url = 1; -} - -// -message LiveTimeline { - // - string name = 1; - // - int64 start_time = 2; - // - int64 end_time = 3; - // - string cover = 4; - // - string subtitle = 5; - // - string h5_cover = 6; -} - -// -message NameplateInfo { - // - int32 nid = 1; - // - string name = 2; - // - string image = 3; - // - string image_small = 4; - // - string level = 5; - // - string condition = 6; -} - -// -message NoReply {} - -// -message OfficialInfo { - // - int32 role = 1; - // - string title = 2; - // - string desc = 3; -} - -// -message OfficialVerify { - // - int32 type = 1; - // - string desc = 2; -} - -// -message OperationRelate { - // - string title = 1; - // - repeated RelateItem relate_item = 2; - // - repeated Relate ai_relate_item = 3; -} - -// -enum OrderType { - TypeNone = 0; // - TypeOrderActivity = 1; // - TypeFavSeason = 2; // - TypeClick = 3; // -} - -// -message Page { - // - int64 cid = 1; - // - int32 page = 2; - // - string from = 3; - // - string part = 4; - // - int64 duration = 5; - // - string vid = 6; - // - string desc = 7; - // - string weblink = 8; - // - Dimension dimension = 9; -} - -// -message PendantInfo { - // - int32 pid = 1; - // - string name = 2; - // - string image = 3; - // - int64 expire = 4; -} - -// -message ReasonStyle { - // - string text = 1; -} - -// -message Relate { - // - Arc arc = 1; - // - string bvid = 2; - // - int64 season_type = 3; -} - -// -message RelateItem { - // - string url = 1; - // - string cover = 2; -} - -// -message Relation { - // - int64 attribute = 1; - // - int64 special = 3; -} - -// -message Reply { - // - int64 rpid = 1; - // - int64 oid = 2; - // - int32 type = 3; - // - int64 mid = 4; - // - int64 root = 5; - // - int64 parent = 6; - // - int64 dialog = 7; - // - int32 count = 8; - // - int32 rcount = 9; - // - int32 floor = 10; - // - int32 state = 11; - // - int32 fans_grade = 12; - // - int32 attr = 13; - // - int64 ctime = 14; - // - string rpid_str = 15; - // - string root_str = 16; - // - string parent_str = 17; - // - string dialog_str = 18; - // - int32 like = 19; - // - int32 hate = 20; - // - int32 action = 21; - // - ReplyMember member = 22; - // - ReplyContent content = 23; - // - repeated Reply replies = 24; - // - int32 assist = 25; - // - ReplyFolder folder = 26; - // - ReplyUpAction up_action = 27; - // - ReplyLabel label = 28; - // - string raw_input = 29; - // - bool show_follow = 30; -} - -// -message ReplyContent { - // - int64 rp_id = 1; - // - string message = 2; - // - ReplyVote vote = 3; - // - repeated string topics = 5; - // - int32 ip = 6; - // - int32 plat = 7; - // - string device = 8; - // - string version = 9; - // - repeated ReplyMemberInfo members = 10; - // - map emote = 11; -} - -// -message ReplyEmote { - // - int64 id = 1; - // - int64 package_id = 2; - // - int64 state = 3; - // - int64 type = 4; - // - int64 attr = 5; - // - string text = 6; - // - string url = 7; - // - ReplyEmoteMeta meta = 8; - // - int64 ctime = 9; - // - int64 mtime = 10; -} - -// -message ReplyEmoteMeta { - // - ReplyEmoteMetaSize size = 1; -} - -// -enum ReplyEmoteMetaSize { - EMOTE_META_SIZE_UNSPECIFIED = 0; // - EMOTE_META_SIZE_SMALL = 1; // - EMOTE_META_SIZE_BIG = 2; // -} - -// -message ReplyFansDetail { - // - int64 uid = 1; - // - int32 medal_id = 2; - // - string medal_name = 3; - // - int32 score = 4; - // - int32 level = 5; - // - int32 intimacy = 6; - // - int32 status = 7; - // - int32 received = 8; -} - -// -message ReplyFolder { - // - bool has_folded = 1; - // - bool is_folded = 2; - // - string rule = 3; -} - -// -message ReplyLabel { - // - int64 rpid = 1; - // - string content = 2; - // - string text_color = 3; - // - string text_color_night_mode = 4; - // - string bg_color = 5; - // - string bg_color_night_mode = 6; - // - string link = 7; - // - string position = 8; -} - -// -message ReplyLevelInfo { - // - int32 cur = 1; - // - int32 min = 2; - // - int32 now_exp = 3; - // - int32 next_exp = 4; -} - -// -message ReplyMember { - // - ReplyMemberInfo info = 1; - // - ReplyFansDetail fans_detail = 2; - // - int32 following = 3; -} - -// -message ReplyMemberInfo { - // - int32 role = 1; - // - string mid = 2; - // - string name = 3; - // - string sex = 4; - // - string sign = 5; - // - string avatar = 6; - // - string rank = 7; - // - string display_rank = 8; - // - ReplyLevelInfo level_info = 9; - // - PendantInfo pendant = 10; - // - NameplateInfo nameplate = 11; - // - OfficialVerify official_verify = 12; - // - ReplyVip vip = 13; -} - -// -message ReplyPage { - // - int64 acount = 1; - // - int64 count = 2; - // - int64 num = 3; - // - int64 size = 4; -} - -// -message ReplyUpAction { - // - bool like = 1; - // - bool reply = 2; -} - -// -message ReplyVip { - // - int32 type = 1; - // - int64 due_date = 2; - // - string due_remark = 3; - // - int32 access_status = 4; - // - int32 vip_status = 5; - // - string vip_status_warn = 6; - // - int32 theme_type = 7; - // - VipLabel label = 8; -} - -// -message ReplyVote { - // - int64 id = 1; - // - string title = 2; - // - int32 cnt = 3; - // - string desc = 4; - // - bool deleted = 5; -} - -// -message ReqUser { - // - bool favorite = 1; - // - bool like = 2; - // - bool dislike = 3; - // - int64 multiply = 4; -} - -// -message ReserveActivityParam { - // - int64 reserve_id = 1; - // - string from = 2; - // - string type = 3; - // - int64 oid = 4; -} - -// -message Rights { - // - int32 bp = 1; - // - int32 elec = 2; - // - int32 download = 3; - // - int32 movie = 4; - // - int32 pay = 5; - // - int32 hd5 = 6; - // - int32 no_reprint = 7; - // - int32 autoplay = 8; - // - int32 ugc_pay = 9; - // - int32 is_cooperation = 10; - // - int32 ugc_pay_preview = 11; - // - int32 arc_pay = 12; - // - int32 free_watch = 13; -} - -// -message SeasonEpisode { - // - int64 season_id = 1; - // - int64 section_id = 2; - // - int64 id = 3; - // - int64 aid = 4; - // - int64 cid = 5; - // - string title = 6; - // - int64 attribute = 7; - // - Arc arc = 8; - // - Page page = 9; - // - string bvid = 10; - // - ReasonStyle badge_style = 11; -} - -// -message SeasonSection { - // - int64 season_id = 1; - // - int64 id = 2; - // - string title = 3; - // - int64 type = 4; - // - repeated SeasonEpisode episodes = 5; -} - -// -message SeasonStat { - // - int64 season_id = 1; - // - int32 view = 2; - // - int32 danmaku = 3; - // - int32 reply = 4; - // - int32 fav = 5; - // - int32 coin = 6; - // - int32 share = 7; - // - int32 now_rank = 8; - // - int32 his_rank = 9; - // - int32 like = 10; -} - -// -message Space { - // - string s_img = 1; - // - string l_img = 2; -} - -// -message Staff { - // - int64 mid = 1; - // - string title = 2; - // - string name = 3; - // - string face = 4; - // - VipInfo vip = 5; - // - OfficialInfo official = 6; - // - int64 follower = 7; - // - int32 label_style = 8; - // - Relation relation = 9; -} - -// -message StaffInfo { - // - int64 mid = 1; - // - string title = 2; -} - -// -message Stat { - // - int64 aid = 1; - // - int32 view = 2; - // - int32 danmaku = 3; - // - int32 reply = 4; - // - int32 fav = 5; - // - int32 coin = 6; - // - int32 share = 7; - // - int32 now_rank = 8; - // - int32 his_rank = 9; - // - int32 like = 10; - // - int32 dislike = 11; - // - string evaluation = 12; - // - string argue_msg = 13; -} - -// -message Subtitle { - // - bool allow_submit = 1; - // - repeated SubtitleItem list = 2; -} - -// -message SubtitleItem { - // - int64 id = 1; - // - string lan = 2; - // - string lan_doc = 3; - // - bool is_lock = 4; - // - int64 author_mid = 5; - // - string subtitle_url = 6; - // - AccInfo author = 7; -} - -// -message Tag { - // - int64 id = 1; - // - string name = 2; - // - string cover = 3; - // - string head_cover = 4; - // - string content = 5; - // - string short_content = 6; - // - int32 type = 7; - // - int32 state = 8; - // - int64 ctime = 9; - // - TagCount tag_count = 10; - // - int32 is_atten = 11; - // - int64 likes = 12; - // - int64 hates = 13; - // - int32 attribute = 14; - // - int32 liked = 15; - // - int32 hated = 16; -} - -// -message TagCount { - // - int64 view = 1; - // - int64 use = 2; - // - int64 atten = 3; -} - -// -message UGCPayAsset { - // - int64 price = 1; - // - map platform_price = 2; -} - -// -message UGCSeason { - // - int64 id = 1; - // - string title = 2; - // - string cover = 3; - // - int64 mid = 4; - // - string intro = 5; - // - int32 sign_state = 6; - // - int64 attribute = 7; - // - repeated SeasonSection sections = 8; - // - SeasonStat stat = 9; - // - int64 ep_count = 10; - // - int64 season_type = 11; - // - bool is_pay_season = 12; -} - -// -message View { - // - Arc arc = 1; - // - bool no_cache = 2; - // - repeated Page pages = 3; - // - Subtitle subtitle = 4; - // - UGCPayAsset asset = 5; - // - ViewLabel label = 6; - // - repeated Staff staff = 7; - // - UGCSeason ugc_season = 8; - // - int64 stein_guide_cid = 9; -} - -// -message ViewDetailReply { - // - View view = 1; - // - Card card = 2; - // - repeated Tag tags = 3; - // - HotReply reply = 4; - // - repeated Arc related = 5; -} - -// -message ViewDetailReq { - // - int64 aid = 1; - // - string bvid = 2; -} - -// -message ViewLabel { - // - int64 type = 1; -} - -// -message VipInfo { - // - int32 type = 1; - // - int32 status = 2; - // - int32 vip_pay_type = 3; - // - int32 theme_type = 4; -} - -// -message VipLabel { - // - string path = 1; -} +syntax = "proto3"; + +package bilibili.web.interfaces.v1; + +// 用户信息 +message AccInfo { + // 用户UID + int64 mid = 1; + // 用户昵称 + string name = 2; + // + string sex = 3; + // + string face = 4; + // + string sign = 5; +} + +// +message AccountCard { + // + string mid = 1; + // + string name = 2; + // + string sex = 3; + // + string rank = 4; + // + string face = 5; + // + int32 spacesta = 6; + // + string sign = 7; + // + CardLevelInfo level_info = 8; + // + PendantInfo pendant = 9; + // + NameplateInfo nameplate = 10; + // + OfficialInfo official = 11; + // + OfficialVerify official_verify = 12; + // + CardVip vip = 13; + // + int64 fans = 14; + // + int64 friend = 15; + // + int64 attention = 16; +} + +// +message ActivityArchiveReply { + // + Arc arc = 1; + // + string bvid = 2; + // + repeated Page pages = 3; + // + ReqUser req_user = 4; + // + repeated Staff staff = 5; + // + OperationRelate right_relate = 6; + // + OperationRelate bottom_relate = 7; +} + +// +message ActivityArchiveReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string activity_key = 3; +} + +// +message ActivityEpisode { + // + int64 id = 1; + // + int64 aid = 2; + // + string bvid = 3; + // + int64 cid = 4; + // + string title = 5; + // + string cover = 6; + // + Author author = 7; + // + Rights rights = 8; +} + +// +message ActivityGame { + // + repeated ActivityGameIframe iframes = 1; + // + string disclaimer = 2; + // + string disclaimer_url = 3; +} + +// +message ActivityGameIframe { + // + string url = 1; + // + int64 height = 2; +} + +// +message ActivityLive { + // + int64 room_id = 1; + // + int64 now_time = 2; + // + int64 start_time = 3; + // + int64 end_time = 4; + // + string hover_pic = 5; + // + string hover_jump_url = 6; + // + int64 break_cycle = 7; + // + repeated LiveTimeline timeline = 8; + // + OperationRelate operation_relate = 9; + // + int64 reply_type = 10; + // + int64 reply_id = 11; + // + string hover_pic_close = 12; + // + string gift_disclaimer = 13; +} + +// +message ActivityLiveTimeInfoReply { + // + int64 now_time = 1; + // + int64 start_time = 2; + // + int64 end_time = 3; + // + repeated LiveTimeline timeline = 4; +} + +// +message ActivityLiveTimeInfoReq { + // + string activity_key = 1; +} + +// +message ActivitySeasonReply { + // + ActivitySeasonStatus status = 1; + // + string title = 2; + // + ActivityLive live = 3; + // + ActivitySubscribe subscribe = 4; + // + ActivityGame game = 5; + // + ActivityView view = 6; + // + ActivityTheme theme = 7; +} + +// +message ActivitySeasonReq { + // + int64 aid = 1; + // + string bvid = 2; + // + string activity_key = 3; +} + +// +message ActivitySeasonSection { + // + int64 id = 1; + // + string title = 2; + // + int64 type = 3; + // + repeated ActivityEpisode episodes = 4; +} + +// +enum ActivitySeasonStatus { + StatusNone = 0; // + StatusLive = 1; // + StatusView = 2; // +} + +// +message ActivitySubscribe { + // + bool status = 1; + // + string title = 2; + // + string button_title = 3; + // + string button_selected_title = 4; + // + int64 season_stat_view = 5; + // + int64 season_stat_danmaku = 6; + // + OrderType order_type = 7; + oneof param { + // + ReserveActivityParam reserve_activity_param = 8; + // + FavSeasonParam fav_season_param = 9; + // + JumpURLParam jump_URL_param = 10; + } +} + +// +message ActivityTheme { + // + string base_color = 1; + // + string loading_bg_color = 2; + // + string operated_bg_color = 3; + // + string default_element_color = 4; + // + string hover_element_color = 5; + // + string selected_element_color = 6; + // + string base_font_color = 7; + // + string info_font_color = 8; + // + string mask_bg_color = 9; + // + string page_bg_color = 10; + // + string center_logo_img = 11; + // + string page_bg_img = 12; + // + string decorations2233_img = 13; + // + string main_banner_bg_img = 14; + // + string main_banner_title_img = 15; + // + string like_animation_img = 16; + // + string combo_like_img = 17; + // + string combo_coin_img = 18; + // + string combo_fav_img = 19; + // + string arrow_btn_img = 20; + // + string share_icon_bg_img = 21; + // + string live_list_location_img = 22; + // + string live_list_location_img_active = 23; + // + string player_loading_img = 24; + // + string share_img = 25; + // + map kv_color = 26; +} + +// +message ActivityView { + // + Arc arc = 1; + // + string bvid = 2; + // + repeated Page pages = 3; + // + repeated Staff staff = 4; + // + ReqUser req_user = 5; + // + OperationRelate right_relate = 6; + // + OperationRelate bottom_relate = 7; + // + repeated ActivitySeasonSection sections = 8; +} + +// +message Arc { + // + int64 aid = 1; + // + int64 videos = 2; + // + int32 type_id = 3; + // + string type_name = 4; + // + int32 copyright = 5; + // + string pic = 6; + // + 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 mission_id = 17; + // + int64 order_id = 18; + // + string redirect_url = 19; + // + int64 forward = 20; + // + Rights rights = 21; + // + Author author = 22; + // + Stat stat = 23; + // + string report_result = 24; + // + string dynamic = 25; + // + int64 first_cid = 26; + // + Dimension dimension = 27; + // + repeated StaffInfo staff_info = 28; + // + int64 season_id = 29; + // + repeated DescV2 desc_v2 = 30; + // + bool is_chargeable_season = 31; + // + bool is_blooper = 32; +} + +// +message Author { + // + int64 mid = 1; + // + string name = 2; + // + string face = 3; +} + +// +message Card { + // + AccountCard card = 1; + // + Space space = 2; + // + bool following = 3; + // + int64 archive_count = 4; + // + int32 article_count = 5; + // + int64 follower = 6; +} + +// +message CardLevelInfo { + // + int32 cur = 1; + // + int32 min = 2; + // + int32 now_exp = 3; + // + int32 next_exp = 4; +} + +// +message CardVip { + // + int32 type = 1; + // + string due_remark = 2; + // + int32 access_status = 3; + // + int32 vip_status = 4; + // + string vip_status_warn = 5; + // + int32 theme_type = 6; +} + +message ClickActivitySeasonReq { + // + OrderType order_type = 1; + oneof param { + // + ReserveActivityParam reserve_activity_param = 2; + // + FavSeasonParam fav_season_param = 3; + // + JumpURLParam jump_URL_param = 4; + } + // + string spmid = 5; + // + int64 action = 6; +} + +// +message DescV2 { + // + string raw_text = 1; + // + int64 type = 2; + // + int64 biz_id = 3; +} + +// +message Dimension { + // + int64 width = 1; + // + int64 height = 2; + // + int64 rotate = 3; +} + +// +message FavSeasonParam { + // + int64 season_id = 1; +} + +// +message HotReply { + // + ReplyPage page = 1; + // + repeated Reply replies = 2; +} + +// +message JumpURLParam { + // + string jump_url = 1; +} + +// +message LiveTimeline { + // + string name = 1; + // + int64 start_time = 2; + // + int64 end_time = 3; + // + string cover = 4; + // + string subtitle = 5; + // + string h5_cover = 6; +} + +// +message NameplateInfo { + // + int32 nid = 1; + // + string name = 2; + // + string image = 3; + // + string image_small = 4; + // + string level = 5; + // + string condition = 6; +} + +// +message NoReply {} + +// +message OfficialInfo { + // + int32 role = 1; + // + string title = 2; + // + string desc = 3; +} + +// +message OfficialVerify { + // + int32 type = 1; + // + string desc = 2; +} + +// +message OperationRelate { + // + string title = 1; + // + repeated RelateItem relate_item = 2; + // + repeated Relate ai_relate_item = 3; +} + +// +enum OrderType { + TypeNone = 0; // + TypeOrderActivity = 1; // + TypeFavSeason = 2; // + TypeClick = 3; // +} + +// +message Page { + // + int64 cid = 1; + // + int32 page = 2; + // + string from = 3; + // + string part = 4; + // + int64 duration = 5; + // + string vid = 6; + // + string desc = 7; + // + string weblink = 8; + // + Dimension dimension = 9; +} + +// +message PendantInfo { + // + int32 pid = 1; + // + string name = 2; + // + string image = 3; + // + int64 expire = 4; +} + +// +message ReasonStyle { + // + string text = 1; +} + +// +message Relate { + // + Arc arc = 1; + // + string bvid = 2; + // + int64 season_type = 3; +} + +// +message RelateItem { + // + string url = 1; + // + string cover = 2; +} + +// +message Relation { + // + int64 attribute = 1; + // + int64 special = 3; +} + +// +message Reply { + // + int64 rpid = 1; + // + int64 oid = 2; + // + int32 type = 3; + // + int64 mid = 4; + // + int64 root = 5; + // + int64 parent = 6; + // + int64 dialog = 7; + // + int32 count = 8; + // + int32 rcount = 9; + // + int32 floor = 10; + // + int32 state = 11; + // + int32 fans_grade = 12; + // + int32 attr = 13; + // + int64 ctime = 14; + // + string rpid_str = 15; + // + string root_str = 16; + // + string parent_str = 17; + // + string dialog_str = 18; + // + int32 like = 19; + // + int32 hate = 20; + // + int32 action = 21; + // + ReplyMember member = 22; + // + ReplyContent content = 23; + // + repeated Reply replies = 24; + // + int32 assist = 25; + // + ReplyFolder folder = 26; + // + ReplyUpAction up_action = 27; + // + ReplyLabel label = 28; + // + string raw_input = 29; + // + bool show_follow = 30; +} + +// +message ReplyContent { + // + int64 rp_id = 1; + // + string message = 2; + // + ReplyVote vote = 3; + // + repeated string topics = 5; + // + int32 ip = 6; + // + int32 plat = 7; + // + string device = 8; + // + string version = 9; + // + repeated ReplyMemberInfo members = 10; + // + map emote = 11; +} + +// +message ReplyEmote { + // + int64 id = 1; + // + int64 package_id = 2; + // + int64 state = 3; + // + int64 type = 4; + // + int64 attr = 5; + // + string text = 6; + // + string url = 7; + // + ReplyEmoteMeta meta = 8; + // + int64 ctime = 9; + // + int64 mtime = 10; +} + +// +message ReplyEmoteMeta { + // + ReplyEmoteMetaSize size = 1; +} + +// +enum ReplyEmoteMetaSize { + EMOTE_META_SIZE_UNSPECIFIED = 0; // + EMOTE_META_SIZE_SMALL = 1; // + EMOTE_META_SIZE_BIG = 2; // +} + +// +message ReplyFansDetail { + // + int64 uid = 1; + // + int32 medal_id = 2; + // + string medal_name = 3; + // + int32 score = 4; + // + int32 level = 5; + // + int32 intimacy = 6; + // + int32 status = 7; + // + int32 received = 8; +} + +// +message ReplyFolder { + // + bool has_folded = 1; + // + bool is_folded = 2; + // + string rule = 3; +} + +// +message ReplyLabel { + // + int64 rpid = 1; + // + string content = 2; + // + string text_color = 3; + // + string text_color_night_mode = 4; + // + string bg_color = 5; + // + string bg_color_night_mode = 6; + // + string link = 7; + // + string position = 8; +} + +// +message ReplyLevelInfo { + // + int32 cur = 1; + // + int32 min = 2; + // + int32 now_exp = 3; + // + int32 next_exp = 4; +} + +// +message ReplyMember { + // + ReplyMemberInfo info = 1; + // + ReplyFansDetail fans_detail = 2; + // + int32 following = 3; +} + +// +message ReplyMemberInfo { + // + int32 role = 1; + // + string mid = 2; + // + string name = 3; + // + string sex = 4; + // + string sign = 5; + // + string avatar = 6; + // + string rank = 7; + // + string display_rank = 8; + // + ReplyLevelInfo level_info = 9; + // + PendantInfo pendant = 10; + // + NameplateInfo nameplate = 11; + // + OfficialVerify official_verify = 12; + // + ReplyVip vip = 13; +} + +// +message ReplyPage { + // + int64 acount = 1; + // + int64 count = 2; + // + int64 num = 3; + // + int64 size = 4; +} + +// +message ReplyUpAction { + // + bool like = 1; + // + bool reply = 2; +} + +// +message ReplyVip { + // + int32 type = 1; + // + int64 due_date = 2; + // + string due_remark = 3; + // + int32 access_status = 4; + // + int32 vip_status = 5; + // + string vip_status_warn = 6; + // + int32 theme_type = 7; + // + VipLabel label = 8; +} + +// +message ReplyVote { + // + int64 id = 1; + // + string title = 2; + // + int32 cnt = 3; + // + string desc = 4; + // + bool deleted = 5; +} + +// +message ReqUser { + // + bool favorite = 1; + // + bool like = 2; + // + bool dislike = 3; + // + int64 multiply = 4; +} + +// +message ReserveActivityParam { + // + int64 reserve_id = 1; + // + string from = 2; + // + string type = 3; + // + int64 oid = 4; +} + +// +message Rights { + // + int32 bp = 1; + // + int32 elec = 2; + // + int32 download = 3; + // + int32 movie = 4; + // + int32 pay = 5; + // + int32 hd5 = 6; + // + int32 no_reprint = 7; + // + int32 autoplay = 8; + // + int32 ugc_pay = 9; + // + int32 is_cooperation = 10; + // + int32 ugc_pay_preview = 11; + // + int32 arc_pay = 12; + // + int32 free_watch = 13; +} + +// +message SeasonEpisode { + // + int64 season_id = 1; + // + int64 section_id = 2; + // + int64 id = 3; + // + int64 aid = 4; + // + int64 cid = 5; + // + string title = 6; + // + int64 attribute = 7; + // + Arc arc = 8; + // + Page page = 9; + // + string bvid = 10; + // + ReasonStyle badge_style = 11; +} + +// +message SeasonSection { + // + int64 season_id = 1; + // + int64 id = 2; + // + string title = 3; + // + int64 type = 4; + // + repeated SeasonEpisode episodes = 5; +} + +// +message SeasonStat { + // + int64 season_id = 1; + // + int32 view = 2; + // + int32 danmaku = 3; + // + int32 reply = 4; + // + int32 fav = 5; + // + int32 coin = 6; + // + int32 share = 7; + // + int32 now_rank = 8; + // + int32 his_rank = 9; + // + int32 like = 10; +} + +// +message Space { + // + string s_img = 1; + // + string l_img = 2; +} + +// +message Staff { + // + int64 mid = 1; + // + string title = 2; + // + string name = 3; + // + string face = 4; + // + VipInfo vip = 5; + // + OfficialInfo official = 6; + // + int64 follower = 7; + // + int32 label_style = 8; + // + Relation relation = 9; +} + +// +message StaffInfo { + // + int64 mid = 1; + // + string title = 2; +} + +// +message Stat { + // + int64 aid = 1; + // + int32 view = 2; + // + int32 danmaku = 3; + // + int32 reply = 4; + // + int32 fav = 5; + // + int32 coin = 6; + // + int32 share = 7; + // + int32 now_rank = 8; + // + int32 his_rank = 9; + // + int32 like = 10; + // + int32 dislike = 11; + // + string evaluation = 12; + // + string argue_msg = 13; +} + +// +message Subtitle { + // + bool allow_submit = 1; + // + repeated SubtitleItem list = 2; +} + +// +message SubtitleItem { + // + int64 id = 1; + // + string lan = 2; + // + string lan_doc = 3; + // + bool is_lock = 4; + // + int64 author_mid = 5; + // + string subtitle_url = 6; + // + AccInfo author = 7; +} + +// +message Tag { + // + int64 id = 1; + // + string name = 2; + // + string cover = 3; + // + string head_cover = 4; + // + string content = 5; + // + string short_content = 6; + // + int32 type = 7; + // + int32 state = 8; + // + int64 ctime = 9; + // + TagCount tag_count = 10; + // + int32 is_atten = 11; + // + int64 likes = 12; + // + int64 hates = 13; + // + int32 attribute = 14; + // + int32 liked = 15; + // + int32 hated = 16; +} + +// +message TagCount { + // + int64 view = 1; + // + int64 use = 2; + // + int64 atten = 3; +} + +// +message UGCPayAsset { + // + int64 price = 1; + // + map platform_price = 2; +} + +// +message UGCSeason { + // + int64 id = 1; + // + string title = 2; + // + string cover = 3; + // + int64 mid = 4; + // + string intro = 5; + // + int32 sign_state = 6; + // + int64 attribute = 7; + // + repeated SeasonSection sections = 8; + // + SeasonStat stat = 9; + // + int64 ep_count = 10; + // + int64 season_type = 11; + // + bool is_pay_season = 12; +} + +// +message View { + // + Arc arc = 1; + // + bool no_cache = 2; + // + repeated Page pages = 3; + // + Subtitle subtitle = 4; + // + UGCPayAsset asset = 5; + // + ViewLabel label = 6; + // + repeated Staff staff = 7; + // + UGCSeason ugc_season = 8; + // + int64 stein_guide_cid = 9; +} + +// +message ViewDetailReply { + // + View view = 1; + // + Card card = 2; + // + repeated Tag tags = 3; + // + HotReply reply = 4; + // + repeated Arc related = 5; +} + +// +message ViewDetailReq { + // + int64 aid = 1; + // + string bvid = 2; +} + +// +message ViewLabel { + // + int64 type = 1; +} + +// +message VipInfo { + // + int32 type = 1; + // + int32 status = 2; + // + int32 vip_pay_type = 3; + // + int32 theme_type = 4; +} + +// +message VipLabel { + // + string path = 1; +}