sachinchoolur / lightGallery

A customizable, modular, responsive, lightbox gallery plugin.

Home Page:https://www.lightgalleryjs.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Video is not working

z3hdro opened this issue · comments

commented

Description

I've installed the library and added to my react project. After I tried to display videos, it showing the poster, but after click it opens the lightbox but the video is not wokring. Nothing in logs. I tried to make using demos for Video.

JS code that you use to initialize lightGallery.

image

<LightGallery
      onInit={onInit}
      speed={500}
      plugins={[lgThumbnail, lgZoom, lgVideo]}
>
  <a 
       className="gallery-item"
       data-lg-size="1600-2400"
       data-src="https://www.youtube.com/watch?v=egyIeygdS_E&mute=0"
       key="4"
   >
        <img 
             className="img-responsive"
             alt="" 
             src="https://img.youtube.com/vi/egyIeygdS_E/maxresdefault.jpg" 
         />
    </a>
     .....
</LightGallery>

Environment

  • Browser and version - chrome
  • OS - Windows
  • lightGallery version - 2.4.0

Additional context

Hey @z3hdro,

Here is the working demo - https://stackblitz.com/edit/lightgallery-react?file=index.tsx

If you still face any issues, please fork the demo, make the changes you want, and share it with me.

commented

@sachinchoolur Sorry, Video player is working, found an issue.