From 5e51fbe617a929bb7bfe83a56a1f3511fb96ab1c Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sun, 7 Feb 2021 18:44:57 +0100 Subject: [PATCH] Attempt to fix call issue --- lib/ui/screens/call_screen.dart | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ui/screens/call_screen.dart b/lib/ui/screens/call_screen.dart index e59c480..df9ddae 100644 --- a/lib/ui/screens/call_screen.dart +++ b/lib/ui/screens/call_screen.dart @@ -237,13 +237,17 @@ class _CallScreenState extends SafeState { setState(() {}); // Open stream - final peerConnection = await createPeerConnection(_conf.pluginConfig, { + final peerConnection = await createPeerConnection( + _conf.pluginConfig..addAll({"sdpSemantics": "unified-plan"}), { "mandatory": {}, "optional": [], }); _peersConnections[userID()] = peerConnection; - await peerConnection.addStream(_localStream); + + for (final track in _localStream.getTracks()) { + await peerConnection.addTrack(track, _localStream); + } peerConnection.onAddStream = (s) => throw Exception("Got a new stream on main peer connection!");