cancel
Showing results for 
Search instead for 
Did you mean: 

When you will implement the HTML5 video loop attribute?

Highlighted
New Contributor

When you will implement the HTML5 video loop attribute?

I know there is an add-on "Media Loop" for Firefox that implements the loop attribute for HTML5 videos/audios, but I don't want to force every visitor of my site to install it.

3 REPLIES
New Contributor

Re: When you will implement the HTML5 video loop attribute?

A quick Jquery solution

  • $("#yourID").bind('ended', function(){
  • this.play();
  • });
New Contributor

Re: When you will implement the HTML5 video loop attribute?

or just add to the video tag: onended="this.play()" No need for Jquery!

New Contributor

Re: When you will implement the HTML5 video loop attribute?

Just how do you add it to the video tag!? Next time, post a working example.

document.getElementById('video').addEventListener("ended", function(){this.play();});