Selaa lähdekoodia

feat(config): reorganize and thoroughly document config.js

- Document each option.
- Group options semantically.
- Remove no longer existing options.
- Add some missing options.
- Fix punctuation here and there.

NOTE: This is a first step towards a full configuration overhaul, once it
materializes each of the "semantic sections" will be a JS object.
master
Saúl Ibarra Corretgé 8 vuotta sitten
vanhempi
commit
19d9b3f023
1 muutettua tiedostoa jossa 214 lisäystä ja 72 poistoa
  1. 214
    72
      config.js

+ 214
- 72
config.js Näytä tiedosto

1
-/* jshint maxlen:false */
2
-
3
 var config = { // eslint-disable-line no-unused-vars
1
 var config = { // eslint-disable-line no-unused-vars
4
-//    configLocation: './config.json', // see ./modules/HttpConfigFetch.js
2
+    // Configuration
3
+    //
4
+
5
+    // Alternative location for the configuration.
6
+    //configLocation: './config.json',
7
+
8
+    // Custom function which given the URL path should return a room name.
9
+    //getroomnode: function (path) { return 'someprefixpossiblybasedonpath'; },
10
+
11
+
12
+    // Connection
13
+    //
14
+
5
     hosts: {
15
     hosts: {
16
+        // XMPP domain.
6
         domain: 'jitsi-meet.example.com',
17
         domain: 'jitsi-meet.example.com',
18
+
19
+        // XMPP MUC domain. FIXME: use XEP-0030 to discover it.
20
+        muc: 'conference.jitsi-meet.example.com',
21
+
22
+        // When using authentication, domain for guest users.
7
         //anonymousdomain: 'guest.example.com',
23
         //anonymousdomain: 'guest.example.com',
8
-        //authdomain: 'jitsi-meet.example.com',  // defaults to <domain>
9
-        muc: 'conference.jitsi-meet.example.com', // FIXME: use XEP-0030
24
+
25
+        // Domain for authenticated users. Defaults to <domain>.
26
+        //authdomain: 'jitsi-meet.example.com',
27
+
28
+        // Jirecon recording component domain.
10
         //jirecon: 'jirecon.jitsi-meet.example.com',
29
         //jirecon: 'jirecon.jitsi-meet.example.com',
30
+
31
+        // Call control component (Jigasi).
11
         //call_control: 'callcontrol.jitsi-meet.example.com',
32
         //call_control: 'callcontrol.jitsi-meet.example.com',
12
-        //focus: 'focus.jitsi-meet.example.com', // defaults to 'focus.jitsi-meet.example.com'
33
+
34
+        // Focus component domain. Defaults to focus.<domain>.
35
+        //focus: 'focus.jitsi-meet.example.com',
13
     },
36
     },
37
+
38
+    // BOSH URL. FIXME: use XEP-0156 to discover it.
39
+    bosh: '//jitsi-meet.example.com/http-bind',
40
+
41
+    // The name of client node advertised in XEP-0115 'c' stanza
42
+    clientNode: 'http://jitsi.org/jitsimeet',
43
+
44
+    // The real JID of focus participant - can be overridden here
45
+    //focusUserJid: 'focus@auth.jitsi-meet.example.com',
46
+
47
+
48
+    // Testing / experimental features.
49
+    //
50
+
14
     testing: {
51
     testing: {
15
-        /**
16
-         * Enables experimental simulcast support on Firefox.
17
-         */
52
+        // Enables experimental simulcast support on Firefox.
18
         enableFirefoxSimulcast: false,
53
         enableFirefoxSimulcast: false,
19
-        /**
20
-         * P2P test mode disables automatic switching to P2P when there are 2
21
-         * participants in the conference.
22
-         */
54
+        // P2P test mode disables automatic switching to P2P when there are 2
55
+        // participants in the conference.
23
         p2pTestMode: false,
56
         p2pTestMode: false,
24
     },
57
     },
25
-//  getroomnode: function (path) { return 'someprefixpossiblybasedonpath'; },
26
-//  useStunTurn: true, // use XEP-0215 to fetch STUN and TURN server
27
-//  useIPv6: true, // ipv6 support. use at your own risk
28
-    useNicks: false,
29
-    bosh: '//jitsi-meet.example.com/http-bind', // FIXME: use xep-0156 for that
30
-    clientNode: 'http://jitsi.org/jitsimeet', // The name of client node advertised in XEP-0115 'c' stanza
31
-    //focusUserJid: 'focus@auth.jitsi-meet.example.com', // The real JID of focus participant - can be overridden here
32
-    //defaultSipNumber: '', // Default SIP number
33
-    /**
34
-     * Disables desktop sharing functionality.
35
-     */
36
-    disableDesktopSharing: false,
58
+
59
+    // Disables ICE/UDP by filtering out local and remote UDP candidates in
60
+    // signalling.
61
+    //webrtcIceUdpDisable: false,
62
+
63
+    // Disables ICE/TCP by filtering out local and remote TCP candidates in
64
+    // signalling.
65
+    //webrtcIceTcpDisable: false,
66
+
67
+
68
+    // Media
69
+    //
70
+
71
+    // Audio
72
+
73
+    // Disable measuring of audio levels.
74
+    //disableAudioLevels: false,
75
+
76
+    // Start the conference in audio only mode (no video is being received nor
77
+    // sent).
78
+    //startAudioOnly: false,
79
+
80
+    // Every participant after the Nth will start audio muted.
81
+    //startAudioMuted: 10,
82
+
83
+    // Start calls with audio muted. Unlike the option above, this one is only
84
+    // applied locally. FIXME: having these 2 options is confusing.
85
+    //startWithAudioMuted: false,
86
+
87
+    // Video
88
+
89
+    // Sets the preferred resolution (height) for local video. Defaults to 720.
90
+    //resolution: 720,
91
+
92
+    // Enable / disable simulcast support.
93
+    //disableSimulcast: false,
94
+
95
+    // Suspend sending video if bandwidth estimation is too low. This may cause
96
+    // problems with audio playback. Disabled until these are fixed.
97
+    disableSuspendVideo: true,
98
+
99
+    // Every participant after the Nth will start video muted.
100
+    //startVideoMuted: 10,
101
+
102
+    // Start calls with video muted. Unlike the option above, this one is only
103
+    // applied locally. FIXME: having these 2 options is confusing.
104
+    //startWithVideoMuted: false,
105
+
106
+    // If set to true, prefer to use the H.264 video codec (if supported).
107
+    // Note that it's not recommended to do this because simulcast is not
108
+    // supported when  using H.264. For 1-to-1 calls this setting is enabled by
109
+    // default and can be toggled in the p2p section.
110
+    //preferH264: true,
111
+
112
+    // Desktop sharing
113
+
114
+    // Enable / disable desktop sharing
115
+    //disableDesktopSharing: false,
116
+
37
     // The ID of the jidesha extension for Chrome.
117
     // The ID of the jidesha extension for Chrome.
38
     desktopSharingChromeExtId: null,
118
     desktopSharingChromeExtId: null,
119
+
39
     // Whether desktop sharing should be disabled on Chrome.
120
     // Whether desktop sharing should be disabled on Chrome.
40
     desktopSharingChromeDisabled: true,
121
     desktopSharingChromeDisabled: true,
122
+
41
     // The media sources to use when using screen sharing with the Chrome
123
     // The media sources to use when using screen sharing with the Chrome
42
     // extension.
124
     // extension.
43
     desktopSharingChromeSources: ['screen', 'window', 'tab'],
125
     desktopSharingChromeSources: ['screen', 'window', 'tab'],
126
+
44
     // Required version of Chrome extension
127
     // Required version of Chrome extension
45
     desktopSharingChromeMinExtVersion: '0.1',
128
     desktopSharingChromeMinExtVersion: '0.1',
46
 
129
 
47
     // The ID of the jidesha extension for Firefox. If null, we assume that no
130
     // The ID of the jidesha extension for Firefox. If null, we assume that no
48
     // extension is required.
131
     // extension is required.
49
     desktopSharingFirefoxExtId: null,
132
     desktopSharingFirefoxExtId: null,
133
+
50
     // Whether desktop sharing should be disabled on Firefox.
134
     // Whether desktop sharing should be disabled on Firefox.
51
     desktopSharingFirefoxDisabled: false,
135
     desktopSharingFirefoxDisabled: false,
136
+
52
     // The maximum version of Firefox which requires a jidesha extension.
137
     // The maximum version of Firefox which requires a jidesha extension.
53
     // Example: if set to 41, we will require the extension for Firefox versions
138
     // Example: if set to 41, we will require the extension for Firefox versions
54
     // up to and including 41. On Firefox 42 and higher, we will run without the
139
     // up to and including 41. On Firefox 42 and higher, we will run without the
55
     // extension.
140
     // extension.
56
     // If set to -1, an extension will be required for all versions of Firefox.
141
     // If set to -1, an extension will be required for all versions of Firefox.
57
     desktopSharingFirefoxMaxVersionExtRequired: 51,
142
     desktopSharingFirefoxMaxVersionExtRequired: 51,
143
+
58
     // The URL to the Firefox extension for desktop sharing.
144
     // The URL to the Firefox extension for desktop sharing.
59
     desktopSharingFirefoxExtensionURL: null,
145
     desktopSharingFirefoxExtensionURL: null,
60
 
146
 
61
-    // Disables ICE/UDP by filtering out local and remote UDP candidates in signalling.
62
-    webrtcIceUdpDisable: false,
63
-    // Disables ICE/TCP by filtering out local and remote TCP candidates in signalling.
64
-    webrtcIceTcpDisable: false,
147
+    // Try to start calls with screen-sharing instead of camera video.
148
+    //startScreenSharing: false,
65
 
149
 
66
-    openSctp: true, // Toggle to enable/disable SCTP channels
150
+    // Recording
67
 
151
 
68
-    // Disable hiding of remote thumbnails when in a 1-on-1 conference call.
69
-    disable1On1Mode: false,
70
-    disableStats: false,
71
-    disableAudioLevels: false,
72
-    channelLastN: -1, // The default value of the channel attribute last-n.
73
-    enableRecording: false,
152
+    // Whether to enable recording or not.
153
+    //enableRecording: false,
154
+
155
+    // Type for recording: one of jibri or jirecon.
156
+    //recordingType: 'jibri',
157
+
158
+    // Misc
159
+
160
+    // Default value for the channel "last N" attribute. -1 for unlimited.
161
+    channelLastN: -1,
162
+
163
+    // Disables or enables RTX (RFC 4588) (defaults to false).
164
+    //disableRtx: false,
165
+
166
+    // Use XEP-0215 to fetch STUN and TURN servers.
167
+    //useStunTurn: true,
168
+
169
+    // Enable IPv6 support.
170
+    //useIPv6: true,
171
+
172
+    // Enables / disables a data communication channel with the Videobridge.
173
+    // Values can be 'datachannel', 'websocket', true (treat it as
174
+    // 'datachannel'), undefined (treat it as 'datachannel') and false (don't
175
+    // open any channel).
176
+    //openBridgeChannel: true,
177
+
178
+
179
+    // UI
180
+    //
181
+
182
+    // Use display name as XMPP nickname.
183
+    //useNicks: false,
184
+
185
+    // Require users to always specify a display name.
186
+    //requireDisplayName: true,
187
+
188
+    // Whether to use a welcome page or not. In case it's false a random room
189
+    // will be joined when no room is specified.
74
     enableWelcomePage: true,
190
     enableWelcomePage: true,
75
-    //enableClosePage: false, // enabling the close page will ignore the welcome
76
-                              // page redirection when call is hangup
77
-    disableSimulcast: false,
78
-//    requireDisplayName: true, // Forces the participants that doesn't have display name to enter it when they enter the room.
79
-    startAudioOnly: false, // Will start the conference in the audio only mode (no video is being received nor sent)
80
-    startScreenSharing: false, // Will try to start with screensharing instead of camera
81
-//    startAudioMuted: 10, // every participant after the Nth will start audio muted
82
-//    startVideoMuted: 10, // every participant after the Nth will start video muted
83
-    startWithAudioMuted: false, // will start with the microphone muted
84
-    startWithVideoMuted: false, // will start with the camera turned off
85
-//    defaultLanguage: "en",
86
-// To enable sending statistics to callstats.io you should provide Applicaiton ID and Secret.
87
-//    callStatsID: "", // Application ID for callstats.io API
88
-//    callStatsSecret: "", // Secret for callstats.io API
89
-    /*noticeMessage: 'Service update is scheduled for 16th March 2015. ' +
90
-    'During that time service will not be available. ' +
91
-    'Apologise for inconvenience.',*/
92
-    disableThirdPartyRequests: false,
93
-    // The minumum value a video's height (or width, whichever is smaller) needs
191
+
192
+    // Enabling the close page will ignore the welcome page redirection when
193
+    // a call is hangup.
194
+    //enableClosePage: false,
195
+
196
+    // Disable hiding of remote thumbnails when in a 1-on-1 conference call.
197
+    //disable1On1Mode: false,
198
+
199
+    // The minimum value a video's height (or width, whichever is smaller) needs
94
     // to be in order to be considered high-definition.
200
     // to be in order to be considered high-definition.
95
     minHDHeight: 540,
201
     minHDHeight: 540,
96
-    // If true - all users without token will be considered guests and all users
202
+
203
+    // Default language for the user interface.
204
+    //defaultLanguage: 'en',
205
+
206
+    // If true all users without a token will be considered guests and all users
97
     // with token will be considered non-guests. Only guests will be allowed to
207
     // with token will be considered non-guests. Only guests will be allowed to
98
     // edit their profile.
208
     // edit their profile.
99
     enableUserRolesBasedOnToken: false,
209
     enableUserRolesBasedOnToken: false,
100
-    // Suspending video might cause problems with audio playback. Disabling until these are fixed.
101
-    disableSuspendVideo: true,
102
-    // disables or enables RTX (RFC 4588) (defaults to false).
103
-    disableRtx: false,
104
-    // Sets the preferred resolution (height) for local video. Defaults to 720.
105
-    resolution: 720,
210
+
211
+    // Message to show the users. Example: 'The service will be down for
212
+    // maintenance at 01:00 AM GMT,
213
+    //noticeMessage: '',
214
+
215
+
216
+    // Stats
217
+    //
218
+
219
+    // Whether to enable stats collection or not.
220
+    //disableStats: false,
221
+
222
+    // To enable sending statistics to callstats.io you must provide the
223
+    // Application ID and Secret.
224
+    //callStatsID: '',
225
+    //callStatsSecret: '',
226
+
227
+
228
+    // Privacy
229
+    //
230
+
231
+    // If third party requests are disabled, no other server will be contacted.
232
+    // This means avatars will be locally generated and callstats integration
233
+    // will not function.
234
+    //disableThirdPartyRequests: false,
235
+
236
+
106
     // Peer-To-Peer mode: used (if enabled) when there are just 2 participants.
237
     // Peer-To-Peer mode: used (if enabled) when there are just 2 participants.
238
+    //
239
+
107
     p2p: {
240
     p2p: {
108
-        // Enables peer to peer mode. When enabled system will try to establish
109
-        // direct connection given that there are exactly 2 participants in
110
-        // the room. If that succeeds the conference will stop sending data
111
-        // through the JVB and use the peer to peer connection instead. When 3rd
112
-        // participant joins the conference will be moved back to the JVB
241
+        // Enables peer to peer mode. When enabled the system will try to
242
+        // establish a direct connection when there are exactly 2 participants
243
+        // in the room. If that succeeds the conference will stop sending data
244
+        // through the JVB and use the peer to peer connection instead. When a
245
+        // 3rd participant joins the conference will be moved back to the JVB
113
         // connection.
246
         // connection.
114
         enabled: true,
247
         enabled: true,
248
+
249
+        // Use XEP-0215 to fetch STUN and TURN servers.
250
+        //useStunTurn: true,
251
+
115
         // The STUN servers that will be used in the peer to peer connections
252
         // The STUN servers that will be used in the peer to peer connections
116
-        //  useStunTurn: true, // use XEP-0215 to fetch STUN and TURN server
117
         stunServers: [
253
         stunServers: [
118
             { urls: "stun:stun.l.google.com:19302" },
254
             { urls: "stun:stun.l.google.com:19302" },
119
             { urls: "stun:stun1.l.google.com:19302" },
255
             { urls: "stun:stun1.l.google.com:19302" },
120
             { urls: "stun:stun2.l.google.com:19302" }
256
             { urls: "stun:stun2.l.google.com:19302" }
121
         ],
257
         ],
258
+
122
         // If set to true, it will prefer to use H.264 for P2P calls (if H.264
259
         // If set to true, it will prefer to use H.264 for P2P calls (if H.264
123
         // is supported).
260
         // is supported).
124
         preferH264: true
261
         preferH264: true
125
-        // How long we're going to wait, before going back to P2P after
126
-        // the 3rd participant has left the conference (to filter out page reload)
262
+
263
+        // How long we're going to wait, before going back to P2P after the 3rd
264
+        // participant has left the conference (to filter out page reload).
127
         //backToP2PDelay: 5
265
         //backToP2PDelay: 5
128
     },
266
     },
129
-    // Information about the jitsi-meet instance we are connecting to, including the
130
-    // user region as seen by the server.
267
+
268
+
269
+    // Information about the jitsi-meet instance we are connecting to, including
270
+    // the user region as seen by the server.
271
+    //
272
+
131
     deploymentInfo: {
273
     deploymentInfo: {
132
         //shard: "shard1",
274
         //shard: "shard1",
133
         //region: "europe",
275
         //region: "europe",

Loading…
Peruuta
Tallenna