videojs-age-limit-icon

1.0.0 • Public • Published

videojs-age-limit-icon

A Video.js plugin for displaying age limit icon over the video

Installation

npm install --save videojs-age-limit-icon

Usage

To include videojs-age-limit-icon on your website or web application, use any of the following methods.

<script> Tag

This is the simplest case. Get the script in whatever way you prefer and include the plugin after you include video.js, so that the videojs global is available.

<script src="//path/to/video.min.js"></script>
<script src="//path/to/videojs-age-limit-icon.min.js"></script>
<script>
  var player = videojs('my-video');

  player.ageLimitIcon({
    limit: 18,
    duration: 0
  });
</script>

Browserify/CommonJS

When using with Browserify, install videojs-age-limit-icon via npm and require the plugin as you would any other module.

var videojs = require('video.js');

// The actual plugin function is exported by this module, but it is also
// attached to the `Player.prototype`; so, there is no need to assign it
// to a variable.
require('videojs-age-limit-icon');

var player = videojs('my-video');

player.ageLimitIcon({
  limit: 18,
  duration: 0
});

RequireJS/AMD

When using with RequireJS (or another AMD library), get the script in whatever way you prefer and require the plugin as you normally would:

require(['video.js', 'videojs-age-limit-icon'], function(videojs) {
  var player = videojs('my-video');

  player.ageLimitIcon({
    limit: 18,
    duration: 0
  });
});

License

MIT. Copyright (c) Sergey Gromkov <sgromkov@gmail.com>

Readme

Keywords

Package Sidebar

Install

npm i videojs-age-limit-icon

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

52.6 kB

Total Files

20

Last publish

Collaborators

  • sgromkov