<div dir="ltr"><span style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">Hello!</span><div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">(Also posted on gstreamer-java maliling list)</div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><br></div><span style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">I have set up a one-way WebRTC stream from a Java server (running gstreamer) to a browser client. It all worked fine when streaming locally to clients, but it doesnt work when the browser client is in a different network behind a NAT.</span><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><br></div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">I thought that adding a TURN server to the client's RTCPeerConnection object would solve it, but it didnt. The logs from gstreamer show that there was a connectivity issue between the peers, without any further details:<br></div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><br></div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">"webrtcbin gstwebrtcbin.c:1399:_update_peer_connection_state_task:<gstreamer-webrtc-server> Peer connection state change from connecting(1) to failed(4)"</div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><br></div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">I have a couple of questions that might help me with troubleshooting:</div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><ol><li>Is adding a TURN server really the only thing that needs to be done regarding enabling streaming through NAT holes? Is there anything else to be done related to WebRTCBin config in order to make it work?</li><li>It seems that WebRTCBin tries the peer connection on the first candidate that arrives, and stops after the first failure. Shouldnt it retry with every possible remote candidate?</li><li>Is there anywhere else I can get more information about the connectivity issue that is happening other than gstreamer/browser client logs?</li></ol><div>Relevant information about my setup:</div></div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><ul><li>The TURN server I have been using is a public one:  turn:<a href="http://numb.viagenie.ca/" target="_blank" rel="nofollow" style="text-decoration-line:none;color:rgb(26,115,232)">numb.viagenie.ca</a>, as listed <a href="https://gist.github.com/sagivo/3a4b2f2c7ac6e1b5267c2f1f59ac6c6b" target="_blank" rel="nofollow" style="text-decoration-line:none;color:rgb(26,115,232)">here</a>. It was tested <a href="https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice" target="_blank" rel="nofollow" style="text-decoration-line:none;color:rgb(26,115,232)">here</a> and returns relay candidates as expected.</li><li>The streaming server is also running in a private network but exposed via 8080 port-forwarding to the internet.</li><li><a href="https://github.com/gpr-indevelopment/gote-game-server-2" target="_blank" rel="nofollow" style="text-decoration-line:none;color:rgb(26,115,232)">Source code</a> of it all, if anyone is interested. It is a java app currently using bindings for Java.</li></ul><div>Any help is appreciated. Thank you in advance.</div><div><br></div><div>Best regards,</div><div><br></div><div>Gabriel Robaina</div></div></div></div>