Socket
Socket
Sign inDemoInstall

rtcpeerconnection

Package Overview
Dependencies
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtcpeerconnection - npm Package Compare versions

Comparing version 3.0.14 to 3.1.0

.travis.yml

5

package.json
{
"name": "rtcpeerconnection",
"version": "3.0.14",
"version": "3.1.0",
"description": "A tiny browser module that normalizes and simplifies the API for WebRTC peer connections.",

@@ -24,3 +24,4 @@ "main": "rtcpeerconnection.js",

"webrtcsupport": "^1.0.0",
"wildemitter": "1.x"
"wildemitter": "1.x",
"webrtc-adapter-test": "0.x"
},

@@ -27,0 +28,0 @@ "devDependencies": {

22

rtcpeerconnection.js

@@ -8,2 +8,3 @@ var util = require('util');

var peerconn = require('traceablepeerconnection');
var adapter = require('webrtc-adapter-test');

@@ -23,3 +24,3 @@

if (constraints && constraints.optional &&
webrtc.prefix === 'webkit' &&
adapter.webrtcDetectedBrowser === 'chrome' &&
navigator.appVersion.match(/Chromium\//) === null) {

@@ -36,3 +37,3 @@ constraints.optional.forEach(function (constraint, idx) {

if (constraints && constraints.optional &&
webrtc.prefix === 'webkit') {
adapter.webrtcDetectedBrowser === 'chrome') {
constraints.optional.forEach(function (constraint, idx) {

@@ -72,3 +73,3 @@ if (constraint.enableMultiStreamHacks) {

// but different transports (TURN udp, tcp and tls respectively)
if (constraints && constraints.optional && webrtc.prefix === 'webkit') {
if (constraints && constraints.optional && adapter.webrtcDetectedBrowser === 'chrome') {
constraints.optional.forEach(function (constraint, idx) {

@@ -105,3 +106,3 @@ if (constraint.andyetFasterICE) {

// pass in a timeout for this
if (webrtc.prefix === 'moz') {
if (adapter.webrtcDetectedBrowser === 'firefox') {
if (constraints && constraints.optional) {

@@ -266,3 +267,3 @@ this.wtFirefox = 0;

self.pc.addIceCandidate(
new webrtc.IceCandidate({
new RTCIceCandidate({
candidate: iceCandidate,

@@ -296,3 +297,3 @@ sdpMLineIndex: mline,

self.pc.addIceCandidate(
new webrtc.IceCandidate(update.candidate),
new RTCIceCandidate(update.candidate),
function () { },

@@ -451,3 +452,3 @@ function (err) {

});
self.pc.setRemoteDescription(new webrtc.SessionDescription(offer),
self.pc.setRemoteDescription(new RTCSessionDescription(offer),
function () {

@@ -515,3 +516,3 @@ cb();

self.pc.setRemoteDescription(
new webrtc.SessionDescription(answer),
new RTCSessionDescription(answer),
function () {

@@ -523,3 +524,3 @@ if (self.wtFirefox) {

self.pc.addIceCandidate(
new webrtc.IceCandidate(candidate),
new RTCIceCandidate(candidate),
function () { },

@@ -832,4 +833,5 @@ function (err) {

// a wrapper around getStats which hides the differences (where possible)
// TODO: remove in favor of adapter.js shim
PeerConnection.prototype.getStats = function (cb) {
if (webrtc.prefix === 'moz') {
if (adapter.webrtcDetectedBrowser === 'firefox') {
this.pc.getStats(

@@ -836,0 +838,0 @@ function (res) {

Sorry, the diff of this file is not supported yet

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

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