This commit is contained in:
Philipp Hancke 2014-10-16 10:59:51 +00:00
commit 4ba9a41e85
2 changed files with 4 additions and 2 deletions

2
app.js
View File

@ -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();

View File

@ -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);