1.0.2 • Published 6 years ago

video_background v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

videoBackground

Demo

https://lemehovskiy.github.io/videoBackground/demo

Package Managers

# NPM
npm install video_background

Data Attribute Settings

In parallaxContent you can now add settings using the data-video-background attribute. You still need to call $(element).videoBackground() to initialize videoBackground on the element.

Example:

<div class="html-video-background" data-video-background='{"ratio_x": 16, "ratio_y": 9}'>
    <video src="video.mp4" autoplay muted></video>
</div>

<script>
    $('.html-video-background').videoBackground();
</script>

Settings

OptionTypeDefault
ratio_xint16
ratio_yint9

Example:

<div class="html-video-background">
    <video src="video.mp4" autoplay muted></video>
</div>

<script>
    $('.html-video-background').videoBackground({
        ratio_x: 16,
        ratio_y: 9,
    });
</script>

Browser support

  • Chrome
  • Firefox
  • Opera
  • IE10/11

Dependencies

  • jQuery 1.7