
bgVideo.js is a tiny JavaScript library that adds a fullscreen video background to your body or a specific container by using Html5 video element.
How to use it:
Place the bgVideo.js anywhere on your web page.
<script src="dist/bgvideo.min.js"></script>
Add the data-fullvideo attribute containing your background video source to the body tag.
<body data-fullvideo="path/to/demo.mp4">
Advanced usage:
// use like this, nothing else needed
bgVideo({
sources: ['bg.mp4', 'bg.webm', 'bg.ogg'],
img: 'bg.jpg'
});
// calling with no arguments returns the <video> tag
// so you can do things like
bgVideo().pause();
bgVideo().play();






