sachinchoolur / lightslider

JQuery lightSlider is a lightweight responsive Content slider with carousel thumbnails navigation
http://sachinchoolur.github.io/lightslider/
MIT License
2.04k stars 1.52k forks source link

lightSlider and lightGallery with Video and Images #361

Open semaf opened 7 years ago

semaf commented 7 years ago

After testing a lot of different ways there are some points to be fixed.

My Javascript Code:

$('#imageGallery').lightSlider({
        gallery:true,
        item:1,
        loop:false,
        thumbItem:6,
        prevHtml: '<i class="fa fa-angle-left fa-4x"></i>',
        nextHtml: '<i class="fa fa-angle-right fa-4x"></i>',
        slideMargin:10,
        enableDrag: false,
        currentPagerPosition:'left',
        videojs: true,
        onSliderLoad: function(el) {
            el.lightGallery({
                selector: '#imageGallery .lslide',
                download: false,
                showAfterLoad: true,
                autoplay: false,
                share: false,
                thumbnail: false,
                fullScreen: false,
                pager: false,
                zoom: false
            });
        }
    });

And my HTML Code

<div style="display:none;" id="video1">
    <video id="video_player" class="lg-video-object lg-html5" playsinline muted loop autoplay poster="{$PFAD_MEDIAFILES}videos/3449.jpg">
        <source src="{$PFAD_MEDIAFILES}{$oMedienDatei->cPfad}" type="video/mp4">
        Your browser does not support HTML5 video.
    </video>
</div>

<ul id="imageGallery" class="imagesGallery">
    <li data-thumb="{$PFAD_MEDIAFILES}videos/3449.jpg" data-html="#video1">
        <video id="video_player" class="lg-video-object lg-html5" playsinline muted loop autoplay style="width:100%!important;height: auto!important; border-radius: 4px;">
            <source src="{$PFAD_MEDIAFILES}{$oMedienDatei->cPfad}" type="video/mp4">
        </video>
    </li>
    <li data-thumb="//domain.com/{$oBild->cPfadMini}" data-src="//domain.com/{$oBild->cPfadGross}">
        <img src="//domain.com/{$oBild->cPfadNormal}" alt="{$Artikel->cName}" class="img-responsive" alt="{$Artikel->cName}" itemprop="image" />
    </li>
</ul>
ronakrathod18 commented 7 years ago

@sachinchoolur - does lightslider work with the brightcove video player?

semaf commented 7 years ago

@ronakrathod18 ??

johanvdr commented 5 years ago

Are there any updates on this issue?