【发布时间】: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