Node streams compatible peer connection negotiator

npm install rtc-negotiator
4 downloads in the last month


This module provides a node-compatible streaming interface for performing WebRTC peer connection negotiation. It is designed to provide "single-shot" negotiation and ends once a connection has been established to it's peer.




To be completed.



To be completed.




Create an RTCSessionDescription from the data provided.


Internal handler for the oniceconnectionstatechange event.


Internal event handler for ondatachannel events of the peer connection.


Internal handler for onicecandidate events in the peer connection.


Internal handler for the onsignalingstatechange event.


Create a new peer connection for use in the stream. If a connection has been provided as part of the opts then use that rather than creating a new connection.

_processAnswer(data, callback)

The responder to { type: 'answer' } data chunks.

_processCandidates(data, callback)

The responder to { type: 'candidates' } data chunks

_processOffer(data, callback)

The responder to { type: 'offer' } data chunks.


Queue some data into the read queue


Implementation of required _read method

_write(chunk, encoding, callback)

Implementation of required _write method


Apache 2.0

Copyright 2013 National ICT Australia Limited (NICTA)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at


Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

npm loves you