Comments (9)
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.
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.
@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.
Do we have a solution for this?
from lightgallery.js.
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.
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.
@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.
Here is the working demo - https://codepen.io/sachinchoolur/pen/vjwmYd
from lightgallery.js.
There is works for me:
- class = item
<div id="lightgallery">
<a class="item" href="/img/img.png">
<img src="/img/img.png" />
</a>
</div>
- selector: ".item"
<script>
$(document).ready(function() {
$("#lightgallery").lightGallery({
thumbnail: true,
download: false,
selector: ".item"
});
});
</script>
from lightgallery.js.
Related Issues (20)
- Lightgallery Close HOT 1
- How to load plugins HOT 4
- upgrade to v2 banner has broken link HOT 1
- Lazyload thumbnails HOT 3
- Consider converting font-based icons to svgs and add icon configurations HOT 1
- Consider css variables / custom properties HOT 1
- Only HTML mode? HOT 1
- Init on reach structure HOT 2
- Captions / Title not taking correct height HOT 1
- How to use lightgallery/vue with Vue display HTML5 video? HOT 1
- Clickable links not working when are placed in the same div as light gallery HOT 1
- how to upload images to lightgallery HOT 1
- Missing few images in main page HOT 3
- AJAX compatibility with lightGallery HOT 1
- backdrop-opacity not working HOT 1
- subHtml items are not updating after updateSlides call HOT 1
- Images in lightGallery lightbox sometimes only half loads on iOS devices HOT 1
- Improve download btn functionality HOT 2
- Improve download btn functionality HOT 3
- Error rendering HTML5 videos without an iframe in Angular 13 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightgallery.js.