Please do not abuse jQuery like this! You donβt need a huge library to link a simple listener! Use this:
document.getElementById('video').addEventListener("ended", function(){this.play();});
If you find this helpful please vote!
This code runs when the video ends. Then an anonymous function will be launched. "this" refers to a video element through which we perform a playback function when the video is repeatedly played.
Shame on Firefox for not spreading this error for so long!
source share