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

webrtcsupport

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtcsupport

Browser module to detect support for webrtc and extract proper constructors.

  • 0.3.2
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

webrtcsupport

What is this?

A tiny browser module for detecting support for WebRTC and also for extracting the necessary constructors such as PeerConnection, SessionDescription, and IceCandidate.

Suitable for use with browserify/CommonJS on the client.

If you're not using browserify or you want AMD support use webrtcsupport.bundle.js.

This tiny module is used by SimpleWebRTC, but obviously can be used by itself.

Installing

npm install webrtcsupport

How to use it

Simply require it and it returns a simple object with support flags and useful support info and normalized constructors for various WebRTC related items.

var webrtcSupport = require('webrtcsupport');

// it returns an object with the following:
{
    support: // boolean whether basic WebRTC support exists
    dataChannel: // boolean whether WebRTC data channels are supported
    prefix: // returns browser prefix (either moz or webkit for now)
    webAudio: // boolean support for web audio API
    PeerConnection: // constructor for creating a peer connection
    SessionDescription: // constructor for RTCSessionDescriptions
    IceCandidate: // constructor for ice candidate
}

License

MIT

Created By

If you like this, follow: @HenrikJoreteg on twitter.

Keywords

FAQs

Package last updated on 01 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