syntax = "proto3";

package bilibili.pgc.gateway.player.v2;

import "google/protobuf/timestamp.proto";

// 
service PlayURL {
    // 
    rpc PlayView (PlayViewReq) returns (PlayViewReply);
    // 
    rpc PlayViewComic (PlayViewReq) returns (PlayViewReply);
}

// 
message Animation {
    // 
    map<string, string> qn_svga_animation_map = 1;
}

// 
message AudioMaterialProto {
    // 
    string audio_id = 1;
    // 
    string title = 2;
    // 
    string edition = 3;
    // 
    int64 person_id = 4;
    // 
    string person_name = 5;
    // 
    string person_avatar = 6;
    // 
    repeated DashItem audio = 7;
}

// 
message BadgeInfo {
    // 
    string text = 1;
    // 
    string bg_color = 2;
    // 
    string bg_color_night = 3;
    // 
    string text_color = 4;
    // 
    GradientColor bg_gradient_color = 5;
    // 
    string img = 6;
}

// 
message BottomDisplay {
    // 
    TextInfo title = 1;
    // 
    string icon = 2;
}

// 
message BrandReport {
    // 
    string brand_list = 1;
}

// 
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<string, string> order_report_params = 15;
    // 
    TaskParam task_param = 16;
    // 
    string pc_link = 17;
    // 
    int64 jump_type = 18;
}

// 
message CastTips {
    // 
    int32 code = 1;
    // 
    string message = 2;
}

// 
message ClipInfo {
    // 
    int64 material_no = 1;
    // 
    int32 start = 2;
    // 
    int32 end = 3;
    // 
    ClipType clip_type = 4;
    // 
    string toast_text = 5;
    // 
    MultiView multi_view = 6;
}

// 
enum ClipType {
    // 
    NT_UNKNOWN = 0;
    // 
    CLIP_TYPE_OP = 1;
    // 
    CLIP_TYPE_ED = 2;
    // 
    CLIP_TYPE_HE = 3;
    // 
    CLIP_TYPE_MULTI_VIEW = 4;
    // 
    CLIP_TYPE_AD = 5;
    // 
    CLIP_TYPE_PREVIEW = 6;
}

// 
enum CodeType {
    // 
    NOCODE = 0;
    // 
    CODE264 = 1;
    // 
    CODE265 = 2;
}

// 
message ContinuePlayInfo {
    // 
    int64 continue_play_ep_id = 1;
}

// 
message Coupon {
    // 
    string coupon_token = 1;
    // 
    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;
    // 
    int64 otype = 11;
    // 
    string amount = 12;
}

// 
message CouponInfo {
    // 
    CouponToast toast = 1;
    // 
    PopWin pop_win = 2;
}

// 
message CouponTextInfo {
    // 
    string positive_preview = 1;
    // 
    string section = 2;
}

// 
message CouponToast {
    // 
    CouponTextInfo text_info = 1;
    // 
    ButtonInfo button = 2;
}

// 
message DashItem {
    // 
    int32 id = 1;
    // 
    string base_url = 2;
    // 
    repeated string backup_url = 3;
    // 
    int32 bandwidth = 4;
    // 
    int32 codecid = 5;
    // 
    string md5 = 6;
    // 
    int64 size = 7;
    // 
    string frame_rate = 8;
    // 
    string widevine_pssh = 9;
}

// 
message DashVideo {
    // 
    string base_url = 1;
    // 
    repeated string backup_url = 2;
    // 
    int32 bandwidth = 3;
    // 
    int32 codecid = 4;
    // 
    string md5 = 5;
    // 
    int64 size = 6;
    // 
    int32 audio_id = 7;
    // 
    bool no_rexcode = 8;
    // 
    string frame_rate = 9;
    // 
    int32 width = 10;
    // 
    int32 height = 11;
    // 
    string widevine_pssh = 12;
}

// 
message DataControl {
    // 
    bool need_watch_progress = 1;
}

// 
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;
    // 
    repeated Playlist play_list = 15;
    // 
    string link = 16;
    // 
    ImageInfo half_image = 17;
    // 
    int32 hide_button_on_half = 18;
    // 
    string link_desc = 19;
}

// 
message DialogConfig {
    // 
    bool is_show_cover = 1;
    // 
    bool is_orientation_enable = 2;
    // 
    bool is_nested_scroll_enable = 3;
    // 
    bool is_force_halfscreen_enable = 4;
    // 
    bool is_background_translucent_enable = 5;
}

// 
message Dimension {
    // 
    int32 width = 1;
    // 
    int32 height = 2;
    // 
    int32 rotate = 3;
}

// 
message DolbyItem {
    // 
    enum Type {
        // 
        NONE = 0;
        // 
        COMMON = 1;
        // 
        ATMOS = 2;
    }
    
    // 
    DolbyItem.Type type = 1;
    // 
    repeated DashItem audio = 2;
}

// 
enum DrmTechType {
    // 
    NON = 0;
    // 
    FAIR_PLAY = 1;
    // 
    WIDE_VINE = 2;
    // 
    BILI_DRM = 3;
}

// 
message EndPage {
    // 
    Dialog dialog = 1;
    // 
    bool hide = 2;
}

// 
message EpInlineVideo {
    // 
    int64 material_no = 1;
    // 
    int64 aid = 2;
    // 
    int64 cid = 3;
}

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

// 
message EpPublicityVideo {
    // 
    oneof data {
        // 
        EpPreVideo ep_pre_video = 2;
        // 
        EpInlineVideo ep_inline = 3;
    }
    // 
    EpPublicityVideoType type = 1;
}

// 
enum EpPublicityVideoType {
    // 
    PRE = 0;
    // 
    INLINE = 1;
    // 
    ADV_TYPE_UNKNOWN = -1;
}

// 
message EpisodeAdvertisementInfo {
    // 
    int64 aid = 1;
    // 
    string title = 2;
    // 
    string link = 3;
    // 
    int32 follow_video_bnt_flag = 4;
    // 
    string next_video_title = 5;
    // 
    string next_video_link = 6;
    // 
    int64 cid = 7;
    // 
    int32 season_id = 8;
    // 
    int32 follow = 9;
}

// 
message EpisodeInfo {
    // 
    int32 ep_id = 1;
    // 
    int64 cid = 2;
    // 
    int64 aid = 3;
    // 
    int32 ep_status = 4;
    // 
    SeasonInfo season_info = 5;
    // 
    string cover = 6;
    // 
    string title = 7;
    // 
    Interaction interaction = 8;
    // 
    string long_title = 9;
}

// 
message Event {
    // 
    Shake shake = 1;
}

// 
message ExtraData {
    // 
    string harmony_dialog_pay_link = 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 HideField {
    // 
    bool fragment_disable = 1;
    // 
    int32 vip_status = 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;
    // 
    int32 trial_quality_type = 10;
}

// 
message HistoryNode {
    // 
    int64 node_id = 1;
    // 
    string title = 2;
    // 
    int64 cid = 3;
}

// 
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 Interaction {
    // 
    HistoryNode history_node = 1;
    // 
    int64 graph_version = 2;
    // 
    string msg = 3;
    // 
    bool is_interaction = 4;
}

// 
enum LimitActionType {
    // 
    LAT_UNKNOWN = 0;
    // 
    SHOW_LIMIT_DIALOG = 1;
    // 
    SKIP_CURRENT_EP = 2;
}

// 
message MaterialInfo {
    // 
    int64 id = 1;
    // 
    string img = 2;
    // 
    string title = 3;
}

// 
message MultiDashVideo {
    // 
    repeated DashVideo dash_videos = 1;
}

// 
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<string, string> order_report_params = 19;
    // 
    string giant_screen_img = 20;
}

// 
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;
    // 
    bool dubbing_disable = 33;
    // 
    bool system_record_screen_disable = 34;
}

// 
message PlayAbilityExtConf {
    // 
    bool allow_close_subtitle = 1;
    // 
    FreyaConfig freya_config = 2;
    // 
    CastTips cast_tips = 3;
}

// 
message PlayDubbingInfo {
    // 
    AudioMaterialProto background_audio = 1;
    // 
    repeated RoleAudioProto role_audio_list = 2;
    // 
    string guide_text = 3;
}

