diff options
Diffstat (limited to 'media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp')
-rw-r--r-- | media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp index 0d388a8f49..0306b57904 100644 --- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp +++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp @@ -457,7 +457,8 @@ PeerConnectionMedia::EnsureTransport_s(size_t aLevel, size_t aComponentCount) } void -PeerConnectionMedia::ActivateOrRemoveTransports(const JsepSession& aSession) +PeerConnectionMedia::ActivateOrRemoveTransports(const JsepSession& aSession, + const bool forceIceTcp) { auto transports = aSession.GetTransports(); for (size_t i = 0; i < transports.size(); ++i) { @@ -480,6 +481,14 @@ PeerConnectionMedia::ActivateOrRemoveTransports(const JsepSession& aSession) RemoveTransportFlow(i, true); } + if (forceIceTcp) { + candidates.erase(std::remove_if(candidates.begin(), + candidates.end(), + [](const std::string & s) { + return s.find(" UDP "); }), + candidates.end()); + } + RUN_ON_THREAD( GetSTSThread(), WrapRunnable(RefPtr<PeerConnectionMedia>(this), |