Webrtc不生成TCP ICE,在Android上仅生成UDP

问题描述 投票:0回答:1

我们正在我们的应用程序中实现Webrtc。库版本:implementation 'org.webrtc:google-webrtc:1.0.30039'。在Android上,它仅生成UDP ICE候选对象,在IOS上,仅生成UDP和TCP,尽管lib版本是最新的,并且设置大致相同。因此,我们认为某些需要TURN的调用无法立即运行,而是仅在重新连接后才能正常运行,当webrtc库将其状态更改为Failed时,我们将重新发送已经包含ICE的报价。这是我对等连接的设置:

  PeerConnection.RTCConfiguration rtcConfig =
            new PeerConnection.RTCConfiguration(peerIceServers);
    rtcConfig.tcpCandidatePolicy = PeerConnection.TcpCandidatePolicy.ENABLED;
    rtcConfig.bundlePolicy = PeerConnection.BundlePolicy.MAXBUNDLE;
    rtcConfig.rtcpMuxPolicy = PeerConnection.RtcpMuxPolicy.REQUIRE;
    rtcConfig.continualGatheringPolicy = PeerConnection.ContinualGatheringPolicy.GATHER_CONTINUALLY;
    // Use ECDSA encryption.
    rtcConfig.keyType = PeerConnection.KeyType.ECDSA;

为了使Webrtc库也生成TCP ICE,我应该设置什么样的设置?

android webrtc turn rtcpeerconnection
1个回答
0
投票

问题已通过双重产生要约并发送第二个要约来解决。原来,第二个报价已经包含ICE,无需单独发送]

© www.soinside.com 2019 - 2024. All rights reserved.