Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated wrtc, fix error createOffer #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"main": "serverless-webrtc.js",
"dependencies": {
"wrtc": "~0.0.29",
"wrtc": "~0.0.61",
"ansi": "0.3.0"
},
"repository": {
Expand Down
6 changes: 4 additions & 2 deletions serverless-webrtc.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function doCreateAnswer() {

function doSetLocalDesc(desc) {
answer = desc;
pc.setLocalDescription(desc, undefined, doHandleError);
pc.setLocalDescription(desc, function(){}, doHandleError);
};

function doHandleDataChannels() {
Expand Down Expand Up @@ -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) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after the ,

console.log("Error ", err);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use single quotes to match the rest of the code

});
pc.onicecandidate = function(candidate) {
// Firing this callback with a null candidate indicates that
Expand Down