http-media-streamer
v1.0.3
Published
Node.js Express module to stream Video and Audio files.
Downloads
7
Maintainers
Readme
http-media-streamer
Node.js Express module to stream Video and Audio files.
Installation
npm i http-media-streamer
Usage
import mediaStreamer from 'http-media-streamer';
import express from 'express';
const app = express();
app.get('/', mediaStreamer);
app.listen(3000, () => {
console.log(`App listening on http://localhost:3000`);
});
in browser
send the request with absolute path of the file as query parameter filePath
<video controls>
<source src="http://localhost:3000/?filePath=/home/xyz/video.mp4" type="video/mp4">
</video>
Supported formats
https://support.mozilla.org/en-US/kb/html5-audio-and-video-firefox#w_supported-formats
Build
npm run build
Test
npm run test