Add automatic Segment event tracking to popular video players.
Video plugins are built to hook into the lifecycle API of their corresponding video player and translate those events in to Segment events that adhere to the Video Spec.
Each individual plugin is stored in the
/plugins directory. Plugins are built into a single module using Webpack and output as a single commonJs module into the
/dist directory. This file is then bundled into analytics.js via analytics.js-private using Browserify. Each plugin is accessible at runtime at
If you're interested in contributing to the development of an existing player plugin or creating a new one, please reference our contribution guidelines.
To release, simply merge your changes into master on Github, pull them down locally into your master branch, and run
yarn release <major | minor | patch>. This will automatically update
package.json with the appropriate version bump, build a new dist file, push the updates to GitHub, and publish to npm.
Next, follow the instructions to release analytics.js (note: you'll be bumping the version of
@segment/analytics.js-video-plugins in that repo to the version you just published.