I need to put one function more in my script to make my video start automatically when it’s finished. This is script. I know probably that I have to set the currentTime property back to 0. How can I configure it in my script? There are other ways to achieve that? I am using this jQuery Plugin
<script>
$(document).ready(function() {
$('dl').toggle();
$('h2').bind('click', function(event) {
event.preventDefault();
$(this).next('dl').slideToggle(500, function() {
$('.video-background').videobackground('resize');
});
});
$('.main').prepend('<div class="video-background"></div>');
$('.video-background').videobackground({
videoSource: [['video/TimeLapse_Barcelona.mp4', 'video/mp4'],
['video/TimeLapse_Barcelona.webm', 'video/webm'],
['video/TimeLapse_Barcelona.theora.ogv', 'video/ogg']],
controlPosition: '#main',
poster: 'video/big-buck-bunny.jpg',
loadedCallback: function() {
$(this).videobackground('mute');
}
});
});
</script>
If you look at the plugin parameters it states
Setting that to
true, will make the video loop..