Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nodertc/is-rtp
Check if a Buffer is a RTP/RTCP message.
https://github.com/nodertc/is-rtp
js node nodejs nodertc rtp webrtc
Last synced: 3 months ago
JSON representation
Check if a Buffer is a RTP/RTCP message.
- Host: GitHub
- URL: https://github.com/nodertc/is-rtp
- Owner: nodertc
- License: mit
- Created: 2017-07-12T10:09:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-13T20:03:16.000Z (about 7 years ago)
- Last Synced: 2024-10-31T16:57:43.826Z (3 months ago)
- Topics: js, node, nodejs, nodertc, rtp, webrtc
- Language: JavaScript
- Size: 6.84 KB
- Stars: 4
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# is-rtp
[![Build Status](https://travis-ci.org/nodertc/is-rtp.svg?branch=master)](https://travis-ci.org/nodertc/is-rtp)
[![npm](https://img.shields.io/npm/v/is-rtp.svg)](https://npmjs.org/package/is-rtp)
[![node](https://img.shields.io/node/v/is-rtp.svg)](https://npmjs.org/package/is-rtp)
[![license](https://img.shields.io/npm/l/is-rtp.svg)](https://npmjs.org/package/is-rtp)
[![downloads](https://img.shields.io/npm/dm/is-rtp.svg)](https://npmjs.org/package/is-rtp)Check if a Buffer is a [RTP/RTCP](https://tools.ietf.org/html/rfc3550) message. Used for demultiplex packets that are arriving on the same port. Follows [RFC7983](https://tools.ietf.org/html/rfc7983#section-7).
## Usage
```js
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)
```## Related projects
* [`is-dtls`](https://github.com/nodertc/is-dtls) - Check if a Buffer is a [DTLS](https://tools.ietf.org/html/rfc4347) message.
* [`is-turn`](https://github.com/nodertc/is-turn) - Check if a Buffer is a [TURN](https://tools.ietf.org/html/rfc5766) message.
* [`is-stun`](https://github.com/nodertc/is-stun) - Check if a Buffer is a [STUN](https://tools.ietf.org/html/rfc5389) message.## License
MIT, 2017 (c) Dmitry Tsvettsikh