simplewebrtc / SimpleWebRTC

Simplest WebRTC ever
Other
4.65k stars 1.19k forks source link

using simpleWebRTC locally, problems with STUN server configuration? #277

Open shlanga opened 9 years ago

shlanga commented 9 years ago

Hi all,

I've built a small simpleWebRTC application which connects three videos peers. It works perfectly when I use it online. Now I want it to work locally in a local area network without any connection to the internet and it is not working anymore.

I've successfully installed Node.js and the Signalmaster server locally on my windows machine.

When create a new instance of SimpleWebRTC I provide the new signal server url like so:

    var webrtc = new SimpleWebRTC({
        ...
        url: "http://localhost:8888/"
    });

After changing the the signal server url from

https://signaling.simplewebrtc.com:443/

to my local signal server url

http://localhost:8888/

the application still works. So I think the signal server is not the issue.

But I've noticed that the signal server and the application itself are trying to connect to the stun server

stun.l.google.com:19302 

which is of course not possible without internet connection. So I guess the issue that the whole thing is not working locally is coming from not connecting to the stun server.

I guess that in a local area network I actually do not need a stun server at all. Is that assumption right? So how would I configure SimpleWebRTC and the Signalmaster server to not use a stun server at all? Which lines of codes must be altered?

Thanks for your help in advance!

cremfert commented 8 years ago

In signalmaster, you have a dev_config.json, where the STUN server is configured. You can remove then STUN entry and try again. If it is not working (maybe because the STUN server is hardcoded), you have to overwrite the peerConnectionConfig in SimpleWebRTC constructor.

Hope that helps!

Oluwafemikorede commented 8 years ago

@shlanga I have been trying to install signalmaster on my server but the signalmaster kept creating the server at localhost:8888, am I missing something or have installed incorrectly

imrizwan89 commented 6 years ago

how to enable websocket run over https on aws ec2 instance? http://live.talkrecruit.com:8888/socket.io/ --working fine https://live.talkrecruit.com:8888/socket.io/ -- not working