Video Observer
![Build Status](https://travis-ci.org/morenofa/VideoObserver.js.svg?branch=master)
Purpose
VideoObserver.js allows you to listen some particular events that's occurs for on streaming videos.
For example detect when video is ready to play or when the resolution of your live stream video changes.
Installation
$ npm install video-observer
Example Usage
import { VideoObserver } from 'video-observer';
var vObserver = VideoObserver('#video');
vObserver.on('ready', function (error) {
if (error) {
throw error;
}
console.log('ready without errors!!');
});
vObserver.on('resolutionChange', function (resolution, event) {
console.log('resolution changed!!', resolution);
});
Building
Fork and clone the repository. Then, install dependencies with.
npm install
Then run the build
script:
npm run build
NOTE: You need node.js v8.11.2 or higher.
Changelog
See CHANGELOG.md.
License
MIT