-
Notifications
You must be signed in to change notification settings - Fork 708
/
config.js
57 lines (48 loc) · 2.16 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// easyRTC Configuration File
var config = {};
// User Configurable Options
// *************************
config.httpPort = 8080; // The port which the http and socket server is on.
// External stun server (will be used if experimentalStunServerEnable is false)
// Several public stun servers are available to be used.
config.externalIceServers = [
{"url": "stun:stun.l.google.commmm:19302"}
];
// EXPERIMENTAL STUN SERVER
// It isn't good for production, but is nice for closed development.
// You "should" include two addresses which are reachable by all clients.
// Ports would need to be unblocked by firewalls.
config.experimentalStunServerEnable = false;
config.experimentalStunServerAddr0 = "192.168.1.100";
config.experimentalStunServerAddr1 = "192.168.1.101"; // "should" be a seperate from Addr0
config.experimentalStunServerPort0 = "3478";
config.experimentalStunServerPort1 = "3479";
// The namespace for the default application.
config.defaultApplicationName = "default";
// Check for updates
config.updateCheckEnable = true;
// **********************************
// End of user configurable settings.
// **********************************
// The following settings work alongside the easyRTC client API.
// DO NOT ALTER!
// *************************************************************
config.easyRtcVersion = "0.5.0";
config.cmdPacketType = "easyRTCcmd";
config.cmdMsgType = {
list: "list",
token: "token"
};
// Programatically Setting Some Settings
// *************************************
if (config.experimentalStunServerEnable)
config.iceServers = [
{"url": "stun:" + config.experimentalStunServerAddr0 + ":" + config.experimentalStunServerPort0},
{"url": "stun:" + config.experimentalStunServerAddr0 + ":" + config.experimentalStunServerPort1},
{"url": "stun:" + config.experimentalStunServerAddr1 + ":" + config.experimentalStunServerPort0},
{"url": "stun:" + config.experimentalStunServerAddr1 + ":" + config.experimentalStunServerPort1}
];
else
config.iceServers = config.externalIceServers;
// Allows the config file to be seen by a caller
module.exports = config;