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

webrtcsupport

Package Overview
Dependencies
Maintainers
4
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtcsupport - npm Package Compare versions

Comparing version 1.2.6 to 1.3.0

8

index-browser.js
// created by @HenrikJoreteg
var prefix;
var version;
if (window.mozRTCPeerConnection || navigator.mozGetUserMedia) {
prefix = 'moz';
version = parseInt(navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1], 10);
} else if (window.webkitRTCPeerConnection || navigator.webkitGetUserMedia) {
prefix = 'webkit';
version = parseInt(navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)[2], 10);
}

@@ -15,4 +18,4 @@

var screenSharing = window.location.protocol === 'https:' &&
((window.navigator.userAgent.match('Chrome') && parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26) ||
(window.navigator.userAgent.match('Firefox') && parseInt(window.navigator.userAgent.match(/Firefox\/(.*)/)[1], 10) >= 33));
((prefix === 'webkit' && version >= 26) ||
(prefix === 'moz' && version >= 33))
var AudioContext = window.AudioContext || window.webkitAudioContext;

@@ -26,2 +29,3 @@ var videoEl = document.createElement('video');

prefix: prefix,
browserVersion: version,
support: !!PC && supportVp8 && !!getUserMedia,

@@ -28,0 +32,0 @@ // new support style

{
"name": "webrtcsupport",
"description": "Browser module to detect support for webrtc and extract proper constructors.",
"version": "1.2.6",
"version": "1.3.0",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -6,0 +6,0 @@ "browser": "index-browser.js",

@@ -29,2 +29,3 @@ # webrtcsupport

support: // boolean whether basic WebRTC support exists
browserVersion: // integer, browser version
supportRTCPeerConnection: // boolean whether basic support for RTCPeerConnection exists

@@ -31,0 +32,0 @@ supportVp8: // boolean guess whether VP8 is supported by the browser

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