rtcpeerconnection
Advanced tools
Comparing version 3.0.14 to 3.1.0
{ | ||
"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": { |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
232530
15
6379
7
5
+ Addedwebrtc-adapter-test@0.x
+ Addedwebrtc-adapter-test@0.2.10(transitive)