{
  "title": "live-player",
  "type": "object",
  "properties": {
    "src": {
      "type": "string",
      "description": "音视频地址。目前仅支持 flv, rtmp 格式"
    },
    "mode": {
      "type": "string",
      "description": "模式",
      "defaultValue": "live",
      "enum": [
        "live",
        "RTC"
      ]
    },
    "autoplay": {
      "type": "boolean",
      "description": "自动播放",
      "defaultValue": false
    },
    "muted": {
      "type": "boolean",
      "description": "是否静音",
      "defaultValue": false
    },
    "orientation": {
      "type": "string",
      "description": "画面方向",
      "defaultValue": "vertical",
      "enum": [
        "vertical",
        "horizontal"
      ]
    },
    "object-fit": {
      "type": "string",
      "description": "填充模式，可选值有 contain，fillCrop",
      "defaultValue": "contain",
      "enum": [
        "contain",
        "fillCrop"
      ]
    },
    "background-mute": {
      "type": "boolean",
      "description": "进入后台时是否静音（已废弃，默认退后台静音）",
      "defaultValue": false
    },
    "min-cache": {
      "type": "number",
      "description": "最小缓冲区，单位s（RTC 模式推荐 0.2s）",
      "defaultValue": 1
    },
    "max-cache": {
      "type": "number",
      "description": "最大缓冲区，单位s（RTC 模式推荐 0.8s）。缓冲区用来抵抗网络波动，缓冲数据越多，网络抗性越好，但时延越大。",
      "defaultValue": 3
    },
    "sound-mode": {
      "type": "string",
      "description": "声音输出方式",
      "defaultValue": "speaker",
      "enum": [
        "speaker",
        "ear"
      ]
    },
    "auto-pause-if-navigate": {
      "type": "boolean",
      "description": "当跳转到本小程序的其他页面时，是否自动暂停本页面的实时音视频播放",
      "defaultValue": true
    },
    "auto-pause-if-open-native": {
      "type": "boolean",
      "description": "当跳转到其它微信原生页面时，是否自动暂停本页面的实时音视频播放",
      "defaultValue": true
    },
    "picture-in-picture-mode": {
      "type": [
        "string",
        "any[]"
      ],
      "description": "设置小窗模式： push, pop，空字符串或通过数组形式设置多种模式（如： [\"push\", \"pop\"]）",
      "enum": [
        "[]",
        "push",
        "pop"
      ]
    },
    "enable-auto-rotation": {
      "type": "boolean",
      "description": "是否开启手机横屏时自动全屏，当系统设置开启自动旋转时生效",
      "defaultValue": false
    },
    "referrer-policy": {
      "type": "string",
      "description": "格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html，其中 {appid} 为小程序的 appid，{version} 为小程序的版本号，版本号为 0 表示为开发版、体验版以及审核版本，版本号为 devtools 表示为开发者工具，其余为正式版本；",
      "defaultValue": "no-referrer",
      "enum": [
        "origin",
        "no-referrer"
      ]
    },
    "enable-casting": {
      "type": "boolean",
      "description": "是否支持投屏。开启后，可以通过 LivePlayerContext 上相关方法进行操作。",
      "defaultValue": false
    },
    "bindStateChange": {
      "tsType": "() => void",
      "description": "播放状态变化事件，detail = {code}"
    },
    "bindFullScreenChange": {
      "tsType": "() => void",
      "description": "全屏变化事件，detail = {direction, fullScreen}"
    },
    "bindNetStatus": {
      "tsType": "() => void",
      "description": "网络状态通知，detail = {info}"
    },
    "bindAudioVolumeNotify": {
      "tsType": "() => void",
      "description": "播放音量大小通知，detail = {}"
    },
    "bindEnterPictureInPicture": {
      "tsType": "() => void",
      "description": "播放器进入小窗"
    },
    "bindLeavePictureInPicture": {
      "tsType": "() => void",
      "description": "播放器退出小窗"
    },
    "bindCastingUserSelect": {
      "tsType": "() => void",
      "description": "用户选择投屏设备时触发 detail = { state: \"success\"/\"fail\" }"
    },
    "bindCastingStateChange": {
      "tsType": "() => void",
      "description": "投屏成功/失败时触发 detail = { type, state: \"success\"/\"fail\" }"
    },
    "bindCastingInterrupt": {
      "tsType": "() => void",
      "description": "投屏被中断时触发"
    }
  },
  "additionalProperties": false
}