ProductMedia

Extends Object. Represents a photo, video or 360° media entry for a product. 

Properties
description

Type String

The description of the media entry.

id

Type Number

The System ID of the Product Media entry.

image

Type Url

The Url of the photo, or cover image for video/360° entries. 

is360

Type Boolean

True if the media entry is a 360° (type of rotate), else false.

isPhoto

Type Boolean

True if the media entry is a photo, else false.

isPrimary

Type Boolean

True if the media entry is used as the primary photo for the product's thumbnail, else false.

isVideo

Type Boolean

True if the media entry is a video, else false.

title

Type String

The title of the media entry, can be used as the ALT attribute for Photos.

type

Type String

The Product Media type, which will have of the following values:

  • photo
  • video
  • rotate
video

Type String

The Url of the video. Defaults to a String object as most videos are external YouTube or Vimeo Urls.



Methods
frames()

Returns Array

Gets the individual frames of a 360° media entry as an Array. Each element within the Array returned contains a ProductMediaFrame object.

hasFrames()

Returns Boolean

True if the media entry has 1 or more frames, else false.