diff --git a/app.js b/app.js index 162e3052a..22b4eb4b1 100644 --- a/app.js +++ b/app.js @@ -554,7 +554,7 @@ $(document).bind('callincoming.jingle', function (event, sid) { // TODO: check affiliation and/or role console.log('emuc data for', sess.peerjid, connection.emuc.members[sess.peerjid]); - sess.usedrip = true; // not-so-naive trickle ice + sess.dontsendlocalcandidate = true; // dont send local candidates sess.sendAnswer(); sess.accept(); diff --git a/libs/strophe/strophe.jingle.session.js b/libs/strophe/strophe.jingle.session.js index 3b8515b20..1c5868a5e 100644 --- a/libs/strophe/strophe.jingle.session.js +++ b/libs/strophe/strophe.jingle.session.js @@ -26,6 +26,7 @@ function JingleSession(me, sid, connection) { this.usetrickle = true; this.usepranswer = false; // early transport warmup -- mind you, this might fail. depends on webrtc issue 1718 this.usedrip = false; // dripping is sending trickle candidates not one-by-one + this.dontsendlocalcandidate = false; // dont send local candidates this.hadstuncandidate = false; this.hadturncandidate = false; @@ -60,7 +61,8 @@ JingleSession.prototype.initiate = function (peerjid, isInitiator) { this.connection.jingle.pc_constraints ); this.peerconnection.onicecandidate = function (event) { - self.sendIceCandidate(event.candidate); + if (!self.dontsendlocalcandidate) + self.sendIceCandidate(event.candidate); }; this.peerconnection.onaddstream = function (event) { self.remoteStreams.push(event.stream);