{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://egatari.org/schema/deck-audio.schema.json",
  "title": "Egatari 1.0 runtime audio (#deck-audio)",
  "type": "object",
  "propertyNames": {
    "$ref": "egatari-index.schema.json#/$defs/stepKey"
  },
  "additionalProperties": {
    "type": "object",
    "required": [
      "src",
      "dur",
      "cues"
    ],
    "properties": {
      "src": {
        "type": "string",
        "pattern": "^(data:audio/[a-z0-9.+-]+;base64,|egatari:[A-Za-z0-9_]{1,32}$)"
      },
      "dur": {
        "type": "number",
        "exclusiveMinimum": 0
      },
      "cues": {
        "type": "array",
        "items": {
          "type": "number",
          "minimum": 0
        }
      },
      "sync": {
        "enum": [
          "auto",
          "manual",
          "none"
        ],
        "default": "auto"
      },
      "mime": {
        "type": "string",
        "pattern": "^audio/[a-z0-9.+-]+$"
      }
    },
    "if": {
      "properties": {
        "sync": {
          "const": "none"
        }
      },
      "required": [
        "sync"
      ]
    },
    "then": {
      "properties": {
        "cues": {
          "maxItems": 0
        }
      }
    }
  }
}
