using ice candidates with jingle

706 views Asked by At

Im trying to do my first xmpp client with webrtc videochat using strophe with. strophe.jingle

There is very little documentation for it, so ive ended up pillaging example code to try and get it working.

I am successfully sending the videochat invite over to the other user via XMPP and the app is trying to setup the chat. However its giving me errors about ICE Candidates like this (it throws 6-8):

addIceCandidate failed SyntaxError: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': The ICE candidate could not be added. a=candidate 2565634929 1 udp 41819903 66.228.45.110 64264 typ relay raddr 79.260.27.217 rport 58182 generation 0

Ive done enough searching to realize that i need to set ice server urls or something. But i am at a loss as to how.

Ive tried:

var ice_config = {iceServers: [{url: 'stun:stun.l.google.com:19302'}]};
    connection.jingle.ice_config = ice_config;

I am sending the invite like this

connection.send($pres({to:peer}));
connection.jingle.initiate(peer, connection.jid);

At this point i feel like its all over my head and its really hard to read up on it without any real documentation. If anyone can throw me a bone, id be really really happy.

1

There are 1 answers

3
Philipp Hancke On

try removing the 'a=' from the line returned by https://github.com/ESTOS/strophe.jingle/blob/master/strophe.jingle.session.js#L542

chrome changed the syntax of this at some point and seems to no longer accept the old syntax.

Update: turned out to be a bug. Check the updated version on github and file an issue there if it is still not working.