我在此页面上使用 georgepaterson / jquery-videobackground:
http://kimcolemanprojects.com/index.html
我希望视频循环播放,但不知道如何在 JQuery 中执行此操作?
$(document).ready(function() {
$('dl').toggle();
$('h2').bind('click', function(event) {
event.preventDefault();
$(this).next('dl').slideToggle(500, function() {
$('.video-background').videobackground('resize');
});
});
$('body').prepend('<div class="video-background"></div>');
$('.video-background').videobackground({
videoSource: [['video/ribbons_450x360.mp4', 'video/mp4'],
['video/ribbons_450x360.webmhd.webm', 'video/webm'],
['video/ribbons_450x360.oggtheora.ogv', 'video/ogg']],
controlPosition: '#main',
poster: 'video/ribbs.png',
loadedCallback: function() {
$(this).videobackground('mute');
}
});
});