rtcpeerconnection
Advanced tools
Comparing version 2.4.4 to 2.4.5
{ | ||
"name": "rtcpeerconnection", | ||
"version": "2.4.4", | ||
"version": "2.4.5", | ||
"description": "A tiny browser module that normalizes and simplifies the API for WebRTC peer connections.", | ||
@@ -5,0 +5,0 @@ "main": "rtcpeerconnection.js", |
@@ -74,2 +74,5 @@ var _ = require('underscore'); | ||
this.hadLocalIPv6Candidate = false; | ||
this.hadRemoteIPv6Candidate = false; | ||
// keeping references for all our data channels | ||
@@ -139,6 +142,8 @@ // so they dont get garbage collected | ||
self.hadRemoteStunCandidate = true; | ||
} | ||
else if (candidate.type === 'relay') { | ||
} else if (candidate.type === 'relay') { | ||
self.hadRemoteRelayCandidate = true; | ||
} | ||
if (candidate.ip.indexOf(':') != -1) { | ||
self.hadRemoteIPv6Candidate = true; | ||
} | ||
}); | ||
@@ -153,8 +158,11 @@ }); | ||
self.pc.addIceCandidate(new webrtc.IceCandidate(update.candidate)); | ||
if (update.candidate.candidate.indexOf('typ srflx') !== -1) { | ||
var cand = SJJ.toCandidateJSON(update.candidate.candidate); | ||
if (cand.type == 'srflx') { | ||
self.hadRemoteStunCandidate = true; | ||
} | ||
else if (update.candidate.candidate.indexOf('typ relay') !== -1) { | ||
} else if (cand.type == 'relay') { | ||
self.hadRemoteRelayCandidate = true; | ||
} | ||
if (cand.ip.indexOf(':') != -1) { | ||
self.hadRemoteIPv6Candidate = true; | ||
} | ||
} | ||
@@ -352,2 +360,3 @@ cb(); | ||
var cand = SJJ.toCandidateJSON(ice.candidate); | ||
if (self.config.useJingle) { | ||
@@ -378,3 +387,3 @@ if (!ice.sdpMid) { // firefox doesn't set this | ||
candidates: [ | ||
SJJ.toCandidateJSON(ice.candidate) | ||
cand | ||
] | ||
@@ -385,8 +394,10 @@ } | ||
} | ||
if (ice.candidate.indexOf('typ srflx') !== -1) { | ||
if (cand.type === 'srflx') { | ||
this.hadLocalStunCandidate = true; | ||
} | ||
else if (ice.candidate.indexOf('typ relay') !== -1) { | ||
} else if (cand.type == 'relay') { | ||
this.hadLocalRelayCandidate = true; | ||
} | ||
if (cand.ip.indexOf(':') != -1) { | ||
self.hadLocalIPv6Candidate = true; | ||
} | ||
@@ -393,0 +404,0 @@ this.emit('ice', expandedCandidate); |
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
142267
3269
3803