diff --git a/blocks/embed/embed.js b/blocks/embed/embed.js
index fc7e65e43..160792b1d 100644
--- a/blocks/embed/embed.js
+++ b/blocks/embed/embed.js
@@ -72,6 +72,19 @@ const embedVimeo = (block, url, autoplay) => {
return embedHTML;
};
+// To play vidyard videos
+const embedVidyard = (block, url, autoplay) => {
+ const video = url.pathname.split('/').pop();
+ const suffix = autoplay ? '?muted=1&autoplay=1' : '';
+ const embedHTML = `
+
+
`;
+ return embedHTML;
+};
+
const loadEmbed = (block, link, autoplay) => {
if (block.classList.contains('embed-is-loaded')) {
return;
@@ -86,6 +99,10 @@ const loadEmbed = (block, link, autoplay) => {
match: ['vimeo'],
embed: embedVimeo,
},
+ {
+ match: ['vidyard'],
+ embed: embedVidyard,
+ },
{
match: ['/content/dam/danaher/', '.pdf'],
embed: embedPdfViewer,
diff --git a/scripts/scripts.js b/scripts/scripts.js
index f6ce1506b..c63733be2 100644
--- a/scripts/scripts.js
+++ b/scripts/scripts.js
@@ -217,7 +217,7 @@ export function setCookie(cname, cvalue, expTime = 30 * 1000 * 60 * 60 * 24, pat
* @param {Element} main The container element
*/
function buildVideo(main) {
- main.querySelectorAll('a[href*="youtube.com"],a[href*="vimeo.com"]').forEach((link) => {
+ main.querySelectorAll('a[href*="youtube.com"],a[href*="vimeo.com"],a[href*="vidyard.com"]').forEach((link) => {
if (link.closest('.embed, .hero') == null) {
decorateEmbed(link.parentNode);
}