// 
enum PlayErr {
    // 
    NoErr = 0;
    // 
    WithMultiDeviceLoginErr = 1;
}

// 
message PlayExtInfo {
    // 
    PlayDubbingInfo play_dubbing_info = 1;
}

// 
message PlayViewBusinessInfo {
    // 
    bool is_preview = 1;
    // 
    bool bp = 2;
    // 
    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<int32, QualityExtInfo> quality_ext_map = 10;
    // 
    map<string, int32> exp_map = 11;
    // 
    DrmTechType drm_tech_type = 12;
    // 
    LimitActionType limit_action_type = 13;
    // 
    bool is_drm = 14;
    // 
    RecordInfo record_info = 15;
    // 
    int32 vip_status = 16;
    // 
    bool is_live_pre = 17;
    // 
    EpisodeInfo episode_info = 18;
    // 
    EpisodeAdvertisementInfo episode_advertisement_info = 19;
    // 
    UserStatus user_status = 20;
    // 
    repeated EpPublicityVideo ep_publicity_video_list = 21;
    // 
    int64 watch_time_length = 22;
    // 
    BrandReport brand_report = 23;
}

// 
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;
    // 
    PlayExtInfo play_ext_info = 7;
    // 
    HideField hide_field = 8;
}

// 
message PlayViewReq {
    // 
    int64 ep_id = 1;
    // 
    int64 cid = 2;
    // 
    int64 qn = 3;
    // 
    int32 fnver = 4;
    // 
    int32 fnval = 5;
    // 
    int32 download = 6;
    // 
    int32 force_host = 7;
    // 
    bool fourk = 8;
    // 
    string spmid = 9;
    // 
    string from_spmid = 10;
    // 
    int32 teenagers_mode = 11;
    // 
    CodeType prefer_codec_type = 12;
    // 
    bool is_preview = 13;
    // 
    int64 room_id = 14;
    // 
    bool is_need_view_info = 15;
    // 
    SceneControl scene_control = 16;
    // 
    InlineScene inline_scene = 17;
    // 
    int64 material_no = 18;
    // 
    SecurityLevel security_level = 19;
    // 
    int64 season_id = 20;
    // 
    DataControl data_control = 21;
    // 
    bool is_close_drm = 22;
}

// 
message Playlist {
    // 
    int64 season_id = 1;
    // 
    string title = 2;
    // 
    string cover = 3;
    // 
    string link = 4;
    // 
    BadgeInfo badge_info = 5;
}

// 
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;
    // 
    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;
    // 
    PromptBarType prompt_bar_type = 10;
    // 
    int64 config_type = 11;
    // 
    repeated MaterialInfo fixed_benefits = 12;
    // 
    repeated MaterialInfo card_open_gift = 13;
    // 
    int64 end_time = 14;
    // 
    int32 show_on_paywall = 15;
}

// 
enum PromptBarType {
    // 
    PROMPT_BAR_TYPE_UNKNOWN = 0;
    // 
    OPEN_PROMPT_BAR = 1;
    // 
    TRY_PROMPT_BAR = 2;
}

// 
message QualityExtInfo {
    // 
    bool trial_support = 1;
}

// 
message RecordInfo {
    // 
    string record = 1;
    // 
    string record_icon = 2;
}

// 
message Report {
    // 
    string show_event_id = 1;
    // 
    string click_event_id = 2;
    // 
    string extends = 3;
}

// 
message ResponseUrl {
    // 
    int32 order = 1;
    // 
    int64 length = 2;
    // 
    int64 size = 3;
    // 
    string url = 4;
    // 
    repeated string backup_url = 5;
    // 
    string md5 = 6;
}

// 
message Rights {
    // 
    int32 can_watch = 1;
}

// 
message RoleAudioProto {
    // 
    int64 role_id = 1;
    // 
    string role_name = 2;
    // 
    string role_avatar = 3;
    // 
    repeated AudioMaterialProto audio_material_list = 4;
}

// 
message SceneControl {
    // 
    bool fav_playlist = 1;
    // 
    bool small_window = 2;
    // 
    bool pip = 3;
    // 
    bool was_he_inline = 4;
    // 
    bool is_need_trial = 5;
}

