Play infinitely looping video on-load in HTML5

The

The loop attribute is a boolean attribute. When present, it specifies that the video will start over again, every time it is finished.

The loop attribute should do it.

If you have a problem with the loop attribute, listen to the videoEnd event. After that call the play() method when it fires.

Updated on: 2019-07-30T22:30:22+05:30

5K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements