Socket
Socket
Sign inDemoInstall

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 - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "webrtcsupport",
"version": "0.1.0",
"version": "0.2.0",
"description": "Browser module to detect support for webrtc and extract proper constructors.",

@@ -5,0 +5,0 @@ "main": "webrtcsupport.js",

@@ -7,10 +7,19 @@ (function(e){if("function"==typeof bootstrap)bootstrap("webrtcsupport",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeWebrtcsupport=e}else"undefined"!=typeof window?window.webrtcsupport=e():global.webrtcsupport=e()})(function(){var define,ses,bootstrap,module,exports;

var SessionDescription = window.RTCSessionDescription || window.mozRTCSessionDescription;
var prefix = function () {
if (window.mozRTCPeerConnection) {
return 'moz';
} else if (window.webkitRTCPeerConnection) {
return 'webkit';
}
}();
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
// export support flags and constructors
module.exports = {
PeerConnection: PC,
support: !!PC,
dataChannel: !!(PC && PC.prototype.createDataChannel),
prefix: prefix,
screenSharing: screenSharing,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate,
support: !!PC,
dataChannel: !!(PC && PC.prototype.createDataChannel)
IceCandidate: IceCandidate
};

@@ -17,0 +26,0 @@

@@ -12,11 +12,12 @@ // created by @HenrikJoreteg

}();
var screenSharing = navigator.userAgent.match('Chrome') && parseInt(navigator.userAgent.match(/Chrome\/(.*) /)[1], 10) >= 26;
// export support flags and constructors
module.exports = {
PeerConnection: PC,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate,
support: !!PC,
dataChannel: !!(PC && PC.prototype.createDataChannel),
prefix: prefix
prefix: prefix,
screenSharing: screenSharing,
SessionDescription: SessionDescription,
IceCandidate: IceCandidate
};
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