Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Learn More

When you will implement the HTML5 video loop attribute?

  • 3 odpowiedzi
  • 472 osoby mają ten problem
  • 38 wyświetleń
  • Ostatnia odpowiedź od rthawkcom

more options

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.

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.

Wszystkie odpowiedzi (3)

more options

A quick Jquery solution

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

Zmodyfikowany przez TimVs.be w dniu

more options

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

more options

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

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