From a3e5b1a70b4ab22c619c766119b5dc2e7bf06850 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 12 Feb 2021 18:20:28 +0100 Subject: [PATCH] Rationalize config --- lib/models/call_config.dart | 3 ++- lib/ui/screens/call_screen.dart | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/models/call_config.dart b/lib/models/call_config.dart index 000fd04..788d1df 100644 --- a/lib/models/call_config.dart +++ b/lib/models/call_config.dart @@ -13,6 +13,7 @@ class CallConfig { /// Turn this call configuration into the right for the WebRTC plugin Map get pluginConfig => { - "iceServers": iceServers.map((f) => {"url": f}).toList() + "iceServers": iceServers.map((f) => {"url": f}).toList(), + "sdpSemantics": "unified-plan", }; } diff --git a/lib/ui/screens/call_screen.dart b/lib/ui/screens/call_screen.dart index df9ddae..7177ad9 100644 --- a/lib/ui/screens/call_screen.dart +++ b/lib/ui/screens/call_screen.dart @@ -237,8 +237,7 @@ class _CallScreenState extends SafeState { setState(() {}); // Open stream - final peerConnection = await createPeerConnection( - _conf.pluginConfig..addAll({"sdpSemantics": "unified-plan"}), { + final peerConnection = await createPeerConnection(_conf.pluginConfig, { "mandatory": {}, "optional": [], });