Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

[ARCHIVED] Browser module to detect support for WebRTC and extract proper constructors.

Notifications You must be signed in to change notification settings

ipfs-inactive/webrtcsupport

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository has been archived!

This IPFS-related repository has been archived, and all issues are therefore frozen. If you want to ask a question or open/continue a discussion related to this repo, please visit the official IPFS forums.

We archive repos for one or more of the following reasons:

  • Code or content is unmaintained, and therefore might be broken
  • Content is outdated, and therefore may mislead readers
  • Code or content evolved into something else and/or has lived on in a different place
  • The repository or project is not active in general

Please note that in order to keep the primary IPFS GitHub org tidy, most archived repos are moved into the ipfs-inactive org.

If you feel this repo should not be archived (or portions of it should be moved to a non-archived repo), please reach out and let us know. Archiving can always be reversed if needed.


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.

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
    browserVersion: // integer, browser version
    supportRTCPeerConnection: // boolean whether basic support for RTCPeerConnection exists
    supportVp8: // boolean guess whether VP8 is supported by the browser
    supportGetUserMedia: // boolean whether getUserMedia is supported by the browser
    supportDataChannel: // boolean whether WebRTC data channels are supported
    supportWebAudio: // boolean whether WebAudio API is supported
    supportMediaStream: // boolean whether MediaStream is supported
    supportScreenSharing: // boolean guess of whether screensharing is supported,
    prefix: // returns browser prefix (either moz or webkit for now)
    AudioContext: // the audio context constructor from the web audio API
    PeerConnection: // constructor for creating a peer connection
    SessionDescription: // constructor for RTCSessionDescriptions
    IceCandidate: // constructor for ice candidate
    MediaStream: // constructor for MediaStreams
    getUserMedia: // getUserMedia function
}

License

MIT

Created By

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

About

[ARCHIVED] Browser module to detect support for WebRTC and extract proper constructors.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 78.3%
  • HTML 21.7%