currentItem


currentItemunionRead-only

Gets an object containing information about the current item.

The current item object can be either an ImageItem or a VideoItem.

About ImageItem Items

An ImageItem is an object used by the Gallery properties items and currentItem to represent a single gallery image.

The src property of a ImageItem can be:

  • An image from the Media Manager.
  • An external image from any web location (some galleries do not support external images).

The image source format for Media Manager images is: wix:image://v1//#originWidth=&originHeight=[&watermark=]

About VideoItem Items

A VideoItem is an object used by the Gallery properties items and currentItem to represent a single gallery video.

A VideoItem can be used as an item in a Pro Gallery.

To determine if your gallery is a Pro Gallery or a standard gallery, hover over the gallery while it is not selected. The gallery type appears above the upper left corner of the gallery. If the type is "Wix Pro Gallery", then your gallery is a Pro Gallery. If the type is anything other than "Wix Pro Gallery", your gallery is a standard gallery.

The video source format is: wix:video://v1//#posterUri=&posterWidth=&posterHeight=

Notes:

  • The currentItem property is supported by galleries where the hasCurrentItem capability is true.

  • If you change the gallery's type to one that doesn't support hasCurrentItem and you try to use it, your code may no longer function correctly.

Was this helpful?
Yes
No