Looping HTML5 video with jQuery
Backstory
Before HTML5, browsers were not able to play video natively (that is, without the use of a plugin that must be installed and does not come with the browser). It has been common place to use Flash to deliver video content; typically with videos encoded in FLV format and played through some kind of SWF player. Although this serves its purpose, it’s still not native; users have to have the flash playback component installed in their browser to playback the content.
HTML5 introduced two new tags (among others); <video> and <audio>. These tags allow browsers to play back video/audio content natively; which also means that you have a lot more control over the content using JavaScript; for example, you can build a full featured video player using Javascript, whereas before this would have to be done in Flash.
This post will just focus on the loop attribute. I’ll be explaining browser support of video formats in another post soon.