// 
message Scheme {
    // 
    enum ActionType {
        // 
        UNKNOWN_ActionType = 0;
        // 
        SHOW_TOAST = 1;
    }
    
    // 
    Scheme.ActionType action_type = 1;
    // 
    string toast = 2;
}

// 
message SeasonInfo {
    // 
    int32 season_id = 1;
    // 
    int32 season_type = 2;
    // 
    int32 season_status = 3;
    // 
    string cover = 4;
    // 
    string title = 5;
    // 
    Rights rights = 6;
    // 
    int32 mode = 7;
    // 
    string horizontal_cover169 = 8;
    // 
    string horizontal_cover1610 = 9;
}

// 
enum SecurityLevel {
    // 
    LEVEL_UNKNOWN = 0;
    // 
    LEVEL_L1 = 1;
    // 
    LEVEL_L2 = 2;
    // 
    LEVEL_L3 = 3;
}

// 
message SegmentVideo {
    // 
    repeated ResponseUrl segment = 1;
}

// 
message Shake {
    // 
    string file = 1;
}

// 
message Stream {
    // 
    oneof content {
        // 
        DashVideo dash_video = 2;
        // 
        SegmentVideo segment_video = 3;
        // 
        MultiDashVideo multi_dash_video = 4;
    }
    // 
    StreamInfo stream_info = 1;
}

// 
message StreamInfo {
    // 
    int32 quality = 1;
    // 
    string format = 2;
    // 
    string description = 3;
    // 
    PlayErr err_code = 4;
    // 
    StreamLimit limit = 5;
    // 
    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;
    // 
    Scheme scheme = 14;
    // 
    bool support_drm = 15;
    // 
    string subtitle = 16;
}

// 
message StreamLimit {
    // 
    string title = 1;
    // 
    string uri = 2;
    // 
    string msg = 3;
}

// 
message TaskParam {
    // 
    string task_type = 1;
    // 
    int64 activity_id = 2;
    // 
    int64 tips_id = 3;
}

// 
message TextInfo {
    // 
    string text = 1;
    // 
    string text_color = 2;
    // 
    string text_color_night = 3;
}

// 
message Toast {
    // 
    string text = 1;
    // 
    ButtonInfo button = 2;
    // 
    int32 show_style_type = 3;
    // 
    string icon = 4;
    // 
    TextInfo toast_text = 5;
    // 
    Report report = 6;
    // 
    map<string, string> order_report_params = 7;
}

// 
message UserStatus {
    // 
    bool pay_check = 1;
    // 
    bool sponsor = 2;
    // 
    WatchProgress watch_progress = 3;
    // 
    WatchProgress aid_watch_progress = 4;
}

// 
message VideoInfo {
    // 
    int32 quality = 1;
    // 
    string format = 2;
    // 
    int64 timelength = 3;
    // 
    int32 video_codecid = 4;
    // 
    repeated Stream stream_list = 5;
    // 
    repeated DashItem dash_audio = 6;
    // 
    DolbyItem dolby = 7;
    // 
    int64 main_timelength = 8;
}

// 
message ViewInfo {
    // 
    Dialog dialog = 1;
    // 
    Toast toast = 2;
    // 
    CouponInfo coupon_info = 3;
    // 
    repeated int64 demand_no_pay_epids = 4;
    // 
    EndPage end_page = 5;
    // 
    map<string, bool> exp_config = 6;
    // 
    PopWin pop_win = 7;
    // 
    PromptBar try_watch_prompt_bar = 8;
    // 
    PayTip pay_tip = 9;
    // 
    HighDefinitionTrialInfo high_definition_trial_info = 10;
    // 
    map<string, Dialog> ext_dialog = 11;
    // 
    Animation animation = 12;
    // 
    map<string, Toast> ext_toast = 13;
    // 
    ExtraData extra_data = 14;
}

// 
message WatchProgress {
    // 
    int32 last_ep_id = 1;
    // 
    string last_ep_index = 2;
    // 
    int64 progress = 3;
    // 
    int64 last_play_cid = 4;
    // 
    Toast toast = 5;
    // 
    Toast toast_without_time = 6;
    // 
    int64 last_play_aid = 7;
}

