video-streamer

0.0.1 • Public • Published

Video Streamer

Express.js module to support basic streaming of video from a server.

Currently this only supports files with an mp4 extension. Streaming should be successful to the both the html5 embedded video element and any similar player, for example the ios video player.

Installation

npm install --save video-streamer

Usage

const express = require('express');
const app = express();
 
const videoStreamer = require('video-streamer');
 
// default path to the video folder is 'video' if no config is specified
app.get('/video/:videoName', videoStreamer( { videoPath: 'video' } ));
 
app.listen(3000);

Testing

To run the build in http tests:

npm test

To see the streaming in action, a demonstration server and html file are included in the package. To use, first run the tests with the 'npm test' command as specified above. This will place a demonstration video in the temp folder. When this is complete, run:

npm start

to start the demonstration streaming server. Open the file demo/index.html in a browser to see the video stream.

Package Sidebar

Install

npm i video-streamer

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • graymanto