Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Markup (HTML, XHTML, XML) _ Playing movie in pop-up lightbox

Posted by: Blueie Jan 7 2019, 10:58 PM

Hello

I have the following code in a Web page that, once a thumbnail (thumb-1.jpg in my case) is clicked, it displays a larger image, violin.jpg, in a lightbox pop-up. The same applies to my second thumbnail, thumb-2, which displays jump.jpg in a lightbox:

CODE
<a href="images/violin.jpg" data-lightbox="violin"><img class="example-image" src="images/thumb-1.jpg" alt="violin" data-title="My caption" /></a>
    
<a href="images/jump.jpg" data-lightbox="jump"><img class="example-image" src="images/thumb-2.jpg" alt="jump" data-title="My caption" /></a>


Please see attachments.

I would like the user to still click on the thumbnails but, instead of the lightbox displaying a larger image of the thumbnail, for it to display a
movie file (MP4). Would that be possible?

Thanks.



Attached thumbnail(s)
Attached Image Attached Image

Posted by: Christian J Jan 9 2019, 05:38 AM

That should be possible, if the user's browser supports playing mp4 files directly (my browsers do, but they may or may not display a run/download prompt first), and if the Lightbox script can display .mp4 files (test it, and/or check the documentation!).

Another idea is to make Lightbox create HTML5 VIDEO elements to display the mp4 files in, but that might require some rewriting.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)