set candidate gathering to continually. fixes #3719

This should be good enough to survive some network switches where both networks are online at the same time to allow for some handover
(for example when enabling wifi the 3G connection will usually (probably depends on OS) live on for a moment

(cherry picked from commit 1c625e55a0765e88ecbe21207c1a68da55467934)
This commit is contained in:
Daniel Gultsch 2020-05-25 11:11:20 +02:00 committed by Christian Schneppe
parent 4ed38e7edd
commit f0d74550fb

View file

@ -272,6 +272,7 @@ public class WebRTCWrapper {
final PeerConnection.RTCConfiguration rtcConfig = new PeerConnection.RTCConfiguration(iceServers);
rtcConfig.tcpCandidatePolicy = PeerConnection.TcpCandidatePolicy.DISABLED; //XEP-0176 doesn't support tcp
rtcConfig.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
final PeerConnection peerConnection = peerConnectionFactory.createPeerConnection(rtcConfig, peerConnectionObserver);
if (peerConnection == null) {
throw new InitializationException("Unable to create PeerConnection");