video-observer

1.0.4 • Public • Published

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

Package Sidebar

Install

npm i video-observer

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

34.2 kB

Total Files

15

Last publish

Collaborators

  • moreno_fa