I updated the gifplayer jquery plugin to add new features:
1. Video support
Now you can use video formats (mp4, webm) instead of gif images, to reduce the loading time.
Setup the ‘mode’ option to ‘video’ and the ‘webm’ and/or ‘mp4′ options to the desired video file. Or just post a video files with the same filename of the preview image.
2. ‘playOn’ option
Now you can decide which event triggers the gif/video to be played. It could be click, mouseover or ‘auto’, which means the animation will be played when the preview image is in the visible viewport.
3. ‘wait’ option
Now you can decide whether you want the animation to be fully loaded before trying to play, or play instantly. That last option could mean the first loop could look very slow for crappy internet connections.
4. bower support
The plugin was added to the bower repo as jquery.gifplayer.
You can use ‘bower install jquery.gifplayer’ to get it in your project.
5. Bug fixes
Fixed some bugs reported by the users.
Enjoy and don’t forget to leave me a star in Github if you like it