video-box

Minimal video overlay

Usage no npm install needed!

<script type="module">
  import videoBox from 'https://cdn.skypack.dev/video-box';
</script>

README

video-box

video-box is a small class for easy video embed overlays

Usage

npm install video-box

Element to trigger video-box. To this you pass the embed url.

<button class="js-has-vb" data-embed-url="videoembedurlhere"></button>

The overlay container. Preferably added to the end of the your template.

<div class="vb-container"></div>

Initalize video-box

import VideoBox from 'video-box'

const videoBox = new VideoBox()

Options

  • container: the outer container
  • fade : number of seconds to fade in and out the overlay (default is 0.25)