Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mjpeg-server

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjpeg-server

Serve multiple jpgs as an mjpeg stream

  • 0.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mjpeg-server

Serve an mjpeg stream on a specified port through HTTP from multiple jpgs.

Methods

mjpegServer.createReqHandler(req, res)

Creates a request handler object with parameters from http.createServer.

var http = require('http');
var mjpegServer = require('..');

http.createServer(function(req, res) {
	mjpegReqHandler = mjpegServer.createReqHandler(req, res);
}).listen(8081);

mjpegServer.update(data)

Update the stream

mjpegReqHandler = mjpegServer.createReqHandler(req, res);
mjpegReqHandler.update(randomJpeg37);

mjpegServer.close()

Calls res.end

Changelog

0.3.1
  • Fixed a deprecation warning in Node.js 16.x due to a typo in the package.json main field.
0.3
  • Use streams2 in Node.js v.10

FAQs

Package last updated on 05 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc