flutter-webrtc / flutter-webrtc-server

A simple WebRTC signaling server for flutter-webrtc.
MIT License
756 stars 304 forks source link

setup turn server #33

Closed glennmichaelmejias closed 3 years ago

glennmichaelmejias commented 4 years ago

how to setup turn server? thanks

larrylisky commented 4 years ago

I followed this post.

cloudwebrtc commented 4 years ago

@glennmichaelmejias @larrylisky flutter-webrtc-server does not need to deploy turn server, because it has built-in turn server

https://github.com/cloudwebrtc/flutter-webrtc-server/blob/master/pkg/turn/turn.go#L39

larrylisky commented 4 years ago

@cloudwebrtc Thanks for pointing this out. But 'config.ini' is showing '127.0.0.1' for public_ip, and the 'flutter-webrtc-demo' code (signaling.dart) has the entire turn section commented out.
Furthermore, when I built flutter-webrtc-demo as-is, P2P call only works on LAN and would not work over different LAN, until I brought in coturn. How should I modify to config.ini and signaling.dart to work with the built-in turn server?

abheet-98 commented 4 years ago

@larrylisky could you explain me the method to test a p2p call from mobile app using this server? Thanks in advance !

larrylisky commented 4 years ago

@abheet-98 I documented what I did in this blog post.

cloudwebrtc commented 4 years ago

@larrylisky Awesome.

abheet-98 commented 4 years ago

@larrylisky Thank you so much for the blog post ! I'll definitely follow this but currently I want to first test the P2P call on the same LAN without using the coturn server so if you could help me to connect 2 phones on the same network to get connected to the P2P call that will be so kind of you. Thanks and Regards

larrylisky commented 4 years ago

Run flutter-webrtc-demo in your mobile device, and run flutter-webrtc-server on a local server or a server with a public IP address for signaling. The instruction on the github README.md is pretty straightforward. Where are you getting stuck?

abheet-98 commented 4 years ago

@larrylisky Actually the server started but now I don't know how to connect the 2 phones with each other. and the server starts and when I open it in the browser the logs are : 2020-05-28T20:35:29+05:30 INF Flutter WebRTC Server listening on: 0.0.0.0:8086 2020/05/28 20:35:41 http: TLS handshake error from 127.0.0.1:64510: remote error: tls: unknown certificate 2020/05/28 20:35:41 http: TLS handshake error from 127.0.0.1:64511: remote error: tls: unknown certificate

jason-shen commented 4 years ago

@larrylisky Actually the server started but now I don't know how to connect the 2 phones with each other. and the server starts and when I open it in the browser the logs are : �[90m2020-05-28T20:35:29+05:30�[0m �[32mINF�[0m Flutter WebRTC Server listening on: 0.0.0.0:8086 2020/05/28 20:35:41 http: TLS handshake error from 127.0.0.1:64510: remote error: tls: unknown certificate 2020/05/28 20:35:41 http: TLS handshake error from 127.0.0.1:64511: remote error: tls: unknown certificate

read your log buddy, that error comes from the certificate(self signed certs), use the browser hit your server ip, accept the unsafe cert, then run your app

abheet-98 commented 4 years ago

@jason-shen Yes the server starts and when I open the server on the browser on multiple tabs , I can see those many peers connected with each other and I can do video call to any of them from any tab. But when I tap the P2P call sample in the mobile app and then type the server ip, I get a blank screen and the server doesn't get updated with the new peer (i.e.,which is from the mobile app). If you could help me with this. I want to have a video call using the mobile devices. Thanks in advance !

likitha2303 commented 3 years ago

hi, am not able to run "make" command in visual studio code(am using windows) after cloning, it says command not found, pls giv me detailed procedure to run this server on windows. pls help me out

fawdlstty commented 3 years ago

flutter-webrtc-server does not need to deploy turn server, because it has built-in turn server

why README.md says:
This example can only be used for LAN testing. If you need to use it in a production environment, you need more testing and and deploy an available turn server.

cloudwebrtc commented 3 years ago

@fawdlstty In fact, the turn server is already supported. The new version is rewritten with go and uses pion/turn as the built-in turn server, so no additional deployment is required. I have updated the README.md.