vidjo

0.1.1 • Public • Published

vidjo.js

license Build Status Coverage Status

A simple (es6) library for dealing with background video's.

import Vidjo from 'vidjo';
 
const video = new Vidjo(document.body, 'videos/example', {
    'poster': 'videos/poster.jpg',
    'autoplay': true,
    'shouldEnableVideo': () => window.matchMedia( "(min-width: 500px)" ).matches
});
 

Installation

To include Vidjo in your project, first install with npm.

$ npm install vidjo

With Babel

Babel is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.

import Vidjo from 'vidjo';
 

Browserify/Webpack

There are several ways to use Browserify and Webpack. For more information on using these tools, please refer to the corresponding project's documention. In the script, including Vidjo will usually look like this...

var Vidjo = require("vidjo");
 

AMD (Asynchronous Module Definition)

AMD is a module format built for the browser. For more information, i recommend require.js' documentation.

define(["vidjo"], function($) {
 
});
 

Package Sidebar

Install

npm i vidjo

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • patrickkempff