-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Comments
Hey @batmar96, Here is the working demo - https://codepen.io/sachinchoolur/pen/VwpYagE Could you please share generated HTML markup? |
|
Thanks for the demo - Please re-enable it for now. I'll push a fix ASAP |
Hey @batmar96 , The issue has been fixed - please upgrade version |
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: '',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.
The text was updated successfully, but these errors were encountered: