From e5e335760ae24c904c6b901eef7f0c4840b5be0e Mon Sep 17 00:00:00 2001 From: simon <59780143+simon-twonary@users.noreply.github.com> Date: Mon, 15 Jun 2020 19:54:48 -0400 Subject: [PATCH] able to change iceServers --- lib/src/sip_ua_helper.dart | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/src/sip_ua_helper.dart b/lib/src/sip_ua_helper.dart index 2ac2f970..ff8414c2 100644 --- a/lib/src/sip_ua_helper.dart +++ b/lib/src/sip_ua_helper.dart @@ -272,19 +272,7 @@ class SIPUAHelper extends EventManager { var _defaultOptions = { 'eventHandlers': eventHandlers, - 'pcConfig': { - 'iceServers': [ - {'url': 'stun:stun.l.google.com:19302'}, - /* - * turn server configuration example. - { - 'url': 'turn:123.45.67.89:3478', - 'username': 'change_to_real_user', - 'credential': 'change_to_real_secret' - }, - */ - ] - }, + 'pcConfig': {'iceServers': _uaSettings.iceServers}, 'mediaConstraints': { "audio": true, "video": voiceonly @@ -468,4 +456,14 @@ class UaSettings { String authorizationUser; String password; String displayName; + + List> iceServers = [ + {'url': 'stun:stun.l.google.com:19302'}, +// turn server configuration example. +// { +// 'url': 'turn:123.45.67.89:3478', +// 'username': 'change_to_real_user', +// 'credential': 'change_to_real_secret' +// }, + ]; }