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

detectrtc

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

detectrtc

A tiny JavaScript library that can be used to detect WebRTC features e.g. system having speakers, microphone or webcam, screen capturing is supported, number of audio/video devices etc.

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35K
increased by16.04%
Maintainers
1
Weekly downloads
 
Created
Source

DetectRTC.js / Try LIVE Demo

npm downloads Build Status: Linux

A tiny JavaScript library that can be used to detect WebRTC features e.g. system having speakers, microphone or webcam, screen capturing is supported, number of audio/video devices etc.

It is MIT Licenced, which means that you can use it in any commercial/non-commercial product, free of cost.

npm install detectrtc

# or
bower install detectrtc

Check all releases

Latest stable release is: 1.0.9

Proposed NEW API

DetectRTC.isSetSinkIdSupported                  // (implemented)
DetectRTC.isRTPSenderReplaceTracksSupported     // (implemented)
DetectRTC.isORTCSupported                       // (implemented)
DetectRTC.isRemoteStreamProcessingSupported     // (implemented)

# Below API are NOT implemented yet
DetectRTC.browser.googSupportedFlags.googDAEEchoCancellation
DetecRTC.browser.googSupportedFlags.echoCancellation
DetectRTC.isMediaHintsSupportsNewSyntax

Test in LocalHost

node server.js    

// and open:   
127.0.0.1:9001 

// or 
http://localhost:9001

To use it:

<script src="./node_modules/detectrtc/DetectRTC.js"></script>

<!-- or CDN link -->
<script src="//cdn.webrtc-experiment.com/DetectRTC.js"></script>

How to use it?

DetectRTC.load(function() {
    // DetectRTC.hasWebcam (has webcam device!)
    // DetectRTC.hasMicrophone (has microphone device!)
    // DetectRTC.hasSpeakers (has speakers!)
    // DetectRTC.isScreenCapturingSupported
    // DetectRTC.isSctpDataChannelsSupported
    // DetectRTC.isRtpDataChannelsSupported
    // DetectRTC.isAudioContextSupported
    // DetectRTC.isWebRTCSupported
    // DetectRTC.isDesktopCapturingSupported
    // DetectRTC.isMobileDevice
    // DetectRTC.isWebSocketsSupported
    
    // DetectRTC.osName
    
    // DetectRTC.browser.name === 'Edge' || 'Chrome' || 'Firefox'
    // DetectRTC.browser.version
    // DetectRTC.browser.isChrome
    // DetectRTC.browser.isFirefox
    // DetectRTC.browser.isOpera
    // DetectRTC.browser.isIE
    // DetectRTC.browser.isSafari
    // DetectRTC.browser.isEdge

    // DetectRTC.isCanvasSupportsStreamCapturing
    // DetectRTC.isVideoSupportsStreamCapturing

    // DetectRTC.DetectLocalIPAddress(callback)
});

Why load method?

If you're not detecting audio/video input/outupt devices then you can skip this method.

DetectRTC.load simply makes sure that all devices are captured and valid result is set for relevant properties.

Rules to Contribute

git clone --depth=50 --branch=development git://github.com/muaz-khan/DetectRTC.git muaz-khan/DetectRTC

# install all dependencies
[sudo] npm install

# install grunt for code style verifications
[sudo] npm install grunt-cli
[sudo] npm install grunt

# verify your changes
npm test  # or "grunt"

# Success? Make a pull request!

License

DetectRTC.js is released under MIT licence . Copyright (c) Muaz Khan.

Keywords

FAQs

Package last updated on 25 Sep 2015

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