Bricks Schema 中文文档:视频控件

📄 原始资料  |  展开查看原始 JSON(video.json){ “$schema”: “https://json-schema.org/draft/2020-12/schema”, “$id”: “bricks://controls/video”, “schemaVersion”: “2.3”, “title”: “Video Control”, “description”: “Video settings”, “controlProperties”: [ “type”, “label”, “tab”, “hasRequired” ], “type”: “objec…

📄 原始资料  |  展开查看原始 JSON(video.json)
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://controls/video",
  "schemaVersion": "2.3",
  "title": "Video Control",
  "description": "Video settings",
  "controlProperties": [
    "type",
    "label",
    "tab",
    "hasRequired"
  ],
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "enum": [
        "media",
        "youtube",
        "vimeo",
        "url"
      ]
    },
    "id": {
      "type": [
        "string",
        "integer"
      ]
    },
    "url": {
      "type": "string"
    },
    "youtubeId": {
      "type": "string"
    },
    "vimeoId": {
      "type": "string"
    },
    "autoplay": {
      "type": "boolean"
    },
    "loop": {
      "type": "boolean"
    },
    "muted": {
      "type": "boolean"
    },
    "controls": {
      "type": "boolean"
    }
  },
  "titleZh": "视频控件",
  "descriptionZh": "视频设置。"
}

前言

视频设置。

基本信息

  • 英文名称Video Control
  • 中文名称:视频控件
  • Schema IDbricks://controls/video
  • Schema 版本2.3
  • 类型object

属性

  • source (string)
  • id (["string", "integer"])
  • url (string)
  • youtubeId (string)
  • vimeoId (string)
  • autoplay (boolean)
  • loop (boolean)
  • muted (boolean)
  • controls (boolean)

Schema 定义

完整 JSON 定义

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "bricks://controls/video",
  "schemaVersion": "2.3",
  "title": "Video Control",
  "description": "Video settings",
  "controlProperties": [
    "type",
    "label",
    "tab",
    "hasRequired"
  ],
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "enum": [
        "media",
        "youtube",
        "vimeo",
        "url"
      ]
    },
    "id": {
      "type": [
        "string",
        "integer"
      ]
    },
    "url": {
      "type": "string"
    },
    "youtubeId": {
      "type": "string"
    },
    "vimeoId": {
      "type": "string"
    },
    "autoplay": {
      "type": "boolean"
    },
    "loop": {
      "type": "boolean"
    },
    "muted": {
      "type": "boolean"
    },
    "controls": {
      "type": "boolean"
    }
  },
  "titleZh": "视频控件",
  "descriptionZh": "视频设置。"
}

补充说明

更多细节可参考 Bricks 官方 Academy 文档