Schema Explorer

Media

Displays a media player for audio or video content.

Introduced in version 1.1

Property Type Required Description Version
type "Media" Yes Must be "Media". 1.1
sources object [] No Array of media sources to attempt to play. 1.1
poster string No URL of an image to display before playing. 1.1
altText string No Alternate text describing the audio or video. 1.1
id string No A unique identifier associated with the element. 1.1
spacing string No Controls the amount of spacing between this element and the preceding element. 1.1
separator boolean No, default: false When true, draw a separating line at the top of the element. 1.1

Example

{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.1",
	"fallbackText": "This card requires Media to be viewed. Ask your platform to update to Adaptive Cards v1.1 for this an more!",
    "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", "type": "AdaptiveCard", "version": "1.1", "fallbackText": "This card requires Media to be viewed. Ask your platform to update to Adaptive Cards v1.1 for this an more!", "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" } ] } ] }
Try it Yourself »

Properties

type

Must be "Media".

  • Type: "Media"
  • Required: Yes
  • Allowed values:
    • Media

sources

Array of media sources to attempt to play.

  • Type: object []
  • Required: No

Example

{
	"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
	"type": "AdaptiveCard",
	"version": "1.1",
	"body": [
		{
			"type": "TextBlock",
			"text": "Media supports **audio** and **video** content!",
			"wrap": true
		},
		{
			"type": "TextBlock",
			"text": "Video",
			"horizontalAlignment": "center",
			"spacing": "medium",
			"separator": true,
			"size": "large"
		},
		{
			"type": "Media",
			"poster": "https://adaptivecards.io/content/poster-video.png",
			"sources": [{
				"mimeType": "video/mp4",
				"url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp4"
			}]
		},
		{
			"type": "TextBlock",
			"text": "Audio",
			"horizontalAlignment": "center",
			"separator": true,
			"size": "large"
		},
		{
			"type": "Media",
			"poster": "https://adaptivecards.io/content/poster-audio.jpg",
			"sources": [{
				"mimeType": "audio/mpeg",
				"url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp3"
			}]
		}
	]
}
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.1", "body": [ { "type": "TextBlock", "text": "Media supports **audio** and **video** content!", "wrap": true }, { "type": "TextBlock", "text": "Video", "horizontalAlignment": "center", "spacing": "medium", "separator": true, "size": "large" }, { "type": "Media", "poster": "https://adaptivecards.io/content/poster-video.png", "sources": [{ "mimeType": "video/mp4", "url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp4" }] }, { "type": "TextBlock", "text": "Audio", "horizontalAlignment": "center", "separator": true, "size": "large" }, { "type": "Media", "poster": "https://adaptivecards.io/content/poster-audio.jpg", "sources": [{ "mimeType": "audio/mpeg", "url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp3" }] } ] }
Try it Yourself »

poster

URL of an image to display before playing.

  • Type: string
  • Required: No
  • Format: uri

altText

Alternate text describing the audio or video.

  • Type: string
  • Required: No

id

A unique identifier associated with the element.

  • Type: string
  • Required: No

spacing

Controls the amount of spacing between this element and the preceding element.

  • Type: string
  • Required: No
  • Allowed values:
    • "none"
    • "small"
    • "default"
    • "medium"
    • "large"
    • "extraLarge"
    • "padding"

separator

When true, draw a separating line at the top of the element.

  • Type: boolean
  • Required: No, default: false