{
  "title": "video",
  "type": "object",
  "properties": {
    "src": {
      "type": "string",
      "description": "视频的资源地址，支持云文件 ID"
    },
    "title": {
      "type": "string",
      "description": "视频标题，全屏时在视频顶部展示"
    },
    "initial-time": {
      "type": "number",
      "description": "指定视频初始播放位置"
    },
    "controls": {
      "type": "boolean",
      "description": "是否显示默认播放控件（播放/暂停按钮、播放进度、时间）",
      "defaultValue": true
    },
    "autoplay": {
      "type": "boolean",
      "description": "是否自动播放",
      "defaultValue": false
    },
    "loop": {
      "type": "boolean",
      "description": "是否循环播放",
      "defaultValue": false
    },
    "muted": {
      "type": "boolean",
      "description": "是否静音播放",
      "defaultValue": false
    },
    "objectFit": {
      "type": "string",
      "description": "当视频大小与 video 容器大小不一致时，视频的表现形式。contain：包含；fill：填充；cover：覆盖",
      "defaultValue": "contain",
      "enum": [
        "contain",
        "fill",
        "cover"
      ]
    },
    "poster": {
      "type": "string",
      "description": "视频封面的图片网络资源地址，支持云文件 ID"
    },
    "page-gesture": {
      "type": "boolean",
      "description": "在非全屏模式下，是否开启使用手势调节亮度与音量，兼容 vslide-gesture 属性",
      "defaultValue": false
    },
    "direction": {
      "type": "number",
      "description": "按设置的视频全屏方向进入全屏。不指定视频全屏方向时则根据设备方向判断全屏方向。0：正常竖向；90：屏幕顺时针 90 度；-90：屏幕逆时针 90 度",
      "enum": [
        "0",
        "90",
        "-90"
      ]
    },
    "show-progress": {
      "type": "boolean",
      "description": "若不设置，宽度大于 240 时才会显示",
      "defaultValue": true
    },
    "show-fullscreen-btn": {
      "type": "boolean",
      "description": "是否显示全屏按钮",
      "defaultValue": true
    },
    "enable-progress-gesture": {
      "type": "boolean",
      "description": "是否开启使用手势控制进度",
      "defaultValue": true
    },
    "danmu-list": {
      "type": "array.<object>",
      "description": "弹幕列表"
    },
    "danmu-btn": {
      "type": "boolean",
      "description": "是否显示弹幕按钮，只在初始化时有效，不能动态变更",
      "defaultValue": false
    },
    "enable-danmu": {
      "type": "boolean",
      "description": "是否展示弹幕，只在初始化时有效，不能动态变更",
      "defaultValue": false
    },
    "show-play-btn": {
      "type": "boolean",
      "description": "是否显示视频底部控制栏的播放按钮",
      "defaultValue": true
    },
    "show-center-play-btn": {
      "type": "boolean",
      "description": "是否显示视频中间的播放按钮",
      "defaultValue": true
    },
    "show-mute-btn": {
      "type": "boolean",
      "description": "是否显示静音按钮",
      "defaultValue": false
    },
    "show-no-wifi-tip": {
      "type": "boolean",
      "description": "非 wifi 环境下是否显示继续播放浮层",
      "defaultValue": true
    },
    "vslide-gesture": {
      "type": "boolean",
      "description": "非全屏模式下，是否开启亮度与音量调节手势，兼容 page-gesture 属性",
      "defaultValue": false
    },
    "vslide-gesture-in-fullscreen": {
      "type": "boolean",
      "description": "全屏模式下，是否开启亮度与音量调节手势",
      "defaultValue": true
    },
    "show-lock-btn": {
      "type": "boolean",
      "description": "全屏模式下，是否显示锁屏按钮",
      "defaultValue": true
    },
    "enable-play-gesture": {
      "type": "boolean",
      "description": "是否开启播放手势，即双击切换播放/暂停",
      "defaultValue": false
    },
    "show-rate-btn": {
      "type": "boolean",
      "description": "是否显示倍速播放按钮",
      "defaultValue": false
    },
    "show-vslide-btn-in-fullscreen": {
      "type": "boolean",
      "description": "全屏模式下，是否显示侧边栏控制按钮",
      "defaultValue": true
    },
    "silent-play": {
      "type": "boolean",
      "description": "是否进入无声视频模式，进入无声视频模式后，视频将静音播放且不响应系统物理音量变化，点击播放器提示无声视频，手势调节失效",
      "defaultValue": false
    },
    "bindPlay": {
      "tsType": "() => void",
      "description": "当开始播放时触发 play 事件"
    },
    "bindPause": {
      "tsType": "() => void",
      "description": "当暂停播放时触发 pause 事件"
    },
    "bindEnded": {
      "tsType": "() => void",
      "description": "当播放到末尾时触发 ended 事件"
    },
    "bindTimeUpdate": {
      "tsType": "() => void",
      "description": "播放进度变化时触发。event.detail = {currentTime, duration}"
    },
    "bindFullScreenChange": {
      "tsType": "() => void",
      "description": "当视频进入和退出全屏时触发。event.detail = {fullscreen, direction}，direction 取为 vertical 或 horizontal"
    },
    "bindWaiting": {
      "tsType": "() => void",
      "description": "视频出现缓冲时触发"
    },
    "bindError": {
      "tsType": "() => void",
      "description": "视频播放出错时触发"
    },
    "bindLoadedMetaData": {
      "tsType": "() => void",
      "description": "视频元数据加载完成时触发。event.detail = {width, height, duration}"
    },
    "bindControlsToggle": {
      "tsType": "() => void",
      "description": "切换controls控件显示隐藏时触发。event.detail = {show}"
    }
  },
  "additionalProperties": false,
  "required": [
    "src"
  ]
}