diff --git a/scripts/scripts.js b/scripts/scripts.js index cfb45edb9..1a4c78dac 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -460,6 +460,8 @@ function addPageSchema() { const h1 = document.querySelector('main h1'); const schemaTitle = h1 ? h1.textContent : getMetadata('og:title'); + const vidyardLink = document.querySelector('a[href*="vidyard.com"], a[href*="vids.moleculardevices.com"]').href; + const vidyardId = vidyardLink.split('/').pop(); const heroImage = document.querySelector('.hero img'); const resourcesImage = getMetadata('thumbnail') || getMetadata('og:image') || moleculardevicesLogoURL; @@ -473,6 +475,7 @@ function addPageSchema() { const eventAddress = getMetadata('event-address'); const publicationDate = getMetadata('publication-date'); const canonicalHref = document.querySelector("link[rel='canonical']").href; + const embedHref = `https://play.vidyard.com/${vidyardId}?disable_popouts=1&v=4.3.15&autoplay=1&type=lightbox`; const schema = document.createElement('script'); schema.setAttribute('type', 'application/ld+json'); @@ -690,7 +693,7 @@ function addPageSchema() { thumbnailUrl: resourcesImageUrl, uploadDate: new Date(publicationDate).toISOString(), contentUrl: canonicalHref, - embedUrl: canonicalHref, + embedUrl: embedHref, duration: '', publisher: { '@type': 'Organization',