rtcpeerconnection
Advanced tools
Comparing version 2.2.2 to 2.3.0
{ | ||
"name": "rtcpeerconnection", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"description": "A tiny browser module that normalizes and simplifies the API for WebRTC peer connections.", | ||
@@ -5,0 +5,0 @@ "main": "rtcpeerconnection.js", |
@@ -63,2 +63,6 @@ var _ = require('underscore'); | ||
} | ||
this.hadLocalStunCandidate = false; | ||
this.hadRemoteStunCandidate = false; | ||
this.hadLocalRelayCandidate = false; | ||
this.hadRemoteRelayCandidate = false; | ||
} | ||
@@ -75,3 +79,2 @@ | ||
get: function () { | ||
console.log('get', this.pc.iceConnectionState); | ||
return this.pc.iceConnectionState; | ||
@@ -104,3 +107,2 @@ } | ||
candidates.forEach(function (candidate) { | ||
console.log('addicecandidate'); | ||
var iceCandidate = SJJ.toCandidateSDP(candidate) + '\r\n'; | ||
@@ -122,2 +124,8 @@ self.pc.addIceCandidate(new webrtc.IceCandidate({ | ||
); | ||
if (candidate.type === 'srflx') { | ||
this.hadRemoteStunCandidate = true; | ||
} | ||
else if (candidate.type === 'relay') { | ||
this.hadRemoteRelayCandidate = true; | ||
} | ||
}); | ||
@@ -127,2 +135,8 @@ }); | ||
self.pc.addIceCandidate(new webrtc.IceCandidate(update.candidate)); | ||
if (update.candidate.candidate.indexOf('typ srflx') !== -1) { | ||
this.hadRemoteStunCandidate = true; | ||
} | ||
else if (update.candidate.candidate.indexOf('typ relay') !== -1) { | ||
this.hadRemoteRelayCandidate = true; | ||
} | ||
} | ||
@@ -343,2 +357,8 @@ cb(); | ||
}; | ||
if (event.candidate.indexOf('typ srflx') !== -1) { | ||
this.hadLocalStunCandidate = true; | ||
} | ||
else if (event.candidate.indexOf('typ relay') !== -1) { | ||
this.hadLocalRelayCandidate = true; | ||
} | ||
} | ||
@@ -345,0 +365,0 @@ |
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
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
137049
3680