Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rtc-core

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtc-core

Core definitions and functions for the rtc.io suite

  • 0.2.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
359
increased by48.96%
Maintainers
1
Weekly downloads
 
Created
Source

rtc-core

The rtc-core package includes a number of core types and constants that are used across the rtc.io suite.

rtc-core/detect

A browser detection helper for accessing prefix-free versions of the various WebRTC types.

Example Usage

If you wanted to get the native RTCPeerConnection prototype in any browser you could do the following:

var detect = require('rtc-core/detect'); // also available in rtc/detect
var RTCPeerConnection = detect('RTCPeerConnection');

This would provide whatever the browser prefixed version of the RTCPeerConnection is available (webkitRTCPeerConnection, mozRTCPeerConnection, etc).

Core Error Codes

HSIP

Handshake in Progress.

REQCHAN

This error condition is encountered when a peer connection is used without being assigned a valid signalling channel to start with.

Peer prototype reference

The Peer prototype is a simple data type that helps the browser interface with the streaming interfaces used by the signaller transports.

close()

Close the current peer outbound sources

inbound()

The inbound function is used to return a pull-stream sink that represents inbound data for the peer. As data is fed into the sink, data events are emitted and if the stream ends we get a 'disconnect' event for the peer.

outbound()

The outbound function is used to return a pull-stream source that will supply messages that need to be sent out from the peer.

reset()

Reset the message backlog

send(data)

Keywords

FAQs

Package last updated on 31 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc