2022-03-10 18:39:57 +00:00
|
|
|
|
2020-04-20 11:43:17 +00:00
|
|
|
|
|
|
|
/// Call configuration
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
class CallConfig {
|
2022-03-10 18:39:57 +00:00
|
|
|
final List<String> iceServers;
|
2020-04-20 11:43:17 +00:00
|
|
|
|
|
|
|
const CallConfig({
|
2022-03-10 18:39:57 +00:00
|
|
|
required this.iceServers,
|
2020-04-20 11:43:17 +00:00
|
|
|
}) : assert(iceServers != null);
|
2020-04-20 15:24:42 +00:00
|
|
|
|
|
|
|
/// Turn this call configuration into the right for the WebRTC plugin
|
|
|
|
Map<String, dynamic> get pluginConfig => {
|
2021-02-12 17:20:28 +00:00
|
|
|
"iceServers": iceServers.map((f) => {"url": f}).toList(),
|
|
|
|
"sdpSemantics": "unified-plan",
|
2020-04-20 15:24:42 +00:00
|
|
|
};
|
2020-04-20 11:43:17 +00:00
|
|
|
}
|