pchab / ProjectRTC

WebRTC Live Streaming on nodeJS (+ android client !)
Other
1.04k stars 477 forks source link

ICE failed with 3G/4G connections #35

Open diego77777 opened 8 years ago

diego77777 commented 8 years ago

Hello, I'm trying to connect thorough two different mobile(3g/4g) connections, one for the server and one different for the client, but I always get a ICE failed error in the js console. I use firefox (can't use chrome because now unsafe connections are not supported).

Is it right to try with a TURN server?

is this configuration in public/javascripts/rtcClient.js correct?


var localId,
    config = {
      peerConnectionConfig: {
        iceServers: [

{
            "username":"myusername",
            "url": "turn:turn1.xirsys.com:443?transport=tcp",
            "credential":"secret_number,eg: 287ae254-9380-4f81-af88-e1cc9ed27eb0"
          },

          {
            "username":"myusername",
            "url": "turn:turn1.xirsys.com:443?transport=udp",
            "credential":"secret_number,eg: 287ae254-9380-4f81-af88-e1cc9ed27eb0"
          }
] },

peerConnectionConstraints: {
        optional: [{
          "DtlsSrtpKeyAgreement": true,
        }]
      }
    },
    peerDatabase = {},
    localStream,
    remoteVideoContainer = document.getElementById('remoteVideosContainer'),
    socket = io();

  socket.on('message', handleMessage);
  socket.on('id', function(id) {
    localId = id;
  });

thanks in advance!

alexruskovski commented 7 years ago

@diego77777 Hello, did you find any solution.. im struggling with this for a while.