I have a background video that I need to autoplay and loop.
My html is:
<video class="mundoVideo" id="backVideo" autoplay autobuffer="autobuffer" muted="muted" width="1200" height="360" loop="loop">
<source src="3D/1.webm" type="video/webm">
<source src="3D/1.mp4" type="video/mp4">
<source src="3D/1.ogg" type="video/ogg">
</video>
This way I can see it looping on Chrome and Firefox Nightly (even Internet Explorer 11), but Stable Firefox updated to latest version (32.0) don't.
I tried using just 'loop' as parameter, 'loop="loop"' or even with javascript like:
$("#backVideo").bind('ended', function(){
this.play();
});
But it seems that there's not ended event fired up, just the image stops at some point.
The web is: http://ticketcomunicacion.com/excelsior
This code will not be enough? If you have video, which you don't want changing:
$time = 39; // number of seconds of your video
setInterval(function(){
$('#backVideo').load();
},$time*1000);
or try load() instead play() on your code. I don't have this version of Firefox, so I can't try it:
$("#backVideo").bind('ended', function(){
this.load();
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.