We are embedding video from Vimeo on a site we are working on and wanted to change the behavior of playing a video so that it would go back to the first frame after the video was done playing, rather than staying on the last frame. Since it ended up being harder than expected and finding good documentation online was difficult, I thought I’d share my solution here.
The code is structured as a jQuery plugin, so of course you will need jQuery. However, there is not a strong dependency on jQuery so with a little restructuring, I’m sure the jQuery dependency could be dropped.
Here it is: