owt-client-javascript
owt-client-javascript copied to clipboard
How to add iceServer config?
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);
Could somebody help? I stuck with it.
Error: Ice procedure failed. Unhandled Promise Rejection: Error: Ice procedure failed.
Please create a ConferenceClient with your own configuration.
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(