# Media
Cardscript
Displays a media player for audio or video content.
# Example
{
"type": "AdaptiveCard",
"body": [
{
"type": "Media",
"poster": "https://adaptivecards.io/content/poster-video.png",
"sources": [
{
"mimeType": "video/mp4",
"url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp4"
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.0"
}
# Required properties
# type
Must be "Media"
.
- Type:
string
- Values:
Media
# Optional properties
# sources
Array of media sources to attempt to play.
- Type:
array
# poster
URL of an image to display before playing.
- Type:
string
- Format:
uri
(opens new window)
# altText
Alternate text describing the audio or video.
- Type:
string
# id
A unique identifier associated with the element.
- Type:
string
# spacing
Controls the amount of spacing between this element and the preceding element.
- Type:
string
- Values:
none
small
default
medium
large
extraLarge
padding
# separator
When true
, draw a separating line at the top of the element.
- Type:
boolean
# JSON Schema
{
"additionalProperties": true,
"type": "Media",
"description": "Displays a media player for audio or video content.",
"version": "1.1",
"allOf": [
{
"$ref": "#/definitions/CardElement"
}
],
"properties": {
"type": {
"type": "string",
"description": "Must be `\"Media\"`.",
"enum": [
"Media"
]
},
"sources": {
"type": "array",
"description": "Array of media sources to attempt to play.",
"items": {
"$ref": "#/definitions/MediaSource"
}
},
"poster": {
"type": "string",
"format": "uri",
"description": "URL of an image to display before playing."
},
"altText": {
"type": "string",
"description": "Alternate text describing the audio or video."
}
},
"required": [
"type"
],
"typeSafe": "media",
"example": "FIXME!",
"propertySummary": [
{
"name": "type",
"type": "string",
"required": "Required",
"text": "Must be `\"Media\"`."
},
{
"name": "sources",
"type": "array",
"required": "Optional",
"text": "Array of media sources to attempt to play."
},
{
"name": "poster",
"type": "string",
"required": "Optional",
"text": "URL of an image to display before playing."
},
{
"name": "altText",
"type": "string",
"required": "Optional",
"text": "Alternate text describing the audio or video."
}
]
}