{
  "description": "Media players select media by its Port OS media ID, play supplied audio or a URI, and control playback. Read playback state and use only the commands supported by the connected player.",
  "type": "object",
  "properties": {
    "supportedMediaResources": {
      "type": "array",
      "description": "Exact play-media URI combinations accepted by this route. Member or endpoint unions do not imply support by every route.",
      "items": {
        "title": "SupportedMediaResource",
        "description": "A provider, media type and resource-kind combination accepted by a control route.",
        "type": "object",
        "properties": {
          "provider": {
            "$ref": "#/properties/supportedAudioProviders/items"
          },
          "mediaType": {
            "type": "string",
            "enum": [
              "AUDIO",
              "VIDEO",
              "IMAGE"
            ]
          },
          "resourceKinds": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "string",
              "description": "Lowercase resource-kind segment from the provider URI."
            }
          }
        },
        "required": [
          "provider",
          "mediaType",
          "resourceKinds"
        ],
        "additionalProperties": false
      }
    },
    "supportedAudioProviders": {
      "type": "array",
      "uniqueItems": true,
      "description": "Audio services accepted by search-and-play on this endpoint. These describe command support, not active subscriptions.",
      "items": {
        "type": "string",
        "description": "Media service identifier. A provider enum value does not imply that every endpoint supports that service; use the endpoint's advertised provider lists.",
        "enum": [
          "SPOTIFY",
          "AMAZON_MUSIC",
          "APPLE_MUSIC",
          "AUDIBLE",
          "TUNE_IN",
          "PANDORA",
          "IHEART_RADIO",
          "SIRIUSXM",
          "DEEZER",
          "TIDAL",
          "YOUTUBE",
          "NETFLIX",
          "PRIME_VIDEO",
          "DAILYMOTION"
        ]
      }
    },
    "supportedVideoProviders": {
      "type": "array",
      "uniqueItems": true,
      "description": "Video services accepted by search-and-play on this endpoint. These describe command support, not installed applications or active subscriptions.",
      "items": {
        "$ref": "#/properties/supportedAudioProviders/items"
      }
    },
    "defaultAudioProvider": {
      "description": "Default service for an audio search. Must be in supportedAudioProviders.",
      "allOf": [
        {
          "$ref": "#/properties/supportedAudioProviders/items"
        }
      ]
    },
    "defaultVideoProvider": {
      "description": "Default service for a video search. Must be in supportedVideoProviders.",
      "allOf": [
        {
          "$ref": "#/properties/supportedAudioProviders/items"
        }
      ]
    },
    "supportedPlaybackStates": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "The current playback state",
        "enum": [
          "PLAYING",
          "PAUSED",
          "STOPPED",
          "LOADING",
          "ERROR"
        ]
      },
      "description": "Supported playback states"
    },
    "supportedPlaybackSpeeds": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "description": "Supported playback speeds (e.g., 0.5, 1.0, 1.5, 2.0)"
    },
    "seekRange": {
      "description": "Seek range in seconds",
      "allOf": [
        {
          "type": "object",
          "description": "Range of measurement values (min and max)",
          "properties": {
            "min": {
              "type": "number",
              "description": "Minimum measured value"
            },
            "max": {
              "type": "number",
              "description": "Maximum measured value"
            }
          },
          "required": [
            "min",
            "max"
          ],
          "additionalProperties": false,
          "title": "MeasurementRange"
        }
      ]
    },
    "supportedMediaTypes": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "AUDIO",
          "VIDEO",
          "IMAGE",
          "PLAYLIST"
        ]
      },
      "description": "List of supported media types"
    },
    "supportedFormats": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "MP3",
          "WAV",
          "FLAC",
          "AAC",
          "OGG",
          "MP4",
          "AVI",
          "MKV",
          "JPG",
          "PNG",
          "GIF"
        ]
      },
      "description": "List of supported media formats"
    },
    "maxPlaylistSize": {
      "type": "integer",
      "description": "Maximum number of items in a playlist",
      "minimum": 1,
      "maximum": 10000
    },
    "defaultQuality": {
      "type": "string",
      "description": "Default quality setting for media playback",
      "enum": [
        "LOW",
        "MEDIUM",
        "HIGH",
        "LOSSLESS"
      ]
    },
    "supportsPlayURI": {
      "type": "boolean",
      "description": "Whether the endpoint can play an audio URI."
    },
    "supportedURISourceTypes": {
      "type": "array",
      "uniqueItems": true,
      "description": "Exact source kinds accepted by play-uri on this route. With URI support, omission admits FILE only; an empty list admits none. LIVE_STREAM must be explicitly listed. This does not resolve provider catalog identities.",
      "items": {
        "type": "string",
        "description": "Transport source kind for play-uri. FILE is finite externally hosted audio; LIVE_STREAM is continuous live audio and requires explicit route support. Neither value resolves a catalog provider identity.",
        "enum": [
          "FILE",
          "LIVE_STREAM"
        ]
      }
    },
    "supportedAudioMimeTypes": {
      "type": "array",
      "description": "Audio MIME types accepted by play-audio. Advertise play-audio only when audio output is supported.",
      "items": {
        "type": "string"
      }
    },
    "maxAudioDurationSeconds": {
      "type": "integer",
      "minimum": 1,
      "maximum": 86400,
      "description": "Maximum encoded duration accepted by play-audio. Longer inputs are rejected without truncation."
    },
    "audioPlaybackMode": {
      "type": "string",
      "enum": [
        "CLIP",
        "QUEUE"
      ],
      "description": "CLIP means finite immediate play-audio playback, which may interrupt or duck current content. QUEUE means finite controllable play-audio playback that replaces the current playback session. Neither mode appends to an existing queue, resolves a provider track, or establishes a live stream."
    }
  },
  "additionalProperties": false,
  "title": "MediaPlayerInterfaceConfiguration"
}
