signal & webrtc connections established

This commit is contained in:
David Zhao
2021-07-23 23:56:06 -07:00
parent 26981c1c8c
commit 0bd2679e94
8 changed files with 68 additions and 38 deletions
+5 -5
View File
@@ -9,9 +9,11 @@ class RTCConfiguration {
iceServersMap.add(element.toMap());
});
return {
// only supports unified plan
'sdpSemantics': 'unified-plan',
if (iceCandidatePoolSize != null)
"iceCandidatePoolSize": iceCandidatePoolSize,
if (iceServersMap.isNotEmpty) "iceServers": iceServersMap,
"iceServers": iceServersMap,
if (iceTransportPolicy != null) "iceTransportPolicy": iceTransportPolicy,
};
}
@@ -27,10 +29,8 @@ class RTCIceServer {
Map<String, dynamic> toMap() {
return {
"urls": urls,
if (username != null)
"username": username,
if (credential != null)
"credential": credential,
if (username != null) "username": username,
if (credential != null) "credential": credential,
};
}
}