Mobile app version of vmapp.org
Login or Join
Gloria169

: How to describe pixel width of a VideoObject or MediaObject in Schema.org and JSON-LD? Using Schema.org vocabulary in JSON-LD, when describing the height and width dimensions of a VideoObject,

@Gloria169

Posted in: #JsonLd #SchemaOrg

Using Schema.org vocabulary in JSON-LD, when describing the height and width dimensions of a VideoObject, do I write:

"width": "100"


or

"width": "100px"


or

"width": {
"@type": "QuantitativeValue",
"unitCode": "E37",
"value": "100"
}


The last option seems excessive, the middle option seems wrong and the first option seems lacking.

Update

I've seen that width can take a Distance value:


Properties that take Distances as values are of the form '
'. E.g., '7 ft'.


So … does that mean the correct entry would be:

"width": "100 px"


?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gloria169

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

The height and width properties expect either a Distance or a QuantitativeValue value.

Both of your corresponding examples are correct:




Distance value:

"width": "100 px"

QuantitativeValue value (E37 is the UN/CEFACT Common Code for "pixel"):

"width": {
"@type": "QuantitativeValue",
"unitCode": "E37",
"value": "100"
}



For a consumer that supports both ways, these should be equivalent.

Possible risk when using a Distance value: a consumer might expect the unit to be written in a different way than px (e.g., px., pixel etc.). I guess there is no standard abbreviation (at least the Wikipedia article Pixel doesn’t specify one). You don’t have this risk with a QuantitativeValue value, because the units are standardized in the UN/CEFACT Common Code.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme