XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
UTF-8
syntax = "proto3";

package bilibili.app.viewunite.v1;

import "bilibili/app/archive/middleware/v1/preload.proto";
import "bilibili/app/viewunite/common.proto";
import "bilibili/pagination/pagination.proto";
import "google/protobuf/any.proto";

// 统一视频信息接口 (7.41.0+)
service View {
    // 
    rpc ArcRefresh(ArcRefreshReq) returns (ArcRefreshReply);
    // 视频详情页下方推荐
    rpc RelatesFeed(RelatesFeedReq) returns (RelatesFeedReply);
    // 
    rpc View(ViewReq) returns (ViewReply);
    // 
    rpc ViewProgress(ViewProgressReq) returns (ViewProgressReply);
}

// 
message ActivityResource {
    // 
    string dark_text_color = 1;
    // 
    string divider_color = 2;
    // 
    string bg_color = 3;
    // 
    string selected_bg_color = 4;
    // 
    string text_color = 5;
    // 
    string light_text_color = 6;
}

// 业务信息
message Arc {
    // 
    int64 aid = 1;
    // 
    int64 cid = 2;
    // 
    int64 duration = 3;
    // 
    bilibili.app.viewunite.common.Stat stat = 4;
    // 
    string bvid = 5;
    // 
    int32 copyright = 6;
    // 
    Rights right = 7;
    // 
    string cover = 8;
    // 
    int64 type_id = 9;
    // 
    string title = 10;
}

// 
message ArcRefreshReply {
    // 
    bilibili.app.viewunite.common.Stat stat = 1;
    // 
    SimpleReqUser req_user = 2;
    // 
    SimpleArc arc = 3;
    // 
    Online online = 4;
    // 
    LikeConfig like_config = 5;
    // 
    SimpleOwner owner = 6;
}

// 
message ArcRefreshReq {
    // 
    int64 aid = 1;
    // 
    string bvid = 2;
    // 
    UnionType type = 3;
}

// 
message AttentionCard {
    // 
    repeated ShowTime show_time = 1;
}

// 
message BgPlayNotice {
    // 
    bool allow_show = 1;
    // 
    string text = 2;
    // 
    string btn_text_1 = 3;
    // 
    string btn_text_2 = 4;
}

// 
message BizFollowVideoParam {
    // 
    int64 season_id = 1;
}

// 
message BizJumpLinkParam {
    // 
    string url = 1;
}

// 
message BizReserveActivityParam {
    // 
    int64 activity_id = 1;
    // 
    string from = 2;
    // 
    string type = 3;
    // 
    int64 oid = 4;
    // 
    int64 reserve_id = 5;
}

// 
message BizReserveGameParam {
    // 
    int64 game_id = 1;
}

enum BizType {
    // 
    BizTypeNone = 0;
    // 
    BizTypeFollowVideo = 1;
    // 
    BizTypeReserveActivity = 2;
    // 
    BizTypeJumpLink = 3;
    // 
    BizTypeFavSeason = 4;
    // 
    BizTypeReserveGame = 5;
}

// 
message Button {
    // 
    string title = 1;
    // 
    string uri = 2;
    // 
    string icon = 3;
    // 
    JumpShowType jump_show_type = 4;
}

// 
message ChargingPlus {
    // 
    bool pass = 1;
    // 
    repeated PlayToast play_toast = 2;
}

// 
message Chronos {
    // 
    string md5 = 1;
    // 
    string file = 2;
    // 
    string sign = 3;
}

// 
message ChronosParam {
    // 
    string engine_version = 1;
    // 
    string message_protocol = 2;
    // 
    string service_key = 3;
}

// 推广信息
message CM {
    // 
    google.protobuf.Any cm_under_player = 1;
    // 
    google.protobuf.Any ads_control = 2;
    // 
    repeated google.protobuf.Any source_content = 3;
}

// 
message CommandDm {
    // 
    int64 id = 1;
    // 
    int64 oid = 2;
    // 
    int64 mid = 3;
    // 
    string command = 4;
    // 
    string content = 5;
    // 
    int32 progress = 6;
    // 
    string ctime = 7;
    // 
    string mtime = 8;
    // 
    string extra = 9;
    // 
    string idstr = 10;
}

