web-stories-wp
web-stories-wp copied to clipboard
Add videos structured data
Feature Description
Context: https://developers.google.com/search/docs/advanced/structured-data/video
This is basically like #11624, but for videos within a story.
We have a lot of information about videos already (URL, alt text, poster, duration, upload date) that is required or useful for VideoObject
I'd like to try this out for stories to see how well it works in WordPress
Alternatives Considered
Additional Context
With products, we exact all the product data into another piece of post meta. This is so we don't have to parse data out of story data.
Would you expect all videos we in structure data?
- Do we include video that are background media of a page?
- Do we include videos without sound?
- Does a mp4 that is a gif count as a video?
- Do we include videos on a page, what if a page has multiple videos, like one animates in later or something?
Great questions!
Let's start with all video elements with sound, regardless of position or animation. No GIF elements.
@swissspidy Should we exact the video data into post meta then?
Yes, very similar to how we did that for products in #11624
Having a look at the fields, I just want to confirm that field mapping.
Required fields
Name | Type | Field |
---|---|---|
description | text | resource. alt |
name | text | ???? |
thumbnailUrl | url | resource. poster |
uploadDate | date | resource.creationDate |
Recommended
Name | Type | Field |
---|---|---|
contentUrl | URL | resource. src |
duration | Duration | resource.length |
I am not sure what to map name to. Name is a required field, so a blocker.
Also to confirm.
- Do we include hotlinked videos?
- Do we include videos from third party media source, like coverr?
Let's reuse alt text for the name
field for name, for proof-of-concept purposes.
Let's exclude external videos for now.
@swissspidy Should this be behind a feature flag then?
Yeah let‘s do that.
Closing this for now until I hear more about this, keeping the board clean.