checkpoint - participant & tracks initial stubs

This commit is contained in:
David Zhao
2021-07-20 23:08:37 -07:00
parent 10ab3cdcac
commit 0a682f7831
12 changed files with 306 additions and 20 deletions
+39
View File
@@ -0,0 +1,39 @@
class RTCConfiguration {
int? iceCandidatePoolSize;
List<RTCIceServer>? iceServers;
String? iceTransportPolicy;
Map<String, dynamic> toMap() {
var iceServersMap = [];
iceServers?.forEach((element) {
iceServersMap.add(element.toMap());
});
return {
if (iceCandidatePoolSize != null)
"iceCandidatePoolSize": iceCandidatePoolSize,
if (iceServersMap.isNotEmpty) "iceServers": iceServersMap,
if (iceTransportPolicy != null) "iceTransportPolicy": iceTransportPolicy,
};
}
}
class RTCIceServer {
List<String> urls;
String? username;
String? credential;
RTCIceServer({required this.urls, this.username, this.credential});
Map<String, dynamic> toMap() {
return {
"urls": urls,
if (username != null)
"username": username,
if (credential != null)
"credential": credential,
};
}
}
const RTCIceTransportPolicyAll = 'all';
const RTCIceTransportPolicyRelay = 'relay';