vvvmax / unitegallery

Unite Gallery - Responsive jQuery Image and Video Gallery Plugin. Aim to be the best gallery on the web on it's kind. See demo here:
http://unitegallery.net
MIT License
531 stars 158 forks source link

I have a problem with Youtube video thumbnail #192

Open oguzhansari opened 6 years ago

oguzhansari commented 6 years ago

Hi, I want to play both image and video. There is no problem with thumbnails of pictures. But the video thumbnail does not appear.

I ask for your help.

Not: data-image worked, data-thumb not work.

<div id="gallery" style="display:none;">
    <div data-type="youtube"
         data-image="assets/examples/haber-galeri-video-img.jpg"
         data-thumb="assets/examples/haber-galeri-video-thumb.jpg"
         data-videoid="3Ik2OvrNt2A"
         data-title="Çanakcılar Şirketler Grubu - Aile Günü Pikniği 2017"
         data-description="Çanakcılar Şirketler Grubu - Aile Günü Pikniği 2017"></div>
    <img alt="Image 1 Title" src="assets/examples/haber-resim-1.jpg"
         data-image="assets/examples/haber-resim-1.jpg"
         data-description="Image 1 Description">
    <img alt="Image 2 Title" src="assets/examples/haber-resim-1.jpg"
         data-image="assets/examples/haber-resim-1.jpg"
         data-description="Image 2 Description">
</div>
<script src="assets/ug/js/unitegallery.min.js"></script>
<script src="assets/ug/themes/default/ug-theme-default.js"></script>
    var galleryOpts = {
        gallery_min_height: 500,
        gallery_height: 500,
        gallery_autoplay: false,
        gallery_play_interval: 3000,
        theme_enable_fullscreen_button: false,
        theme_enable_hidepanel_button: true,
        thumb_width: 100,
        thumb_height: 80,
        strip_control_avia: false,
        strippanel_background_color: "#f1f1f1",
        strippanel_enable_buttons: false,
        theme_hide_panel_under_width: 300
    }
    if (matchMedia('screen and (min-width: 576px)').matches) {
        galleryOpts.thumb_width = 160;
        galleryOpts.thumb_width = 120;
    }
    $("#gallery").unitegallery(galleryOpts);
thefx commented 4 years ago

I have the same problem.

I jast replased div tag with img:

    <img data-type="youtube"
         data-title="Epic Hot Air Balloon Rope Swing"
         data-description="Epic Hot Air Balloon Rope description"
         data-thumb="https://i.ytimg.com/vi/KEoXn34ilKY/mqdefault.jpg"
         data-image="https://i.ytimg.com/vi/KEoXn34ilKY/sddefault.jpg"
         data-videoid="KEoXn34ilKY" >

not elegant solution, but it works