I’m currently facing some issues when I’m trying to play video in the lightbox.
There is user content on a dynamic page like text, images, and video.
There is also a button which opens the lightbox, where I would like to play that video.
I have a code, but it does not work as I would wish, because it will load only the last uploaded video from the database, not the one I want to.
The dynamic page code:
import wixWindow from 'wix-window';
export function playvideo_onClick(event, $w) {
wixWindow.openLightbox("Recenze", currentItem);
}
The lightbox code:
import wixWindow from 'wix-window';
$w.onReady(function () {
const data = wixWindow.lightbox.getContext();
$w('#video1').videoUrl = data.video;
});
@jakub Help!!! I need to do this same thing!! But i can’t seem to do it right! Have a button (button7) to open a video lightbox to play video from a URL in the dataset for the specific item/page. I’m stuck!!!