JSPM

is-rtp

2.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 136
  • Score
    100M100P100Q70847F
  • License MIT

Check if a Buffer is a RTP/RTCP message.

Package Exports

  • is-rtp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-rtp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-rtp

Build Status npm node license downloads

Check if a Buffer is a RTP/RTCP message. Used for demultiplex packets that are arriving on the same port. Follows RFC7983.

Usage

const dgram = require('dgram')
const is_rtp = require('is-rtp')

const socket = dgram.createSocket('udp4')

socket.on('message', (packet) => {
  if (is_rtp(packet)) {
    // handle RTP...
  }
})

socket.bind(0)

License

MIT, 2017 (c) Dmitry Tsvettsikh