网页上嵌入视频的 VideoObject 模式参数
VideoObject schema parameters for embedded videos on web pages
我的网站有大约 24 个视频页面,每个页面都嵌入了一个 YouTube 视频作为页面的焦点,它们的访问量相当高。
我正在努力将 JSON-LD 架构添加到页面以获得更好的丰富网页摘要体验,但我不确定应该在 "Content URL" 和 "Embed URL" 模式的参数。 contentUrl
被描述为 "the URL path to the video file itself" 但它托管在 YouTube 上,而不是我的服务器上。至于 embedUrl
我假设我只是粘贴 YouTube 视频 URL 而不是我的网站 URL 上嵌入了视频?
架构:
{
"@context": "https://schema.org",
"@type": "VideoObject",
"name": "Aerospace Cable Assembly",
"description": "Informational video about the manufacturing process of aerospace cable assemblies, as well as aviation wires and aerospace wire harnesses.",
"thumbnailUrl": "https://img.youtube.com/vi/FY7Y5dKrYxk/maxresdefault.jpg",
"uploadDate": "2019-04-10",
"duration": "PT1M23S",
"publisher": {
"@type": "Organization",
"name": "REDACTED",
"logo": {
"@type": "ImageObject",
"url": "https://redacted.com/wp-content/uploads/logo_structured_data.png",
"width": 295,
"height": 60
}
},
"contentUrl": "???",
"embedUrl": "???"
}
您可以使用:
内容网址:https://youtube.googleapis.com/v/YT_ID
嵌入网址:https://www.youtube.com/embed/VT_ID?rel=0
这是我的示例,但 schema.org:
<figure itemprop="associatedMedia video" itemscope="" itemtype="https://schema.org/VideoObject">
<meta itemprop="isFamilyFriendly" content="True">
<meta itemprop="requiresSubscription" content="False">
<meta itemprop="width" content="1280">
<meta itemprop="height" content="720">
<meta itemprop="thumbnailUrl" content="https://i3.ytimg.com/vi/YT_ID/0.jpg">
<meta itemprop="uploadDate" content="2012-03-27">
<meta itemprop="contentUrl" content="https://youtube.googleapis.com/v/YT_ID">
<meta itemprop="embedUrl" content="https://www.youtube.com/embed/YT_ID?rel=0">
<h2 id="13">Video NAME</h2>
<meta itemprop="name" content="Video NAME">
<div class="yt-wrapper"><div class="youtube" id="bkyt" data-embed="YT_ID"><iframe frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/YT_ID?rel=0&showinfo=0&autoplay=1"></iframe>
</div>
</div>
<figcaption class="bildhead" itemprop="description">Video DESCRITPTION <small>(Duration: <span itemprop="duration" content="PT20M55S">20:55</span>
Count: <span itemprop="interactionCount">16654</span>)</small>
</figcaption>
</figure>
我的网站有大约 24 个视频页面,每个页面都嵌入了一个 YouTube 视频作为页面的焦点,它们的访问量相当高。
我正在努力将 JSON-LD 架构添加到页面以获得更好的丰富网页摘要体验,但我不确定应该在 "Content URL" 和 "Embed URL" 模式的参数。 contentUrl
被描述为 "the URL path to the video file itself" 但它托管在 YouTube 上,而不是我的服务器上。至于 embedUrl
我假设我只是粘贴 YouTube 视频 URL 而不是我的网站 URL 上嵌入了视频?
架构:
{
"@context": "https://schema.org",
"@type": "VideoObject",
"name": "Aerospace Cable Assembly",
"description": "Informational video about the manufacturing process of aerospace cable assemblies, as well as aviation wires and aerospace wire harnesses.",
"thumbnailUrl": "https://img.youtube.com/vi/FY7Y5dKrYxk/maxresdefault.jpg",
"uploadDate": "2019-04-10",
"duration": "PT1M23S",
"publisher": {
"@type": "Organization",
"name": "REDACTED",
"logo": {
"@type": "ImageObject",
"url": "https://redacted.com/wp-content/uploads/logo_structured_data.png",
"width": 295,
"height": 60
}
},
"contentUrl": "???",
"embedUrl": "???"
}
您可以使用:
内容网址:https://youtube.googleapis.com/v/YT_ID
嵌入网址:https://www.youtube.com/embed/VT_ID?rel=0
这是我的示例,但 schema.org:
<figure itemprop="associatedMedia video" itemscope="" itemtype="https://schema.org/VideoObject">
<meta itemprop="isFamilyFriendly" content="True">
<meta itemprop="requiresSubscription" content="False">
<meta itemprop="width" content="1280">
<meta itemprop="height" content="720">
<meta itemprop="thumbnailUrl" content="https://i3.ytimg.com/vi/YT_ID/0.jpg">
<meta itemprop="uploadDate" content="2012-03-27">
<meta itemprop="contentUrl" content="https://youtube.googleapis.com/v/YT_ID">
<meta itemprop="embedUrl" content="https://www.youtube.com/embed/YT_ID?rel=0">
<h2 id="13">Video NAME</h2>
<meta itemprop="name" content="Video NAME">
<div class="yt-wrapper"><div class="youtube" id="bkyt" data-embed="YT_ID"><iframe frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/YT_ID?rel=0&showinfo=0&autoplay=1"></iframe>
</div>
</div>
<figcaption class="bildhead" itemprop="description">Video DESCRITPTION <small>(Duration: <span itemprop="duration" content="PT20M55S">20:55</span>
Count: <span itemprop="interactionCount">16654</span>)</small>
</figcaption>
</figure>