1.0.4 • Published 5 years ago

video-observer v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Video Observer

Build Status

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');

// 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 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

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago