Skip to content

Commit e5e3357

Browse files
authored
able to change iceServers
1 parent 2ec248f commit e5e3357

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

lib/src/sip_ua_helper.dart

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -272,19 +272,7 @@ class SIPUAHelper extends EventManager {
272272

273273
var _defaultOptions = {
274274
'eventHandlers': eventHandlers,
275-
'pcConfig': {
276-
'iceServers': [
277-
{'url': 'stun:stun.l.google.com:19302'},
278-
/*
279-
* turn server configuration example.
280-
{
281-
'url': 'turn:123.45.67.89:3478',
282-
'username': 'change_to_real_user',
283-
'credential': 'change_to_real_secret'
284-
},
285-
*/
286-
]
287-
},
275+
'pcConfig': {'iceServers': _uaSettings.iceServers},
288276
'mediaConstraints': {
289277
"audio": true,
290278
"video": voiceonly
@@ -468,4 +456,14 @@ class UaSettings {
468456
String authorizationUser;
469457
String password;
470458
String displayName;
459+
460+
List<Map<String, String>> iceServers = [
461+
{'url': 'stun:stun.l.google.com:19302'},
462+
// turn server configuration example.
463+
// {
464+
// 'url': 'turn:123.45.67.89:3478',
465+
// 'username': 'change_to_real_user',
466+
// 'credential': 'change_to_real_secret'
467+
// },
468+
];
471469
}

0 commit comments

Comments
 (0)