{
  "title": "camera",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "description": "模式，不支持动态修改，详情见 mode 的合法值。",
      "defaultValue": "normal",
      "enum": [
        "normal",
        "scanCode"
      ]
    },
    "resolution": {
      "type": "string",
      "description": "分辨率，不支持动态修改，详情见 resolution 的合法值。",
      "defaultValue": "medium",
      "enum": [
        "low",
        "medium",
        "high"
      ]
    },
    "device-position": {
      "type": "string",
      "description": "摄像头朝向，详情见 device-position 的合法值。",
      "defaultValue": "back",
      "enum": [
        "front",
        "back"
      ]
    },
    "flash": {
      "type": "string",
      "description": "闪光灯，详情见 flash 的合法值。",
      "defaultValue": "off",
      "enum": [
        "off",
        "torch"
      ]
    },
    "frame-size": {
      "type": "string",
      "description": "指定期望的相机帧数据尺寸，详情见 frame-size 的合法值。",
      "defaultValue": "medium",
      "enum": [
        "small",
        "medium",
        "large"
      ]
    },
    "bindInitDone": {
      "tsType": "() => void",
      "description": "相机初始化完成时触发，e.detail = {maxZoom}。"
    },
    "bindError": {
      "tsType": "() => void",
      "description": "用户不允许使用摄像头或相机异常时触发。"
    },
    "bindStop": {
      "tsType": "() => void",
      "description": "摄像头在非正常终止时触发，如退出后台/跳转页面/电话中断等情况。"
    },
    "bindScanCode": {
      "tsType": "() => void",
      "description": "在扫码识别成功时触发，仅在 mode=\"scanCode\" 时生效。"
    }
  },
  "additionalProperties": false
}