I\'m having a weird problem. My two versions of chrome(regular & canary) refuse to loop the video i\'m showing. Or well, sometimes they loop it twice and stops after that. W
I have recently had some issue with this myself. It turned out to be something to do with my site being on localhost. When I move the site to my production server and tested remotely it all worked as expected.
To force it to work on localhost, I used the solution from Joakim Bananskal, but playing the video cause an error because it was already trying to play it, so I just had to reset the video first using load()
.
Having it set to loop also seemed to cause an issue, because the video never fired the ended
event.
My final solution for localhost is below:
$("video").each(function () {
this.loop = false;
this.onended = function () {
this.load();
};
this.play();
});
with this HTML: