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

Package detail

is-rtp

nodertc344MIT2.0.0

Check if a Buffer is a RTP/RTCP message.

rtp, rtcp, rfc7983, rfc5764, rfc3550, packet, message, test, detect, detect, demultiplexing, demultiplex, demux

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