I’m using JSON-LD for SEO and can’t figure out how to use videoObject when you have more than one video on the page, Here you can see a sample for better understanding:
metaInfo() {
return {
title: "Title",
script: [
{
type: "application/ld+json",
json: {
"@context": "https://schema.org",
"@type": "VideoObject",
name: "VideoOne",
description: "DescriptionOne",
thumbnailUrl: "Test.jpg",
uploadDate: "2024-05-20",
contentUrl: "https://www.youtube.com",
embedUrl: "https://www.youtube.com",
},
},
{
type: "application/ld+json",
json: {
"@context": "https://schema.org",
"@type": "VideoObject",
name: "VideoTwo",
description: "DescriptionTwo",
thumbnailUrl: "Test.jpg",
uploadDate: "2024-05-20",
contentUrl: "https://www.youtube.com",
embedUrl: "https://www.youtube.com",
},
},
],
}
},
For some reason, only the first videoObject is returned, example:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "VideoObject",
"name": "VideoOne",
"description": "DescriptionOne",
"thumbnailUrl": "Test.jpg",
"uploadDate": "2024-05-20T00:00:00.000Z",
"contentUrl": "https://www.youtube.com",
"embedUrl": "https://www.youtube.com"
}
</script>
My question is how to properly work with videoObject when you have a couple of videos on the page? I would be grateful for your help.
I tried a lot of methods, including the methods from this thread: link, but it didn’t help, I hope to find a solution here
Dmytro Bezborodko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.