streaming-media
v1.0.3
Published
Effortlessly stream media files over HTTP. Elevate your app's multimedia experience with ease.
Downloads
94
Maintainers
Readme
streaming-media
Effortlessly stream media files over the HTTP . Elevate your app's multimedia experience with ease.
Installation
npm install streaming-media
Quick Start
what we need.
req
: request objectres
: response objectfilePath
: file path of the media file that you need to streaming.
How to use.
const mediaStreaming = require("streaming-media");
mediaStreaming(req,res,videoPath)
Example
With Express js
const express = require("express");
const app = express();
const mediaStreaming = require("streaming-media");
app.get("/video", function (req, res) {
const videoPath = "<path to you's media file>";
mediaStreaming(req,res,videoPath)
});
With just Http
var http = require('http');
const mediaStreaming = require("streaming-media");
http.createServer(function(req, res) {
mediaStreaming(req,res,"storage/a.mp4")
}).listen(8000);
Need to contribute
- go to the github repo and rise a issue(if you found the issue or feature).
- create branch (on top of the dev branch) with below format.
- MS-<issue_number> -> Ex: MS-1
- do your code change and make a single commit with below format.
- <type(fix or feat)>(app): <your's-branch-name> commit message
- ex : feat(app): MS-1 i did awesome future for you.
- then make PR to the dev branch
That's it.