vue-video-hero
What is this?
This is a responsive video section with content overlay. In other other words, this is a responsive hero section with a video as background that you can overlay content on top of.
It supports YouTube and Vimeo.
How to use it?
Install it:
npm i vue-video-hero
Inside your .vue component:
<template>
// ...
<vue-video-hero source="youtube || vimeo" videoId="_XcsNhdz-kM">
// For YouTube:
// https://youtu.be/[_XcsNhdz-kM] <-- this is the id
// For Vimeo:
// https://vimeo.com/[123456789] <-- this is the id
<template #content>
// Put your content here
</template>
</vue-video-hero>
</template>
<script>
// ...
import VueVideoHero from 'vue-video-hero'
// ...
components: {
// ...
VueVideoHero,
}
// ...
</script>
Defaults
Currently unchangeable
- Auto play on all devices (except iOS < 10)
- Muted audio
- Loops automatically (the video never ends)
Dependencies
Dependencies
@types/jest: ^24.0.18@vue/test-utils: ^1.0.0-beta.29babel-core: ^6.26.3babel-jest: ^24.9.0babel-preset-env: ^1.7.0cross-env: ^5.2.0jest: ^24.9.0minimist: ^1.2.0rollup: ^1.12.1rollup-plugin-buble: ^0.19.6rollup-plugin-commonjs: ^10.0.0rollup-plugin-replace: ^2.2.0rollup-plugin-terser: ^4.0.4rollup-plugin-vue: ^5.0.0vue: ^2.6.10vue-jest: ^3.0.5vue-template-compiler: ^2.6.10