Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including videojs-watchdog-plugin with all npm packages installed. Try it out:

var videojsWatchdogPlugin = require("videojs-watchdog-plugin")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

videojs-watchdog-plugin v0.1.4

Internet watchdog for video.js

Build Status

videojs-watchdog-plugin

Internet watchdog for video.js

Installation

npm install --save videojs-watchdog-plugin

The npm installation is preferred, but Bower works, too.

bower install  --save videojs-watchdog-plugin

Usage

To include videojs-watchdog-plugin 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-watchdog-plugin.min.js"></script>
<script>
  var player = videojs('my-video');

  player.watchdogPlugin();
</script>

Browserify

When using with Browserify, install videojs-watchdog-plugin 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-watchdog-plugin');

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

player.watchdogPlugin();

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-watchdog-plugin'], function(videojs) {
  var player = videojs('my-video');

  player.watchdogPlugin();
});

License

MIT. Copyright (c) Vitaly Domnikov dotcypress@gmail.com

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free