How to configure iceServer in JS?

100 views
Skip to first unread message

Al

unread,
Jun 19, 2022, 6:22:21 PM6/19/22
to discuss-webrtc
Hello!
Im working with OWT framework (based on WebRTC) and its JS client. 
I need to configure iceServer to work from NAT.

I try this - 

const rtcConfiguration = {

    iceServers: [

      {

        urls: ["stun:stun.l.google.com:19302"],

      },

    ],

  };


  const signaling = new Owt.Conference.SioSignaling();

  var configuration = (Owt.Conference.ConferenceClientConfiguration =

    rtcConfiguration);

  conference = new Owt.Conference.ConferenceClient(

    {

      audioEncodings: true,

      videoEncodings: [

        {

          codec: {

            name: "h264",

          },

        },

        {

          codec: {

            name: "vp9",

          },

        },

        {

          codec: {

            name: "vp8",

          },

        },

      ],

      configuration,

    },

    signaling

  );


But it not working. Even if I remove rtcConfiguration  - I receive same error - 

subscribe failed
Error: Ice procedure failed.

Unhandled Promise Rejection: Error: Ice procedure failed.

ICE connection state changed to failed


Same code on local network works fine and same on IOS/Android works fine with that STUN server. So I suppose that I configure wrong way.

Reply all
Reply to author
Forward
0 new messages