From ddcd8b938c28a878383d95680d1dd0c20e385189 Mon Sep 17 00:00:00 2001 From: dev-rajneeshkumar Date: Wed, 20 Nov 2024 11:49:43 +0530 Subject: [PATCH 1/2] video schema update --- scripts/scripts.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/scripts.js b/scripts/scripts.js index cfb45edb9..a01b3dc2e 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -473,6 +473,7 @@ function addPageSchema() { const eventAddress = getMetadata('event-address'); const publicationDate = getMetadata('publication-date'); const canonicalHref = document.querySelector("link[rel='canonical']").href; + const embedHref = document.querySelector("link[rel='prefetch']").href; const schema = document.createElement('script'); schema.setAttribute('type', 'application/ld+json'); @@ -690,7 +691,7 @@ function addPageSchema() { thumbnailUrl: resourcesImageUrl, uploadDate: new Date(publicationDate).toISOString(), contentUrl: canonicalHref, - embedUrl: canonicalHref, + embedUrl: embedHref, duration: '', publisher: { '@type': 'Organization', From c711a0fe0cabad960e3ca85bb4c08e868fee884d Mon Sep 17 00:00:00 2001 From: bluedeepart Date: Wed, 20 Nov 2024 13:01:39 +0530 Subject: [PATCH 2/2] fixed embedHref --- scripts/scripts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/scripts.js b/scripts/scripts.js index a01b3dc2e..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,7 +475,7 @@ function addPageSchema() { const eventAddress = getMetadata('event-address'); const publicationDate = getMetadata('publication-date'); const canonicalHref = document.querySelector("link[rel='canonical']").href; - const embedHref = document.querySelector("link[rel='prefetch']").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');