|
|
5#

楼主 |
发表于 2016-7-16 00:17:55
|
只看该作者
How to change stun server?
ScrewChineseCommunist commented on Jun 11, 2014
I search "stun" and find google stun server and modified simplewebrtc.bundle.js like this:
peerConnectionConfig: {
// iceServers: [{"url": "stun:stun.l.google.com:19302"}]
iceServers: [{"url": "stun:128.199.x.x:3478"}]
},
and configured rfc5766-turn-server. But the browser console still showed stun:stun.l.google.com:19302
I checked the page source link. I really had changed to my stun server. I'm totally confused.

jsgispert commented on Jun 11, 2014
Hi zhiyin-im! I have exactly the same problem. I'm not a JS expert and have spent the last 24 hours trying to find out what I was doing wrong. Now your message gives me a hint that it might not be my fault after all. var stun = { 'url': 'stun:myserver.com:3478' }; var turn = { 'url': 'turn:myserver.com:3478', 'username': 'mysuser@myrealm', 'credential': 'mypassword' }; var webrtcConn = new SimpleWebRTC({ ... peerConnectionConfig: { 'iceServers': [stun, turn] } });When I execute and debug, peerConnectionConfig.iceServers contains the default Chrome STUN server "stun:stun.l.google.com:19302" and no TURN servers.

fippo commented on Jun 11, 2014
the default signaling server on signaling.simplewebrtc.com:8888 might override your STUN/TURN config. There still seems to be a bug though...

fippo commented on Jun 11, 2014

jsgispert commented on Jun 12, 2014
You hit the nail on the head, fippo. After installing and configuring my private signalling server I can see both stun and turn on the console. Thanks a lot!
fippo closed this on Jul 21, 2014

vanney9 commented on Oct 24, 2015
Hi jsgispert,
Have you solved this problem? I try to comment the these lines:
this.webrtc.on('*', function () {
self.emit.apply(self, arguments);
});
and change my stun setting, but i still get the stun:stun.l.google.com:19302 in my console.
Can you help me? thx.

joellusky commented on Jan 24

vanney9 commented on Jan 24

AlphaHinex commented on Jan 26
@vanney9 @joellusky
simplewebrtc.js#L135 has changed, you should comment out the following contents: connection.on('stunservers', function (args) { // resets/overrides the config self.webrtc.config.peerConnectionConfig.iceServers = args; self.emit('stunservers', args);});

Oluwafemikorede commented on Feb 1
@AlphaHinex I am using xirys stun/turn servers, but my app is not working when on separate networks, How do I know which turn server my simplewebrtc is actually using, I mean where do I place my console.log

AlphaHinex commented on Feb 4
@Oluwafemikorede Maybe you can check webrtc.config.peerConnectionConfig in console.

computurus commented on Mar 4
I am also struggling with this problem. Can't force the library to use my STUN server instead of the public one. Is there any way to solve this?
|
|