The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Playing movie in pop-up lightbox
Blueie
post Jan 7 2019, 10:58 PM
Post #1





Group: Members
Posts: 4
Joined: 15-September 13
Member No.: 19,734



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
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Christian J
post Jan 9 2019, 05:38 AM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 06:47 PM