@evankford/video-background
v0.10.0
Published
Automatic background video from various sources (Youtube, MP4, vimeo) with autoplay across devices. No JS dependencies.
Downloads
218
Maintainers
Readme
Finally, a good background video component.
Looking for an easy way to include autoplay/good background video in your site?
Installation
Usage
Features
- Accepts local videos (webm/mp4) and YouTube videos as backgrounds. (Vimeo coming soon)
- Tiny (3kb gzipped)
- Allows for a fallback poster image and graceful loading.
- Easily fade the background video for more readability/contrast
- Accepts sourceset gracefully, allowing for loading smaller video files on smaller screens.
- IntersectionObserver support (optional, true by default) to load video backgrounds when onScreen, and pause when offScreen.
- Reloadable on DOMManipulation
- Allows for multiple background videos on the same page.