diff --git a/package.json b/package.json index 00f2a6a..cd910f6 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "license": "MIT", "main": "serverless-webrtc.js", "dependencies": { - "wrtc": "~0.0.29", + "wrtc": "~0.0.61", "ansi": "0.3.0" }, "repository": { diff --git a/serverless-webrtc.js b/serverless-webrtc.js index 2bb7be3..c7d9fab 100755 --- a/serverless-webrtc.js +++ b/serverless-webrtc.js @@ -104,7 +104,7 @@ function doCreateAnswer() { function doSetLocalDesc(desc) { answer = desc; - pc.setLocalDescription(desc, undefined, doHandleError); + pc.setLocalDescription(desc, function(){}, doHandleError); }; function doHandleDataChannels() { @@ -143,9 +143,11 @@ function makeOffer() { pc.oniceconnectionstatechange = oniceconnectionstatechange; pc.onicegatheringstatechange = onicegatheringstatechange; pc.createOffer(function (desc) { - pc.setLocalDescription(desc, function () {}); + pc.setLocalDescription(desc, function () {}, function (err) {}); // We'll pick up the offer text once trickle ICE is complete, // in onicecandidate. + },function (err) { + console.log("Error ", err); }); pc.onicecandidate = function(candidate) { // Firing this callback with a null candidate indicates that