Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Youtube videos not working... #1101

Closed
batmar96 opened this issue Jul 28, 2021 · 4 comments
Closed

Youtube videos not working... #1101

batmar96 opened this issue Jul 28, 2021 · 4 comments

Comments

@batmar96
Copy link

I connect the following scripts and styles:
<link href="/css/lg-thumbnail.css" type="text/css" rel="stylesheet" />
<link href="/css/lg-video.css" type="text/css" rel="stylesheet" />
<link href="/css/lightgallery.css" type="text/css" rel="stylesheet" />
<script src="/js/lightgallery.min.js"></script>
<script src="/js/lg-thumbnail.min.js"></script>
<script src="/js/lg-video.min.js"></script>

Gallery call script:

const lgContainer = document.getElementById('inline-gallery-container');
const inlineGallery = lightGallery(lgContainer, {
container: lgContainer,
dynamic: true,
controls:false,
hash: false,
download:false,
closable: false,
pager :false,
youtubePlayerParams: {
modestbranding: 1,
showinfo: 0,
rel: 0,
controls: 0
},
showMaximizeIcon: true,
counter:false,
videojs: true,
loadYoutubeThumbnail:true,
appendSubHtmlTo: '.lg-item',
enableDrag :false,
slideDelay: 400,
plugins: [lgVideo, lgThumbnail],
dynamicEl: [
{
src: '<?=$arResult["DETAIL_PICTURE"]["SRC"]?>', thumb: '', }, { src: '', thumb: '', }, { src: '',
thumb: '<?=$renderImage["src"]?>',
},
{
src: '<?=$videoLink?>',
thumb: '<?=$renderImage?>',
poster: '<?=$renderImage?>',
},
],
});
inlineGallery.openGallery();
The gallery contains both youtube videos and pictures. But the video won't play. The icon with the player and nothing happens when pressed.
If you use the example from https://www.lightgalleryjs.com/demos/video-gallery/, it also does not reproduce, there are no errors in the panel. Lightgallery version | 2.2.0-beta.0 | June 15th 2021.

@sachinchoolur
Copy link
Owner

Hey @batmar96,

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

Could you please share generated HTML markup?

@batmar96
Copy link
Author

Hey @batmar96,

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

Could you please share generated HTML markup?

https://codepen.io/batmar96/pen/VwbXLMv

@sachinchoolur
Copy link
Owner

Thanks for the demo -
I'm able to reproduce the issue. This happens only when enableDrag is set to false.

Please re-enable it for now. I'll push a fix ASAP

@sachinchoolur
Copy link
Owner

Hey @batmar96 ,

The issue has been fixed - please upgrade version 2.2.0-beta.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants