@evankford/video-background
TypeScript icon, indicating that this package has built-in type declarations

0.10.0 • Public • Published

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.

Package Sidebar

Install

npm i @evankford/video-background

Weekly Downloads

25

Version

0.10.0

License

ISC

Unpacked Size

223 kB

Total Files

64

Last publish

Collaborators

  • evankford