Navigation Menu

Skip to content

Commit

Permalink
replace directed presence with jingle call initiation
Browse files Browse the repository at this point in the history
  • Loading branch information
bokner committed Sep 11, 2013
1 parent 7b4e457 commit e13b010
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions priv/www/geofilter.js
Expand Up @@ -372,7 +372,6 @@ function onNeighborIn(pres) {
// Check if that's an incoming call initiation
if (Strophe.getDomainFromJid(from) == DOMAIN) {
console.log("You got a call from " + from);
connection.jingle.initiate(from, connection.jid);
}
if (Strophe.getDomainFromJid(from) != CONFERENCEDOMAIN) { // only interested in MUC presence
return true;
Expand Down Expand Up @@ -502,7 +501,7 @@ function onIceConnectionStateChanged(event, sid, sess) {
console.log('sig state for', sid, sess.peerconnection.signalingState);
if (sess.peerconnection.signalingState == 'closed' && sess.peerconnection.iceConnectionState == 'closed') {
turn_remote('off');
} else if (isess.peerconnection.signalingState == 'stable' && sess.peerconnection.iceConnectionState == 'connected') {
} else if (sess.peerconnection.signalingState == 'stable' && sess.peerconnection.iceConnectionState == 'connected') {
turn_remote('on');
}
}
Expand All @@ -513,7 +512,9 @@ function noStunCandidates(event) {

// Videocall
function videocall(calleeId) {
connection.send($pres({'from': connection.jid, 'to': calleeId + "@" + DOMAIN + "/" + neighbors[calleeId]}));
// connection.send($pres({'from': connection.jid, 'to': from}));

connection.jingle.initiate(calleeId + "@" + DOMAIN + "/" + neighbors[calleeId], connection.jid);
}

function turn_remote(status) {
Expand Down

0 comments on commit e13b010

Please sign in to comment.