Using Pro Gallery with CMS--problems/issues

In Wix Editor, working with Pro Gallery connected to a dataset. To supply the Pro Gallery, a Media Gallery field type is used in the CMS. Two issues perhaps someone can clarify:

  1. Can externally hosted (e.g., YouTube) videos be embedded in Pro Gallery when content is supplied via a dataset? The Pro Gallery documentation in Wix is not very clear (to me) on this. While externally hosted videos can be manually loaded into Pro Gallery directly and embedded in the app on the page, I have not seen that this can be done through the CMS Media Gallery field type for Pro Gallery, which would mean that the gallery cannot dynamically embed videos that are hosted externally.

The CMS Media Gallery field contains an array of items (the images or videos) that are JSON objects. Here is the JSON content of the Media Gallery field for a Wix-hosted video:

{"description":"",
"slug":"https://video.wixstatic.com/video/11062b_20125b6ebe434abd96c4d7773634d1db/480p/mp4/file.mp4",
"alt":"",
"src":"wix:video://v1/11062b_20125b6ebe434abd96c4d7773634d1db/Mountainous%2520Landscape#posterUri=11062b_20125b6ebe434abd96c4d7773634d1dbf000.jpg&posterWidth=3840&posterHeight=2160",
"title":"Mountainous Landscape",
"type":"video",
"settings":{"duration":0,"height":2160,"focalPoint":[0.5,0.5],"posters":[{"url":"11062b_20125b6ebe434abd96c4d7773634d1dbf000.jpg"}],"width":3840}
}

Is there a JSON object similar to this that would utilize a YouTube URL for embedding a video in a Pro Gallery (as can be done with the Wix single video element)?

  1. The second question is related to #1. The documentation gives instructions for assigning a custom cover image for a video manually loaded directly in the Pro Gallery element on a page. But those instructions do not seem to apply to a video loaded in the CMS Media Gallery field for a Pro Gallery. Referring to the JSON object above, is there a key:value pair that can be added that would specify a URL for a custom cover image? Or is there a parameter in the settings key that would assign a custom cover image?

Instead of connecting the Pro Gallery to a Media Gallery field in the CMS, the required JSON object for the Pro Gallery content could be loaded into a CMS array-type field and then supplied to the gallery via Velo page code. But that approach still requires the properly constructed JSON array of objects.

Still a third approach, perhaps, would be to use the Pro Gallery Backend API to “updateGallery()”, but I’m unclear about calling this API from the frontend to dynamically populate the gallery from content in a CMS collection.

Thank you for any assistance with these issues.

I’m not sure how much the format differs. I would assume that just the src would change. Pro Galleries do accept YouTube videos so you might be able to manually set one and then check the CMS to see what the format looks like.

Thanks for responding, Anthony. Just setting the src to a YouTube share URL has not worked for me. As I noted in my question, YouTube videos can be installed manually in a ProGallery, but I don’t see that being installed manually in the page element has any corresponding entry in the CMS.

In that case it may not be supported in Velo. You can request this feature on the product roadmap: Product Roadmap

Yep. Thanks for your responses. I’ve submitted a request.

1 Like