Skip to content
HTML5 video analytics
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
src
test
.babelrc
.editorconfig
.eslintignore
.eslintrc
.gitignore
.npmignore
.sublimelinterrc
.travis.yml
LICENSE.md
README.md
package.json
webpack.config.js
yarn.lock

README.md

videoanalytics.io

Build Status Coverage Status dependencies Status devDependencies Status Slack Status

Thanks for checking out the videoanalytics.io npm module. It's still a work-in-progress. Check back soon for updates! If you'd like to contribute to the project, join the Slack group and drop us a line!

Installation

The fastest way to get started is to serve JavaScript from the unpkg CDN:

<!-- Unminified -->
<script src="https://unpkg.com/videoanalytics.io@0.1.3/dist/videoanalytics.io.js"></script>

<!-- Minified -->
<script src="https://unpkg.com/videoanalytics.io@0.1.3/dist/videoanalytics.io.min.js"></script>

If you'd like to use npm, it's as easy as:

npm -i --save videoanalytics.io

Getting Started

const vAnalytics = new VideoAnalyticsIO();
vAnalytics.init((data, done) => {
  // do what you want with data
  console.log(data);
  done();
});

Configuration

vAnalytics.init([options], callback);
  • EVENTS_TO_TRACK: an array of user interactions to track (e.g., play, pause, seek)
  • NUM_DECIMAL_PLACES: an integer for the number of decimal places to round (e.g., 12.68)
  • NUM_EVENTS_BEFORE_SENDING: an integer for the number of events per video to store before calling your provided callback function

The default options can be seen in src/config.defaults.js.

Examples

For full examples, see the examples/ directory.

License

BSD 3-Clause License

You can’t perform that action at this time.