{
  "title": "video",
  "type": "object",
  "properties": {
    "src": {
      "type": "string",
      "description": "要播放视频的资源地址，支持云文件ID"
    },
    "duration": {
      "type": "number",
      "description": "指定视频时长"
    },
    "controls": {
      "type": "boolean",
      "description": "是否显示默认播放控件（播放/暂停按钮、播放进度、时间）",
      "defaultValue": true
    },
    "danmu-list": {
      "type": "objectArray",
      "description": "弹幕列表"
    },
    "danmu-btn": {
      "type": "boolean",
      "description": "是否显示弹幕按钮，只在初始化时有效，不能动态变更",
      "defaultValue": false
    },
    "enable-danmu": {
      "type": "boolean",
      "description": "是否展示弹幕，只在初始化时有效，不能动态变更",
      "defaultValue": false
    },
    "autoplay": {
      "type": "boolean",
      "description": "是否自动播放",
      "defaultValue": false
    },
    "loop": {
      "type": "boolean",
      "description": "是否循环播放",
      "defaultValue": false
    },
    "muted": {
      "type": "boolean",
      "description": "是否静音播放",
      "defaultValue": false
    },
    "initial-time": {
      "type": "number",
      "description": "指定视频初始播放位置"
    },
    "page-gesture": {
      "type": "boolean",
      "description": "在非全屏模式下，是否开启亮度与音量调节手势",
      "defaultValue": false
    },
    "direction": {
      "type": "number",
      "description": "设置全屏时视频的方向，不指定则根据宽高比自动判断。有效值为 0（正常竖向）, 90（屏幕逆时针90度）, -90（屏幕顺时针90度）"
    },
    "show-progress": {
      "type": "boolean",
      "description": "若不设置，宽度大于240时才会显示",
      "defaultValue": true
    },
    "show-fullscreen-btn": {
      "type": "boolean",
      "description": "是否显示全屏按钮",
      "defaultValue": true
    },
    "show-play-btn": {
      "type": "boolean",
      "description": "是否显示视频底部控制栏的播放按钮",
      "defaultValue": true
    },
    "show-center-play-btn": {
      "type": "boolean",
      "description": "是否显示视频中间的播放按钮",
      "defaultValue": true
    },
    "enable-progress-gesture": {
      "type": "boolean",
      "description": "是否开启控制进度的手势",
      "defaultValue": true
    },
    "object-fit": {
      "type": "string",
      "description": "当视频大小与 video 容器大小不一致时，视频的表现形式。contain：包含，fill：填充，cover：覆盖",
      "defaultValue": "contain"
    },
    "poster": {
      "type": "string",
      "description": "视频封面的图片网络资源地址或云文件ID。若 controls 属性值为 false 则设置 poster 无效"
    },
    "show-mute-btn": {
      "type": "boolean",
      "description": "是否显示静音按钮",
      "defaultValue": false
    },
    "title": {
      "type": "string",
      "description": "视频的标题，全屏时在顶部展示"
    },
    "play-btn-position": {
      "type": "string",
      "description": "播放按钮的位置，有效值为：bottom（controls bar 上）、center（视频中间）",
      "defaultValue": "bottom"
    },
    "enable-play-gesture": {
      "type": "boolean",
      "description": "是否开启播放手势，即双击切换播放/暂停",
      "defaultValue": false
    },
    "auto-pause-if-navigate": {
      "type": "boolean",
      "description": "当跳转到其它小程序页面时，是否自动暂停本页面的视频",
      "defaultValue": true
    },
    "auto-pause-if-open-native": {
      "type": "boolean",
      "description": "当跳转到其它QQ原生页面时，是否自动暂停本页面的视频",
      "defaultValue": true
    },
    "bindPlay": {
      "tsType": "() => void",
      "description": "当开始/继续播放时触发play事件"
    },
    "bindPause": {
      "tsType": "() => void",
      "description": "当暂停播放时触发 pause 事件"
    },
    "bindEnded": {
      "tsType": "() => void",
      "description": "当播放到末尾时触发 ended 事件"
    },
    "bindTimeUpdate": {
      "tsType": "() => void",
      "description": "播放进度变化时触发，event.detail = {currentTime, duration} 。触发频率 250ms 一次"
    },
    "bindFullScreenChange": {
      "tsType": "() => void",
      "description": "视频进入和退出全屏时触发，event.detail = {fullScreen, direction}，direction 有效值为 vertical 或 horizontal"
    },
    "bindWaiting": {
      "tsType": "() => void",
      "description": "视频出现缓冲时触发"
    },
    "bindError": {
      "tsType": "() => void",
      "description": "视频播放出错时触发"
    },
    "bindProgress": {
      "tsType": "() => void",
      "description": "加载进度变化时触发，只支持一段加载。event.detail = {buffered}，百分比"
    }
  },
  "additionalProperties": false
}