Posted on

jQuery Background Video – a jQuery plugin for better HTML5 background videos

typing-code

Today we released jQuery Background Video, a jQuery plugin that makes your background videos better with a single line of code.

jQuery Background Video makes the following improvements to any background videos you call it on:

  • Imitates background-size: cover; / object-fit: cover; to stretch the video over it’s containing element and scale with it while maintaining aspect ratio.
  • Destroys the background video on iOS (which doesn’t play nice with background videos) and prevents the video files from downloading.
  • Optionally fades-in your video when it starts playing, like we do on BG Stock, to avoid any distracting sudden movements (background videos are all about subtlety).

You canĀ find the code and usage instructions on GitHub.