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

webrtc-adapter

Package Overview
Dependencies
Maintainers
5
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtc-adapter - npm Package Compare versions

Comparing version 6.1.0 to 6.1.1

2

package.json
{
"name": "webrtc-adapter",
"version": "6.1.0",
"version": "6.1.1",
"description": "A shim to insulate apps from WebRTC spec changes and browser prefix differences",

@@ -5,0 +5,0 @@ "license": "BSD-3-Clause",

@@ -557,3 +557,3 @@

// The RTCPeerConnection object.
if (!window.RTCPeerConnection) {
if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {
window.RTCPeerConnection = function(pcConfig, pcConstraints) {

@@ -560,0 +560,0 @@ // Translate iceTransportPolicy to iceTransports,

@@ -117,3 +117,3 @@ /*

shimMaxMessageSize: function(window) {
if (window.RTCSctpTransport) {
if (window.RTCSctpTransport || !window.RTCPeerConnection) {
return;

@@ -120,0 +120,0 @@ }

@@ -147,4 +147,3 @@ /*

// Firefox.
if (navigator.mozGetUserMedia) {
if (navigator.mozGetUserMedia) { // Firefox.
result.browser = 'firefox';

@@ -154,18 +153,7 @@ result.version = extractVersion(navigator.userAgent,

} else if (navigator.webkitGetUserMedia) {
// Chrome, Chromium, Webview, Opera, all use the chrome shim for now
if (window.webkitRTCPeerConnection) {
result.browser = 'chrome';
result.version = extractVersion(navigator.userAgent,
// Chrome, Chromium, Webview, Opera.
// Version matches Chrome/WebRTC version.
result.browser = 'chrome';
result.version = extractVersion(navigator.userAgent,
/Chrom(e|ium)\/(\d+)\./, 2);
} else { // Safari (in an unpublished version) or unknown webkit-based.
if (navigator.userAgent.match(/Version\/(\d+).(\d+)/)) {
result.browser = 'safari';
result.version = extractVersion(navigator.userAgent,
/AppleWebKit\/(\d+)\./, 1);
} else { // unknown webkit-based browser.
result.browser = 'Unsupported webkit-based browser ' +
'with GUM support but no WebRTC support.';
return result;
}
}
} else if (navigator.mediaDevices &&

@@ -177,4 +165,3 @@ navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) { // Edge.

} else if (navigator.mediaDevices &&
navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) {
// Safari, with webkitGetUserMedia removed.
navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) { // Safari.
result.browser = 'safari';

@@ -181,0 +168,0 @@ result.version = extractVersion(navigator.userAgent,

@@ -55,12 +55,2 @@ /*

it('detects Safari if navigator.webkitGetUserMedia exists', () => {
navigator.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) ' +
'AppleWebKit/604.1.6 (KHTML, like Gecko) Version/10.2 Safari/604.1.6';
navigator.webkitGetUserMedia = function() {};
const browserDetails = detectBrowser(window);
expect(browserDetails.browser).to.equal('safari');
expect(browserDetails.version).to.equal(604);
});
it('detects Safari if navigator.mediaDevices exists', () => {

@@ -67,0 +57,0 @@ navigator.userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) ' +

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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