owt-client-javascript icon indicating copy to clipboard operation
owt-client-javascript copied to clipboard

How to add iceServer config?

Open Myshny opened this issue 3 years ago • 3 comments

Hello

It missed in sample conference - how to add iceServer config to Owt.Conference.ConferenceClient?

I try this but it is not working:

const rtcConfiguration = {
      iceServers: [{
    urls: '"stun:stun.l.google.com:19302"',
  }, {
    credential: 'password',
    username: 'username',
  }],
};

    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);

Myshny avatar May 21 '22 14:05 Myshny

Could somebody help? I stuck with it.

Error: Ice procedure failed. Unhandled Promise Rejection: Error: Ice procedure failed.

Myshny avatar Jun 14 '22 09:06 Myshny

Please create a ConferenceClient with your own configuration.

jianjunz avatar Jun 15 '22 07:06 jianjunz

jianjunz - Thank you for reply!

What do you mean? In my code above I assume that I created new OWT configuration?

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);

This block of code?

Maybe you can share some examples? In fact im I don't know how to do this.. In IOS/Android all works fine, I add STUN servers and all is ok but in web js it's not clear for me(

Myshny avatar Jun 15 '22 10:06 Myshny