syntax = "proto3";

package bilibili.cheese.gateway.player.v1;

import "bilibili/app/playurl/v1.proto";

service PlayURL {
    //课程播放url接口
    //https://app.bilibili.com/bilibili.cheese.gateway.player.v1.PlayURL/PlayView
    rpc PlayView (playViewReq) returns (PlayViewReply);
}

//获取播放url-请求
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 forceHost = 7;
    
    //允许4K
    bool fourk = 8;
    
    //
    string spmid = 9;
    
    //
    string fromSpmid = 10;
    
    //青少年模式
    int32 teenagersMode = 11;
    
    //编码类型
    CodeType codetype = 12;
    
    //是否强制请求预览视频
    bool isPreview = 13;
}

//获取播放url-回复
message PlayViewReply {
	//视频信息
    bilibili.app.playurl.v1.VideoInfo info = 1;
    
    //播放界面配置
    PlayAbilityConf PlayConf = 2;
}

//编码类型
enum CodeType {
    //默认
	NOCODE = 0;

    //H.264
	CODE264 = 1;

    //H.265
	CODE265 = 2;
}

//禁用功能配置
message PlayAbilityConf {
    //后台播放
    bool backgroundPlayDisable=1;

    //镜像反转
    bool flipDisable=2;

    //投屏
    bool castDisable=3;

    //反馈
    bool feedbackDisable=4;

    //字幕
    bool subtitleDisable=5;

    //播放速度
    bool playbackRateDisable=6;

    //定时停止
    bool timeUpDisable=7;

    //播放方式
    bool playbackModeDisable=8;

    //画面尺寸
    bool scaleModeDisable=9;

    //赞
    bool likeDisable=10;

    //踩
    bool dislikeDisable=11;

    //投币
    bool coinDisable=12;

    //充电
    bool elecDisable=13;

    //分享
    bool shareDisable=14;

    //截图
    bool screenShotDisable=15;

    //锁定
    bool lockScreenDisable=16;

    //相关推荐
    bool recommendDisable=17;

    //播放速度
    bool playbackSpeedDisable=18;

    //清晰度
    bool definitionDisable=19;

    //选集
    bool selectionsDisable=20;

    //下一集
    bool nextDisable=21;

    //编辑弹幕
    bool editDmDisable=22;

    //小窗
    bool smallWindowDisable=23;

    //震动
    bool shakeDisable=24;

    //
    bool outerDmDisable=25;

    //
    bool innerDmDisable=26;

    //
    bool freyaEnterDisable=27;

    //杜比音效
    bool dolbyDisable=28;
}