rtcpeerconnection
Advanced tools
Comparing version 8.3.1 to 8.4.0
{ | ||
"name": "rtcpeerconnection", | ||
"version": "8.3.1", | ||
"version": "8.4.0", | ||
"description": "A tiny browser module that normalizes and simplifies the API for WebRTC peer connections.", | ||
@@ -5,0 +5,0 @@ "main": "rtcpeerconnection.js", |
@@ -244,3 +244,10 @@ var util = require('util'); | ||
this.localStream = stream; | ||
this.pc.addStream(stream); | ||
stream.getTracks().forEach( | ||
function(track) { | ||
this.pc.addTrack( | ||
track, | ||
stream | ||
); | ||
} | ||
); | ||
}; | ||
@@ -310,5 +317,7 @@ | ||
sdpMid: mid | ||
}), function () { | ||
// well, this success callback is pretty meaningless | ||
}, | ||
}) | ||
).then( | ||
function () { | ||
// well, this success callback is pretty meaningless | ||
}, | ||
function (err) { | ||
@@ -337,3 +346,5 @@ self.emit('error', err); | ||
}); | ||
self.pc.setRemoteDescription(new RTCSessionDescription(offer), | ||
self.pc.setRemoteDescription( | ||
new RTCSessionDescription(offer) | ||
).then( | ||
function () { | ||
@@ -368,3 +379,4 @@ processCandidates(); | ||
self.pc.addIceCandidate( | ||
new RTCIceCandidate(update.candidate), | ||
new RTCIceCandidate(update.candidate) | ||
).then( | ||
function () { }, | ||
@@ -395,2 +407,4 @@ function (err) { | ||
this.pc.createOffer( | ||
mediaConstraints | ||
).then( | ||
function (offer) { | ||
@@ -408,3 +422,3 @@ // does not work for jingle, but jingle.js doesn't need | ||
self._candidateBuffer = []; | ||
self.pc.setLocalDescription(offer, | ||
self.pc.setLocalDescription(offer).then( | ||
function () { | ||
@@ -453,4 +467,3 @@ var jingle; | ||
cb(err); | ||
}, | ||
mediaConstraints | ||
} | ||
); | ||
@@ -535,3 +548,5 @@ }; | ||
}); | ||
self.pc.setRemoteDescription(new RTCSessionDescription(offer), | ||
self.pc.setRemoteDescription( | ||
new RTCSessionDescription(offer) | ||
).then( | ||
function () { | ||
@@ -609,3 +624,4 @@ cb(); | ||
self.pc.setRemoteDescription( | ||
new RTCSessionDescription(answer), | ||
new RTCSessionDescription(answer) | ||
).then( | ||
function () { | ||
@@ -617,3 +633,4 @@ if (self.wtFirefox) { | ||
self.pc.addIceCandidate( | ||
new RTCIceCandidate(candidate), | ||
new RTCIceCandidate(candidate) | ||
).then( | ||
function () { }, | ||
@@ -657,2 +674,4 @@ function (err) { | ||
self.pc.createAnswer( | ||
constraints | ||
).then( | ||
function (answer) { | ||
@@ -714,3 +733,3 @@ var sim = []; | ||
self._candidateBuffer = []; | ||
self.pc.setLocalDescription(answer, | ||
self.pc.setLocalDescription(answer).then( | ||
function () { | ||
@@ -772,4 +791,3 @@ if (self.config.useJingle) { | ||
cb(err); | ||
}, | ||
constraints | ||
} | ||
); | ||
@@ -776,0 +794,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
191168
15
5328