2

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.

Havihavi
  • 652
  • 1
  • 9
  • 26

1 Answers1

1

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.

Philipp Hancke
  • 15,855
  • 2
  • 23
  • 31
  • Thanks! I am trying to rewrite the line variable, but a normal str.replace on line does not work. Would you happen to have any inside tips? =) `line = str_replace('a=candidate', 'candidate', line); ` – Havihavi Apr 16 '15 at 11:34
  • Hey , Havi ..i am also trying to implement the same thing which you mentioned above .....can you please guide me that how can i make signalling using XMPP with webrtc videoChat application.I am new to it. – sid Jul 29 '15 at 12:43
  • How can i make use of strophe.jingle in my android project – sid Jul 29 '15 at 12:45