Giter Site home page Giter Site logo

Comments (9)

starzou avatar starzou commented on May 20, 2024 3
    Plugin.prototype.isVideo = function (src, index) {

        if (!src) {
            throw new Error("Make sure that slide " + index + " has an image/video src");
        }

data-src should not be provided when you use html5 videos.

So, There is a logic error here. @sachinchoolur

from lightgallery.js.

denvist avatar denvist commented on May 20, 2024 2

@starzou

You need to use selector:
lightGallery(document.getElementById('html5-videos'), {selector: '.item'});

<!-- data-src should not be provided when you use html5 videos -->
<ul id="html5-videos">
<li data-poster="video-poster1.jpg" data-sub-html="video caption1" data-html="#video1" >
<img src="img/thumb1.jpg" class="item" />
</li>
<li data-poster="video-poster2.jpg" data-sub-html="video caption2" data-html="#video2" >
<img src="img/thumb2.jpg" class="item" />
</li>
</ul>

There is documentation: html-markup

from lightgallery.js.

dweber019 avatar dweber019 commented on May 20, 2024 1

@sachinchoolur Here a codepen with the issue https://codepen.io/anon/pen/qYMorx

Here a PR which is related #24

And in my opinion the issue #76 is correct.

What do you think?

from lightgallery.js.

anandmajethiaindia avatar anandmajethiaindia commented on May 20, 2024

Do we have a solution for this?

from lightgallery.js.

sachinchoolur avatar sachinchoolur commented on May 20, 2024

Hey @anandmajethiaindia ,
Yes, you need to follow any of the HTML markup provided in the demo page- In case, if you are not able to solve the issue please provide a jsfiddle or codepen demo.I'll fix the issue and send you back

from lightgallery.js.

sachinchoolur avatar sachinchoolur commented on May 20, 2024

Hey @dweber019,
The issue has been fixed. Please use the latest version of lightgallery.js

Actually, the pr - #24 created the issue :(

from lightgallery.js.

dweber019 avatar dweber019 commented on May 20, 2024

@sachinchoolur thanks that fixed the issue. I still have an issue. I changed this https://codepen.io/anon/pen/qYMorx to the simplest setup but still it doesn't work.

Edit:
Fixed this above issue by including lg-video.js into my site.

from lightgallery.js.

sachinchoolur avatar sachinchoolur commented on May 20, 2024

Here is the working demo - https://codepen.io/sachinchoolur/pen/vjwmYd

from lightgallery.js.

balukov avatar balukov commented on May 20, 2024

There is works for me:

  1. class = item
<div id="lightgallery">
  <a class="item" href="/img/img.png">
    <img src="/img/img.png" />
  </a>
</div>
  1. selector: ".item"
<script>
  $(document).ready(function() {
    $("#lightgallery").lightGallery({
      thumbnail: true,
      download: false,
      selector: ".item"
    });
  });
</script>

from lightgallery.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.