rtc-negotiator

Node streams compatible peer connection negotiator

npm install rtc-negotiator
4 downloads in the last month

rtc-negotiator

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.

NPM

experimental

Usage

To be completed.

Reference

RTCNegotiator

To be completed.

createAnswer()

createOffer()

_createDescription(data)

Create an RTCSessionDescription from the data provided.

_handleConnectionStateChange(evt)

Internal handler for the oniceconnectionstatechange event.

_handleDataChannel(evt)

Internal event handler for ondatachannel events of the peer connection.

_handleIceCandidate(evt)

Internal handler for onicecandidate events in the peer connection.

_handleSignlingStateChange(evt)

Internal handler for the onsignalingstatechange event.

_initPeerConnection(opts)

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(data)

Queue some data into the read queue

_read(n)

Implementation of required _read method

_write(chunk, encoding, callback)

Implementation of required _write method

License(s)

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

 http://www.apache.org/licenses/LICENSE-2.0

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