1.0.4 • Published 7 years ago
video-observer v1.0.4
Video Observer
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-observerExample Usage
import { VideoObserver } from 'video-observer';
var vObserver = VideoObserver('#video');
// When video is ready to play
vObserver.on('ready', function (error) {
if (error) {
throw error;
}
console.log('ready without errors!!');
});
// When resolution changes
vObserver.on('resolutionChange', function (resolution, event) {
console.log('resolution changed!!', resolution);
});Building
Fork and clone the repository. Then, install dependencies with.
npm installThen run the build script:
npm run buildNOTE: You need node.js v8.11.2 or higher.
Changelog
See CHANGELOG.md.
License
MIT