2020-04-20 11:43:17 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
/// Call configuration
|
|
|
|
///
|
|
|
|
/// @author Pierre Hubert
|
|
|
|
|
|
|
|
class CallConfig {
|
2022-03-10 18:02:06 +00:00
|
|
|
final List<String>/*!*/ iceServers;
|
2020-04-20 11:43:17 +00:00
|
|
|
|
|
|
|
const CallConfig({
|
|
|
|
@required this.iceServers,
|
|
|
|
}) : 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
|
|
|
}
|