Video Background Plugin is a small jQuery plugin to simplify the process of displaying HTML5 video as background. You can use this to display a video file or a Youtube video on the background of the entire page or to show the video as the background of elements like <div>, <section>.
html5 video generate poster image, html5 video image while loading, html5 video thumbnail image, html5 video loading spinner, html5 video cover, html5 video poster not showing
Features:
- Cross browser video Background plugin.
- Support mp4 and WebM video files.
- YouTube video support.
- Very small file size (4KB total).
- Easy to use.
- They can be used for a page background or for an element’s background.
- Backup image when the video is not supported.
- Pause the video when it is out of view.
- Multiple instances on the same page are possible.
- The device is easy to respond to and quick to respond.
- Tested on all modern browsers.
How to make use of it:
1. Include the vidbacking JavaScript and CSS files on the web page where the jQuery library loads properly.
<link rel="stylesheet" href="jquery.vidbacking.css" type="text/css"> <script src="//code.jquery.com/jquery-3.6.0.min.js"></script> <script src="dist/jquery.vidbacking.js"></script>
2. Embed an HTML5 video or a Youtube video on the webpage.
<video poster="poster.jpg" autoplay muted loop class="vidbacking"> <source src="sample.mp4" type="video/mp4"> </video> <iframe width="560" height="315" src="Add Video Link Here" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen class="vidbacking"></iframe><br type="_moz">
3. Make the video in full-screen mode and serve as background for the whole page.
$('body').vidbacking();
4. You can also apply the video background to the container element you select.
$('.container').vidbacking();
5. If you want to display an overlay mask in the background of the video.
$('.container').vidbacking({ 'masked': true });
6. Change the opacity of the mask and video.
$('.container').vidbacking({ 'video-opacity': '1', 'mask-opacity': '1' });
jQuery Plugin For HTML5 Video Background With Fallback Image, Video Background Plugin with Support for Youtube Video Github, video fallback image
See Demo And Download
Official Website(souravm84): Click Here
This superior jQuery/javascript plugin is developed by souravm84. For extra advanced usage, please go to the official website.