node package manager
Easy collaboration. Discover, share, and reuse code in your team. Create a free org »

mse-stream-grabber

Webcam Grabber

This is a simple npm module for grabbing input from a MediaSrouce Extensions stream. webcam. It's essentially a very lightweight convenience wrrapper around hls.js, so you may want to look there for more info.

Usage

 
var mseStreamGrabber = require('mse-strem-grabber');
var src = 'http://www.streambox.fr/playlists/test_001/stream.m3u8';
var video = mseStreamGrabber(src, onStreamLoaded);
 
document.body.appendChild(video);
 
function onStreamLoaded(err, v) {
    if(err) {
        throw err;
    }
 
    v.play();
};
 

Example

To run the included example:

npm install
npm run example

The example uses the budo development server to run.