Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rtsp-server

watson518MIT1.2.2

Low level module for creating RTSP servers

rtsp, server, rfc2326, 2326, realtime, stream, streaming, protocol

readme

rtsp-server

A low level module for creating RTSP servers.

This project aims for 100% compliance with RFC 2326. If you find something missing, please open an issue.

Build status js-standard-style

Installation

npm install rtsp-server

Usage

var rtsp = require('rtsp-server')

var server = rtsp.createServer(function (req, res) {
  console.log(req.method, req.url)

  switch (req.method) {
    case 'OPTIONS':
      res.setHeader('Public', 'OPTIONS')
      break
    default:
      res.statusCode = 501 // Not implemented
  }

  res.end() // will echo the CSeq header used in the request
})

server.listen(5000, function () {
  var port = server.address().port
  console.log('RTSP server is running on port:', port)
})

Out of scope

This project is not:

  • An RTSP client
  • A functional RTSP server you can just run out of the box (think of this module more like the core http module without the client part)
  • A discovery service: I.e. no mDNS/Bonjour/Zeroconf technology included

Todo

  • UDP support: Currently only TCP is supported.
  • ??? Did I forget to add an item to this to-do list? Open an issue.

License

MIT