Looping video in browsers that don’t yet support the loop attribute
To date, Firefox does not yet support the loop attribute of the <video> element. This snippet is a simple work-around. Once the video’s ended event is fired, it calls the play method.
For more, consult the media events section of the HTML5 specification.