rtmp-server

0.2.0 • Public • Published

RTMP-Server

npm npm npm

A Node.js implementation of RTMP Server

  • Supports only RTMP protocol.
  • Supports only H.264 video and AAC audio.

Install

npm install --save rtmp-server

Usage

const RtmpServer = require('rtmp-server');
const rtmpServer = new RtmpServer();
 
rtmpServer.on('error', err => {
  throw err;
});
 
rtmpServer.on('client', client => {
  //client.on('command', command => {
  //  console.log(command.cmd, command);
  //});
 
  client.on('connect', () => {
     console.log('connect', client.app);
  });
  
  client.on('play', ({ streamName }) => {
    console.log('PLAY', streamName);
  });
  
  client.on('publish', ({ streamName }) => {
    console.log('PUBLISH', streamName);
  });
  
  client.on('stop', () => {
    console.log('client disconnected');
  });
});
 
rtmpServer.listen(1935);

License

GPL-2.0

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    18
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    18
  • 0.1.0
    1

Package Sidebar

Install

npm i rtmp-server

Weekly Downloads

16

Version

0.2.0

License

GPL-2.0

Last publish

Collaborators

  • moshe