I need to trigger playback of several YouTube videos on a single page. I discovered the link settings allow for a video to play in a ‘lightbox’ (see image). This works fine for the first video on the page, but not the subsequent ones.
Even if I set a different gallery name for each, the video doesn’t load, but forward/back buttons do. If I leave the gallery field empty, the video doesn’t load, but clicking the overlay triggers the playback of the first video on the page - but doesn’t show it!
How should I create triggers to load specific videos in a modal or lightbox? This seems like it should be straight forward but I cannot fathom it.
Yes, exactly this. There are multiple buttons that each each trigger a different video.
The above method behaves strangely if there is more than one on the page. The modal block doesn’t support triggering the video to play - so it ends up being two clicks. I’d usually do this using Lity and custom code, but I’m trying to only use Cwicly on this one as a trial!
Sorry to hear you’re experiencing trouble with this.
This seems strange, as I am able to have multiple lightbox action links on the same page and have them work as expected:
Could you possibly provide more information on your setup, and maybe share a screencast of your issue so I may have a better idea of what’s going wrong?
Thanks @Araminta, I’ll have another go on a clean page. I see the back arrow appears on the 2nd and 3rd videos. If I don’t want them to all appear in the same lightbox, how would one achieve this? Should I be using a modal, and if so, how do I make it autoplay?
Hi @Araminta, how would I make a video simply appear in a modal and autoplay? I don’t want the ‘gallery’ feature as per a lightbox… I just want to trigger a youtube video to play in an overlay when a button is actioned.