Skip to content

🎬 The best javascript background–video library

License

Notifications You must be signed in to change notification settings

Tahseenm/bgvideo

Repository files navigation

BgVideo

 

BgVideo

NOTE: In Beta. Coming Soon 🐣

  • ✅ Zero dependencies
  • ✅ Lightweight
  • ✅ Customizable
  • ✅ Mobile support
  • ✅ Accessibility
  • ✅ ES6+

 

import BgVideo from 'bgvideo'

/**
 * Basic example
 */
BgVideo('#banner', 'https://example.com/assets/timelapse.mp4')


/**
 * Recommended minimum
 */
const src = {
  mp4:  'https://example.com/assets/timelapse.mp4',
  webm: 'https://example.com/assets/timelapse.webm',
}

const options = {
  backgroundColor: '#00012b',
  backgroundImage: 'https://example.com/assets/timelapse-poster.jpg',
}

BgVideo('#banner', src, options)

 

Browser Support

Chrome Safari IE / Edge Firefox Opera
Yes Yes 9+ Yes Yes

 

Contributors

Tahseen Malik

License

MIT

About

🎬 The best javascript background–video library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published