question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[JS] Inline YouTube, Vimeo and Dailymotion video playback

See original GitHub issue

This proposal is implemented here: https://github.com/microsoft/AdaptiveCards/pull/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:

  • If a URL matching a a YouTube, Vimeo or Dailymotion pattern is found in the sources collection, the Media element is setup to embed an inline player instead of the standard HTML5 media player
    • The mimeType property isn’t required for YouTube sources
    • If a URL pattern is detected in the sources property, all other sources are ignored
  • The Media element will attempt to pull the poster URL automatically from the various providers IF the poster property sin’t specified
  • As the play button is clicked, the Media element instantiates the embedded player and automatically starts playback

Alternatives 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.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
rliberoffcommented, Jul 4, 2022

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!

1reaction
sueesscommented, May 20, 2022

We would highly appreciate this feature too. Beeing able to display Youtube & co videos directly in the cards would be great.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[JS] Inline YouTube, Vimeo and Dailymotion video playback
A new way for developers to exchange card content in a common and consistent way. - [JS] Inline YouTube, Vimeo and Dailymotion video...
Read more >
How to access a Dailymotion video using the JS API when ...
The play/pause does work if I hard-code a video ID but only if there is one video on the page and only if...
Read more >
Embed Youtube, Vimeo, Dailymotion video player custom ...
Hello We wanted to share with you a plugin we have developed to easily embed a Youtube, Vimeo o Dailymotion video player in...
Read more >
Video Element vs. DailyMotion issue - Support
Trying to share a DailyMotion link* via the Player field Video Element ... EDIT: As for YouTube external urls, Vimeo perfectly integrates ...
Read more >
React.js react-player Library Project to Play Youtube ...
React. js react- player Library Project to Play Youtube,Facebook,Twitch, Dailymotion Videos in Browser. 1.7K views · Streamed 1 year ago
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found