A
A
Andrey Minisol2016-04-12 16:34:25
JavaScript
Andrey Minisol, 2016-04-12 16:34:25

How to deal with iceConnectionState: failed?

Good afternoon. I'm typing webrtc technology and ran into a problem that if users are in different networks, then the connection is not established, if in one then the connection goes.
I actually describe the structure:
1) a server on a node - for exchanging peers between users
2) client 1
3) client 2
they successfully exchange peers. the connection starts to be established, goes into the checking state, and then falls as failed
; the server itself is the following:

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

actually on RTCPeerConnection I cast such an event:
oniceconnectionstatechange
what am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
hbruser, 2016-04-12
@hbruser

take two dumps using Wireshark
, one on the first client
, the second on the second
, see how STUN and ICE packets go,
most likely something doesn’t reach somewhere

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question