0
votes

I have requirement to play any mp4 video inside adaptive card. I referred from the below website on how to include media in adaptive cards:

https://adaptivecards.io/explorer/Media.html

Example video in the above link works perfectly fine . But if I replace the video URL with any other youtube or mp4 video URL link then it does not play that video. Below is the card that I have created.

{
  "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
  "type": "AdaptiveCard",
  "version": "1.3",
  "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": "https://adaptivecards.io/content/poster-video.png",
            "sources": [
                {
                    "mimeType": "video/mp4",
                    "url": "https://www.youtube.com/watch?v=pxhqeHFLAF0"
                }
            ]
        }
    ]
}

Please help me on how to play a youtube video in adaptive cards.

1
as per my understanding it will support only mp4, The video that you are using just a link without extension..Rajeesh Menoth
What channel are you using? And can you provide an example of an mp4 file URL (not a YouTube URL) that you've tried? (Since there are multiple other people in this thread, you will need to @ mention me if you want me to see your reply.)Kyle Delaney
@Delaney . I want to play youtube video in an adptive card. Certainly youtube video link is not a link to the file. It is just URL link. The link that I am trying to play is youtube.com/watch?v=pxhqeHFLAF0user3553913
@RajeeshMenoth . I think you are right. But how to play youtube videos in adaptive cards is the question?user3553913
@user3553913 it's possible but running in the same chat at least front-end work is required. If Kyle Delaney have any direct implementation then it should be fine. otherwise i will share u what we have done in the web chat side.Rajeesh Menoth

1 Answers

0
votes

It turns out that Web Chat does support YouTube URL's in video attachments. You can see an example of such an attachment here. However, if you try to use your particular YouTube URL then you'll just be redirected to YouTube:

Web Chat

When it comes to Adaptive Cards, you won't be able to use YouTube URL's. You can submit Adaptive Cards feature requests here: https://github.com/microsoft/AdaptiveCards/issues/new/choose