Video Background component for Vue.js
Video Background is a component for Vue.js projects, to help users add a video playing as the background of their page, by Pantelis Peslis.
Install via NPM or yarn
npm install --save vue-videobg yarn add vue-videobg
Import the component to your main file to be able to use it globally
import VideoBg from 'vue-videobg' Vue.component('video-bg', VideoBg)
Use the component in your templates by using a video of your choice and an image to replace the video in case it fails
<video-bg :sources="['someURL']" img="someURL"> <!-- If you want to add content here, a slot is waiting! --> </video-bg>
It is simple as that, if you want to give it a try head to the GitHub repo.