Force TCP for WebRTC PeerConnections

Can I force a TCP tunnel (TLS) connection to WebRTC?

We are developing a WebRTC application for our business, but we are having some serious problems with UDP inbound streams caused by our internal network. We already use the TURN server, and we get a bunch of ICE candidates (even for UDP relay).

The fact is that, as I said above, our incoming UDP traffic does not work here in a reliable way (stuttering, very poor image quality, very low frame rate per second). This is enough to give the Browser the impression that WebRTC can use it for it PeerConnection (s), but the actual result is very poor in UDP.

If I block all outgoing and incoming UDP streams, I can see (in Wireshark) that WebRTC is returning to TCP traffic using our queue server.

Thanks to TCP connections, we get very good results (with a high frame rate and very good image quality).

I have tried several times to force TCP:

  • I deleted the UDP part in the line m = video

    m = TLS / RTP / SAVPF video 100 116 117 96

  • I excluded every UDP candidate from the candidate list

In each case, I could not even establish a connection.

Is there anything I can do to force TCP into WebRTC, or are we really completely browser dependent?

+4
source share
2 answers

peerconnection TURN/TCP iceTransports . . http://webrtc.imtqy.com/samples/src/content/peerconnection/trickle-ice/ , , UDP.

ICE-TCP . SFU/MCU/Gateway.

+3

TCP- , ICE-TCP , RFC-5766 TCP- TURN. TCP TURN, , TURN TCP UDP, TCP-UDP. , , Relay-Relay, TCP- TURN. TLS, , UDP TCP TURN , TLS.

+2

Source: https://habr.com/ru/post/1626355/


All Articles