{
  "title": "video",
  "type": "object",
  "properties": {
    "style": {
      "type": "string",
      "description": "内联样式。"
    },
    "class": {
      "type": "string",
      "description": "外部样式名。"
    },
    "src": {
      "type": "string",
      "description": "要播放视频的资源地址，支持网络地址，支持优酷视频编码（支付宝客户端 10.1.75）。\nsrc 支持的协议如下：\nvid/showId: XMzg2Mzc5MzMwMA==\napFilePath: https://resource/xxx.video。"
    },
    "poster": {
      "type": "string",
      "description": "视频封面图的 url，支持 jpg、png 等图片，如 https://***.jpg。如果不传的话，默认取视频的首帧图作为封面图。"
    },
    "poster-size": {
      "type": "string",
      "description": "当 poster 高宽比跟视频高宽不匹配时，如何显示 poster，设置规则同 background-size 一致。",
      "defaultValue": "contain"
    },
    "object-fit": {
      "type": "string",
      "description": "当视频大小与 video 容器大小不一致时，视频的表现形式。contain：包含，fill：填充。",
      "defaultValue": "contain"
    },
    "initial-time": {
      "type": "number",
      "description": "指定视频初始播放位置，单位 s。"
    },
    "duration": {
      "type": "number",
      "description": "为无法读取时长的视频设置时长，单位 s。"
    },
    "controls": {
      "type": "boolean",
      "description": "是否显示默认播放控件（底部工具条，包括播放/暂停按钮、播放进度、时间）。",
      "defaultValue": true
    },
    "autoplay": {
      "type": "boolean",
      "description": "是否自动播放。",
      "defaultValue": false
    },
    "direction": {
      "type": "number",
      "description": "设置全屏时视频的方向，不指定则根据宽高比自动判断。有效值为 0（正常竖向）, 90（屏幕逆时针 90 度）, -90（屏幕顺时针 90 度）"
    },
    "loop": {
      "type": "boolean",
      "description": "是否循环播放。",
      "defaultValue": false
    },
    "muted": {
      "type": "boolean",
      "description": "是否静音播放。",
      "defaultValue": false
    },
    "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
    },
    "show-mute-btn": {
      "type": "boolean",
      "description": "是否展示工具栏上的静音按钮。",
      "defaultValue": true
    },
    "show-thin-progress-bar": {
      "type": "boolean",
      "description": "当底部工具条隐藏时，是否显示细进度条（controls=false 时设置无效）。",
      "defaultValue": false
    },
    "enable-progress-gesture": {
      "type": "boolean",
      "description": "全屏模式下是否开启控制进度的手势。",
      "defaultValue": false
    },
    "mobilenet-hint-type": {
      "type": "number",
      "description": "移动网络提醒样式。\n\n0 - 不提醒\n1 - tip 提醒\n2 - 阻塞提醒(无消耗流量大小)\n3 - 阻塞提醒(有消耗流量大小提醒)",
      "defaultValue": 1
    },
    "onPlay": {
      "tsType": "() => void",
      "description": "当开始/继续播放时触发 play 事件。"
    },
    "onPause": {
      "tsType": "() => void",
      "description": "当暂停播放时触发 pause 事件。"
    },
    "onEnded": {
      "tsType": "() => void",
      "description": "当播放到末尾时触发 ended 事件。"
    },
    "onTimeUpdate": {
      "tsType": "() => void",
      "description": "播放进度变化时触发，event.detail = {currentTime: '当前播放时间',userPlayDuration:'用户实际观看时长',videoDuration:'视频总时长'}。"
    },
    "onLoading": {
      "tsType": "() => void",
      "description": "视频出现缓冲时触发。"
    },
    "onError": {
      "tsType": "() => void",
      "description": "视频播放出错时触发（errorCode 见下面错误码表）。"
    },
    "onFullScreenChange": {
      "tsType": "() => void",
      "description": "视频进入和退出全屏时触发，event.detail = {fullScreen, direction}，direction 取为 vertical 或 horizontal。"
    },
    "onTap": {
      "tsType": "() => void",
      "description": "点击视频 view 时触发，event.detail = {ptInView:{x:0,y:0}}。"
    },
    "onUserAction": {
      "tsType": "() => void",
      "description": "用户操作事件，event.detail = {tag:\"mute\", value:0}，tag 为用户操作的元素，目前支持的 tag 有：play（底部播放按钮）、centerplay（中心播放按钮）、mute（静音按钮）、fullscreen（全屏按钮）、retry（重试按钮）、mobilenetplay（网络提醒的播放按钮）。"
    },
    "onStop": {
      "tsType": "() => void",
      "description": "视频播放终止。"
    },
    "onRenderStart": {
      "tsType": "() => void",
      "description": "当视频加载完真正开始播放时触发。"
    },
    "floating-mode": {
      "type": "string",
      "description": "浮窗设置。暂时不支持全局浮窗。\n可选值：\n\nnone：无浮窗。\npage：页面内浮窗。",
      "defaultValue": "none"
    }
  },
  "additionalProperties": false
}