Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing null to RTCPeerConnection speeds up ICE Gathering on LAN connections #70

Open
jfeng-dev opened this issue Feb 27, 2019 · 0 comments

Comments

@jfeng-dev
Copy link

Stream.prototype.createPeerConnection = function() {
let peerConnectionConf = {
"iceServers": [{
"urls": ["stun:" + this.hostname + ":3478"]
}]
};
this.peerConnection = new window.RTCPeerConnection(peerConnectionConf);

this.peerConnection = new window.RTCPeerConnection(null);

I think this is a reference to the uv4l STUN server, but the server is not enabled in the uvc conf. I couldn't find any other references to a STUN server being active on the Pi. Also, I think a STUN server isn't needed if the only connection is through the local wireless network.

https://github.com/TurtleRover/turtleos/blob/ffb6273cf825e97d05eb48fbd756a17aa0d1903d/pi-gen-overlay/stage3/01-sys-tweaks/files/etc/uv4l/uv4l-uvc.conf#L108-L112

(Apologies, not sure how to have this code block render as well)

In our experience, passing in null instead of the STUN server address results in much faster ICE gathering and more reliable connection starting for the video stream. Without this change, we would have long waits for ICE gathering to complete and often the video stream would not connect at all.

I haven't tested with the uv4l STUN server enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant