VOOZH about

URL: https://shopify.dev/docs/api/liquid/objects/video

⇱ Liquid objects: video


Skip to main content

Information about a video uploaded as product media or a file_reference metafield.


Tip

Use the video_tag filter to output the video in an HTML <video> tag.

Tip:

Use the video_tag filter to output the video in an HTML <video> tag.

Tip: Use the <a href="/docs/api/liquid/filters/video_tag"><code><span class="PreventFireFoxApplyingGapToWBR">video<wbr/>_tag</span></code> filter</a> to output the video in an HTML <code>&lt;video&gt;</code> tag.


Properties

The alt text of the video.

Anchor to
aspect_ratioaspect_ratio

The aspect ratio of the video as a decimal.

Anchor to
durationduration

The duration of the video in milliseconds.

The ID of the video.

Anchor to
media_typemedia_type

The media type of the model. Always returns video.

Anchor to
positionposition

The position of the video in the product.media array.

Anchor to
preview_imagepreview_image

A preview image for the video.

Anchor to
sourcessources
array of video_source

The source files for the video.

{
"alt": "Potion beats",
"aspect_ratio": 1.779,
"duration": 34801,
"id": 22070396551233,
"media_type": "video",
"position": 2,
"preview_image": {},
"sources": []
}
Example
{
 "alt": "Potion beats",
 "aspect_ratio": 1.779,
 "duration": 34801,
 "id": 22070396551233,
 "media_type": "video",
 "position": 2,
 "preview_image": {},
 "sources": []
}
Was this section helpful?