// 播放器配置
message Config {
    // 
    Online online = 1;
    // 
    PlayerIcon player_icon = 2;
    // 
    StoryEntrance story_entrance = 3;
    // 
    BgPlayNotice bg_play_notice = 4;
}

// 视频播放时弹出的卡片
message ContractCard {
    // 在第几秒弹出
    float display_progress = 1;
    // 
    int64 display_accuracy = 2;
    // 弹出后停留的时间
    int64 display_duration = 3;
    // 展示方式, 暂未知对应关系
    int32 show_mode = 4;
    // 页面类型, 暂未知对应关系
    int32 page_type = 5;
    // 
    UpperInfos upper = 6;
    // 
    int32 is_follow_display = 7;
    // 卡片的文字说明信息
    ContractText text = 8;
    // 
    int64 follow_display_end_duration = 9;
    //
    int32 is_play_display = 10;
    // 
    int32 is_interact_display = 11;
    // 
    bool play_display_switch = 12;
}

// 视频播放时弹出的卡片的文字说明信息
message ContractText {
    // 
    string title = 1;
    // 
    string subtitle = 2;
    // 
    string inline_title = 3;
}

// 
message Control {
    // 
    bool limit = 1;
}

// 
message DmResource {
    // 
    repeated CommandDm command_dms = 1;
    // 
    AttentionCard attention = 2;
    // 
    repeated OperationCard cards = 3;
}

enum ECode {
    // 
    CODE_DEFAULT = 0;
    // 
    CODE_404 = 1;
    // 青少年限制
    CODE_TEENAGER = 78301;
}

// 
message ECodeConfig {
    // 
    string redirect_url = 1;
}

// 
message FragmentArc {
    // 
    int64 aid = 1;
    // 
    int64 cid = 2;
}

// 
message FragmentParam {
    // 
    repeated FragmentArc fragment_arcs = 1;
}

// 
message FragmentRes {
    // 
    map<int64, VideoShot> video_shot = 1;
}

// 
message IconData {
    // 
    string meta_json = 1;
    // 
    string sprits_img = 2;
}

// 视频介绍 Tab
message IntroductionTab {
    // 
    string title = 1;
    // 
    repeated bilibili.app.viewunite.common.Module modules = 2;
}

enum JumpShowType {
    // 
    JST_DEFAULT = 0;
    // 
    JST_FULLSCREEN = 1;
    // 
    JST_HALFSCREEN = 2;
}

// 
message LikeConfig {
    bilibili.app.viewunite.common.UpLikeImg triple_like = 1;
    // 
    string like_animation = 2;
}

// 素材详情
message Material {
    // 
    string icon = 1;
    // 
    string text = 2;
    // 
    string url = 3;
    // 
    MaterialBizType type = 4;
    // 
    string param = 5;
    // 
    string static_icon = 6;
    // 
    string bg_color = 7;
    // 
    string bg_pic = 8;
    // 
    int32 jump_type = 9;
    // 
    PageType page_type = 10;
    // 
    bool need_login = 11;
}

// 素材类型
enum MaterialBizType {
    // 
    NONE = 0;
    // 
    ACTIVITY = 1;
    // 
    BGM = 2;
    // 
    EFFECT = 3;
    // 
    SHOOT_SAME = 4;
    // 
    SHOOT_TOGETHER = 5;
    // 
    ACTIVITY_ICON = 6;
    // 
    NEW_BGM = 7;
    // 
    GENERAL_TYPE = 8;
}

// 素材来源
enum MaterialSource {
    // 
    DEFAULT = 0;
    // 必剪素材
    BIJIAN = 1;
}

// 
message Online {
    // 
    bool online_show = 1;
}

//
message OperationCard {
    // 
    int64 id = 1;
    // 
    int32 from = 2;
    // 
    int32 to = 3;
    // 
    bool status = 4;
    // 
    BizType biz_type = 5;
    // 
    OperationCardContent content = 6;
    // 
    oneof param {
        // 
        BizFollowVideoParam follow = 7;
        // 
        BizReserveActivityParam reserve = 8;
        // 
        BizJumpLinkParam jump = 9;
        // 
        BizReserveGameParam game = 10;
    }
}

// 
message OperationCardContent {
    // 
    string title = 1;
    // 
    string subtitle = 2;
    // 
    string icon = 3;
    // 
    string button_title = 4;
    // 
    string button_selected_title = 5;
    // 
    bool show_selected = 6;
}

//
enum PageCategory {
    // 
    COMMON_PAGE = 0;
    // 
    ACTIVITY_PAGE = 1;
}

// 
message PageControl {
    Control toast_show = 1;
    Control material_show = 2;
    Control up_show = 3;
}

// 页面类型
enum PageType {
    // H5页面(Webview)
    H5 = 0;
    // 原生页面(native)
    NA = 1;
}

// 
message PlayerIcon {
    // 
    string url1 = 1;
    // 
    string hash1 = 2;
    // 
    string url2 = 3;
    // 
    string hash2 = 4;
    // 
    string drag_left_png = 5;
    // 
    string middle_png = 6;
    // 
    string drag_right_png = 7;
    // 
    IconData drag_data = 8;
    // 
    IconData nodrag_data = 9;
}

// 
message PlayToast {
    // 
    PlayToastEnum business = 1;
    // 
    string icon_url = 2;
    // 
    string text = 3;
}

enum PlayToastEnum {
    // 
    PLAYTOAST_UNKNOWN = 0;
    // 
    PLAYTOAST_CHARGINGPLUS = 1;
}

// 
message PointMaterial {
    // 
    string url = 1;
    // 
    MaterialSource material_source = 2;
}

// 
message Relate {
    // 
    int64 device_type = 1;
    // 
    bilibili.pagination.Pagination pagination = 2;
}

// 视频详情页下方推荐 Reply
message RelatesFeedReply {
    // 
    repeated bilibili.app.viewunite.common.RelateCard relates = 1;
    // 
    bilibili.pagination.Pagination pagination = 2;
}

// 视频详情页下方推荐 Req
message RelatesFeedReq {
    // 
    int64 aid = 1;
    // 
    string bvid = 2;
    // 
    string from = 3;
    // 
    string spmid = 4;
    // 
    string from_spmid = 5;
    // 
    bilibili.app.archive.middleware.v1.PlayerArgs player_args = 6;
    // 
    bilibili.pagination.Pagination pagination = 7;
    // 
    string session_id = 8;
    // 
    int64 auto_play = 9;
    // 
    string from_track_id = 10;
}

// 
message ReplyStyle {
    // 
    string badge_url = 1;
    // 
    string badge_text = 2;
    // 
    int64 badge_type = 3;
}

// 
message ReplyTab {
    // 
    ReplyStyle reply_style = 1;
    // 
    string title = 2;
    // 
    TabControl control = 3;
}

// 
message ReqUser {
    // 
    int32 favorite = 1;
    // 
    int32 like = 2;
    // 
    int32 coin = 3;
    // 
    int32 fav_season = 4;
    // 
    int32 follow = 5;
    // 
    int32 dislike = 6;
    // 头像旁充电按钮
    Button elec_plus_btn = 7;
    //    
    ChargingPlus charging_plus = 8;
    // 
    ReqUserExtra extra = 9;
    // 
    int32 paid = 10;
}

// 
message ReqUserExtra {
    // 
    bool user_flag_new = 1;
}

// 
message Rights {
    // 
    bool only_vip_download = 1;
    // 
    bool no_reprint = 2;
    // 
    bool download = 3;
}

// 
message ShowTime {
    // 
    int32 start_time = 1;
    // 
    int32 end_time = 2;
    // 
    double pos_x = 3;
    // 
    double pos_y = 4;
}

// 
message SimpleArc {
    // 
    int32 copyright = 1;
}

// 
message SimpleOwner {
    // 
    int32 attention_relation = 1;
}

// 
message SimpleReqUser {
    // 
    int32 favorite = 1;
    // 
    int32 like = 2;
    // 
    int32 coin = 3;
}

// 
message StoryEntrance {
    // 
    bool arc_play_story = 1;
    // 
    string story_icon = 2;
    // 
    bool arc_landscape_story = 3;
    // 
    string landscape_icon = 4;
    // 
    bool play_story = 5;
}

// 
message Tab {
    // 
    repeated TabModule tab_module = 1;
    // 
    string tab_bg = 2;
    // 
    TabControl danmaku_entrance = 3;
}

// 评论区/弹幕 Tab 控制
message TabControl {
    // 
    bool limit = 1;
    // 
    bool disable = 2;
    // 
    string disable_click_tip = 3;
}

// 
message TabModule {
    // 
    TabType tab_type = 1;
    // 
    oneof tab {
        // 
        IntroductionTab introduction = 2;
        // 
        ReplyTab reply = 3;
        // 
        bilibili.app.viewunite.common.ActivityTab activity_tab = 4;
    }
}

enum TabType {
    // 
    TAB_NONE = 0;
    // 详情 Tab
    TAB_INTRODUCTION = 1;
    // 评论区 Tab
    TAB_REPLY = 2;
    // OGV 活动信息 Tab
    TAB_OGV_ACTIVITY = 3;
}

// 
enum UnionType {
    // 
    UGC = 0;
    // 
    OGV = 1;
    // 
    PUGV = 2;
}

// UP主信息(可是Upper这个... 程序员英文不过关吧? )
message UpperInfos {
    // 粉丝数
    uint64 fans_count = 1;
    // 过去半年内的稿件数
    uint64 arc_count_last_half_year = 2;
    // 
    int64 first_up_dates = 3;
    // UP稿件总播放数
    uint64 total_play_count = 4;
}

// 
message VideoGuide {
    // 
    repeated Material material = 1;
    // 
    VideoViewPoint video_point = 2;
    // 
    ContractCard contract_card = 3;
}

// 
message VideoPoint {
    // 
    int32 type = 1;
    // 
    int64 from = 2;
    // 
    int64 to = 3;
    // 
    string content = 4;
    // 
    string cover = 5;
    // 
    string logo_url = 6;
}

// 
message VideoShot {
    // 
    string pv_data = 1;
    // 
    int32 img_x_len = 2;
    // 
    int32 imd_x_size = 3;
    // 
    int32 img_y_len = 4;
    // 
    int32 img_y_size = 5;
    // 
    repeated string image = 6;
}

// 
message VideoViewPoint {
    // 
    repeated VideoPoint points = 1;
    // 
    PointMaterial point_material = 2;
    // 
    bool point_permanent = 3;
}

// 
message ViewBase {
    // 
    BizType biz_type = 1;
    // 
    PageType page_type = 2;
    // 
    PageControl control = 3;
    // 
    ActivityResource activity_resource = 4;
    // 
    Config config = 5;
}

// 
message ViewProgressReply {
    // 
    VideoGuide video_guide = 1;
    // 
    Chronos chronos = 2;
    // 
    VideoShot arc_shot = 3;
    // 
    DmResource dm = 4;
}

// 
message ViewProgressReq {
    // 
    uint64 aid = 1;
    // 
    uint64 cid = 2;
    // 
    uint64 up_mid = 3;
    // 
    ChronosParam  chronos_param = 4;
    // 
    UnionType type = 5;
}

// 
message ViewReply {
    // 
    ViewBase view_base = 1;
    // 
    Arc arc = 2;
    // 
    ReqUser req_user = 3;
    // 
    bilibili.app.viewunite.common.Owner owner = 4;
    // 
    Tab tab = 5;
    // 
    google.protobuf.Any supplement = 6;
    // 
    CM cm = 7;
    // 
    ECode ecode = 8;
    // 
    ECodeConfig ecode_config = 9;
    // 
    map<string, string> report = 10;
}

// 
message ViewReq {
    // 
    uint64 aid = 1;
    // 
    string bvid = 2;
    // 
    string from = 3;
    // 
    string spmid = 4;
    // 
    string from_spmid = 5;
    // 
    string session_id = 6;
    // 
    bilibili.app.archive.middleware.v1.PlayerArgs player_args = 7;
    // 
    string track_id = 8;
    // 
    map<string, string> extra_content = 9;
    // 
    string play_mode = 10;
    // 
    Relate relate = 11;
    // 
    string biz_extra = 12;
    // 
    string ad_extra = 13;
    // 
    string from_scene = 14;
}