The video object contains information about a video uploaded on the product detail page in the VersaCommerce admin.

This page describes the attributes of the video object.

video.alt

Returns the alt text of the video, set on the product detail page in the VersaCommerce admin.

video.aspect_ratio

Returns the aspect ratio of the video source file.

video.duration

Returns the duration of the video source file.

video.id

Returns the media_id of the video.

video.media_type

Returns the type of the object (video). Use it to filter a list of media objects.

{% assign videos = product.media | where: "media_type", "video" %}

{% for video in videos %}
  {{ video.alt }}
{% endfor %}
Promotional video for strollers
Feature video for strollers

video.position

Returns the position of the video in the media array.

video.preview_image

Returns a preview image for the video.

video.sources

Returns an array of video source objects.

VersaCommerce note: Uploaded videos (media files) are provided as video objects. They currently do not appear in product.media.