【问题标题】:jQuery Galleria - How to add the youtube video title to the autoplayjQuery Galleria - 如何将 youtube 视频标题添加到自动播放
【发布时间】:2014-04-06 16:33:27
【问题描述】:

我的网页上有 Galleria 自动播放功能:http://www.clickclack.cz/。我想添加 youtube 视频标题(只有 youtube 视频)。你能帮我吗,怎么做?

我的设置在这里:

    $(function() {
    Galleria.loadTheme('galleria/themes/classic/galleria.classic.min.js');          
    Galleria.run('#galleria', {
        _toggleInfo: false,
        extend: function() { 
            var gallery = this; 

            gallery.play(); 
            var paused = 0; 
            this.$('stage').hover(function() { 
                if (paused) { 
                    $(this).data('overTime', '1');
                } else { 
                    paused = 1; 
                    gallery.pause(); 
                    $(this).data('overTime', new Date().getTime()); 
                } 
            }, function() { 
                var outTime = new Date().getTime(); 
                var hoverTime = (outTime - $(this).data('overTime'))/1000;
                if (hoverTime < 0.5) { // restart slideshow if hover under 0.5 seconds 
                    paused = 0; 
                    gallery.play(); 
                } 
            }); 
        } 
    });

});

【问题讨论】:

    标签: jquery youtube galleria autoplay


    【解决方案1】:

    最后我找到了解决方案。在JS中我添加了

    youtube: {
                modestbranding: 1,
                autohide: 1,
                color: 'white',
                hd: 1,
                rel: 0,
                showinfo: 1
            }
    

    showInfo: 1 显示视频在 youtube 上的名称。

    【讨论】:

      猜你喜欢
      • 2019-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-05-08
      • 2018-03-10
      • 2017-04-04
      • 2017-08-14
      相关资源
      最近更新 更多