When adding media to adaptive card, documentation says mimetype can be ommitted for youtube videos. However while trying to use it via Bot framework it results the following error :
"Cannot write a null value for property 'mimeType'. Property requires a value. Path 'body[0].sources[0]'."
Code sample to render the card is:
AdaptiveCardParseResult result = AdaptiveCard.FromJson(obj.ToString());
return new Attachment
{
ContentType = AdaptiveCard.ContentType,
Content = JObject.FromObject(result.Card),
};
Card Sample İs as follows:
{
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.4",
"fallbackText": "This card requires Media to be viewed. Ask your platform to update to Adaptive Cards v1.1 for this and more!",
"body": [
{
"type": "Media",
"poster": "{PNG url with anonymous access}",
"sources": [
{
"url": "https://www.youtube.com/watch?v={YOUTUBE video reference here}"
}
]
}
]
}
When adding media to adaptive card, documentation says mimetype can be ommitted for youtube videos. However while trying to use it via Bot framework it results the following error :
"Cannot write a null value for property 'mimeType'. Property requires a value. Path 'body[0].sources[0]'."
Code sample to render the card is:
Card Sample İs as follows: