-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JS] Inline YouTube, Vimeo and Dailymotion video playback #7111
Comments
Presumably to support this in non-browser renderers we'd either need to host a web control of some sort or allow card authors to specify other sources as fallback. How would Perhaps something like this: {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.6",
"body": [
{
"type": "Media",
"sources": [
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
},
{
"mimeType": "video/mp4",
"url": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideo.mp4",
"poster": "https://adaptivecardsblob.blob.core.windows.net/assets/AdaptiveCardsOverviewVideoPoster.png"
}
]
}
]
} |
It's an interesting idea, although IMO it's overkill. One of the reasons why the Media element as it currently stands hasn't been able to satisfy the needs of developers is because there's not fallback to a YouTube video: a YouTube video only exists in YouTube (the same goes for Dailymotion and Vimeo). So while we could implement what you're suggesting, IMO that fallback model would basically never be exercised. I think 99.9% of use cases are the developer has one single video URL and thus includes one single source to the Media element. In terms of the poster, I don't think we need to introduce a new property on a per-source basis. The |
Another thing to consider. Imagining the "sources": [
mp4,
YouTube,
mp4,
mp4
] The HTML5 media player (and I believe the media players on Android and iOS as well) take multiple URLs as their own sources and automatically pick the one they can play. What would we do with the above sources?
Or
|
I suppose it's probably easier to go with a minimum viable implementation and add stuff later if we get feedback :) |
We would highly appreciate this feature too. Beeing able to display Youtube & co videos directly in the cards would be great. |
Hello, We also support this request. Today, many companies have their video assets in Youtube and other platforms. Please provide support for this. Thank you! |
This proposal is implemented here: #7112
Problem Statement
Currently, it is not possible to embed a YouTube, Dailymotion, Vimeo (and quite a few other for that matter) video in an Adaptive Card. This feature would make that possible.
Proposed solution
We extend the existing
Media
element with no schema change. The updated logic does the following:sources
collection, theMedia
element is setup to embed an inline player instead of the standard HTML5 media playermimeType
property isn't required for YouTube sourcessources
property, all other sources are ignoredposter
property sin't specifiedplay
button is clicked, theMedia
element instantiates the embedded player and automatically starts playbackAlternatives or Workarounds
The only alternative currently is to use an image that represents a video thumbnail and to include an OpenURL action somewhere in the card to open the video on the appropriate web site.
The text was updated successfully, but these errors were encountered: