소스 검색

ESLint

Enable ESLint on jitsi-meet with the same configuration and the same
goals as in lib-jitsi-meet.
j8
Lyubomir Marinov 8 년 전
부모
커밋
a2b076985a
47개의 변경된 파일192개의 추가작업 그리고 213개의 파일을 삭제
  1. 11
    0
      .eslintignore
  2. 37
    0
      .eslintrc.js
  3. 6
    0
      analytics.js
  4. 1
    1
      app.js
  5. 18
    38
      conference.js
  6. 3
    2
      config.js
  7. 2
    2
      interface_config.js
  8. 0
    1
      modules/API/external/external_api.js
  9. 7
    6
      modules/FollowMe.js
  10. 27
    39
      modules/UI/UI.js
  11. 1
    6
      modules/UI/authentication/AuthHandler.js
  12. 2
    2
      modules/UI/authentication/LoginDialog.js
  13. 1
    1
      modules/UI/authentication/RoomLocker.js
  14. 1
    1
      modules/UI/etherpad/Etherpad.js
  15. 2
    2
      modules/UI/feedback/Feedback.js
  16. 12
    8
      modules/UI/feedback/FeedbackWindow.js
  17. 2
    2
      modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js
  18. 2
    2
      modules/UI/recording/Recording.js
  19. 2
    2
      modules/UI/shared_video/SharedVideo.js
  20. 0
    1
      modules/UI/side_pannels/chat/Commands.js
  21. 0
    5
      modules/UI/side_pannels/contactlist/ContactList.js
  22. 2
    3
      modules/UI/side_pannels/profile/Profile.js
  23. 2
    2
      modules/UI/side_pannels/settings/SettingsMenu.js
  24. 7
    4
      modules/UI/toolbars/Toolbar.js
  25. 1
    2
      modules/UI/toolbars/ToolbarToggler.js
  26. 3
    3
      modules/UI/util/MessageHandler.js
  27. 1
    1
      modules/UI/util/UIUtil.js
  28. 1
    1
      modules/UI/videolayout/ConnectionIndicator.js
  29. 1
    1
      modules/UI/videolayout/FilmStrip.js
  30. 5
    4
      modules/UI/videolayout/LargeContainer.js
  31. 0
    3
      modules/UI/videolayout/LargeVideoManager.js
  32. 2
    18
      modules/UI/videolayout/LocalVideo.js
  33. 1
    4
      modules/UI/videolayout/RemoteVideo.js
  34. 3
    4
      modules/UI/videolayout/SmallVideo.js
  35. 1
    6
      modules/UI/videolayout/VideoContainer.js
  36. 6
    12
      modules/UI/videolayout/VideoLayout.js
  37. 0
    2
      modules/UI/welcome_page/WelcomePage.js
  38. 2
    2
      modules/config/HttpConfigFetch.js
  39. 1
    1
      modules/config/URLProcessor.js
  40. 1
    2
      modules/config/Util.js
  41. 0
    2
      modules/connectionquality/connectionquality.js
  42. 2
    2
      modules/devices/mediaDeviceHelper.js
  43. 2
    3
      modules/recorder/Recorder.js
  44. 5
    7
      modules/translation/translation.js
  45. 2
    1
      package.json
  46. 2
    1
      utils.js
  47. 2
    1
      webpack.config.babel.js

+ 11
- 0
.eslintignore 파일 보기

1
+# The build artifacts of the jitsi-meet project.
2
+build/*
3
+
4
+# Third-party source code which we (1) do not want to modify or (2) try to
5
+# modify as little as possible.
6
+libs/*
7
+
8
+# ESLint will by default ignore its own configuration file. However, there does
9
+# not seem to be a reason why we will want to risk being inconsistent with our
10
+# remaining JavaScript source code.
11
+!.eslintrc.js

+ 37
- 0
.eslintrc.js 파일 보기

1
+module.exports = {
2
+    'env': {
3
+        'browser': true,
4
+        'commonjs': true,
5
+        'es6': true
6
+    },
7
+    'extends': 'eslint:recommended',
8
+    'globals': {
9
+        // The globals that (1) are accessed but not defined within many of our
10
+        // files, (2) are certainly defined, and (3) we would like to use
11
+        // without explicitly specifying them (using a comment) inside of our
12
+        // files.
13
+        '__filename': false
14
+    },
15
+    'parserOptions': {
16
+        'ecmaFeatures': {
17
+            'experimentalObjectRestSpread': true
18
+        },
19
+        'sourceType': 'module'
20
+    },
21
+    'rules': {
22
+        'new-cap': [
23
+            'error',
24
+            {
25
+                'capIsNew': false // Behave like JSHint's newcap.
26
+            }
27
+        ],
28
+        // While it is considered a best practice to avoid using methods on
29
+        // console in JavaScript that is designed to be executed in the browser
30
+        // and ESLint includes the rule among its set of recommended rules, (1)
31
+        // the general practice is to strip such calls before pushing to
32
+        // production and (2) we prefer to utilize console in lib-jitsi-meet
33
+        // (and jitsi-meet).
34
+        'no-console': 'off',
35
+        'semi': 'error'
36
+    }
37
+};

+ 6
- 0
analytics.js 파일 보기

1
+/* global ga */
2
+
1
 (function (ctx) {
3
 (function (ctx) {
2
   function Analytics() {
4
   function Analytics() {
5
+    /* eslint-disable */
6
+
3
     /**
7
     /**
4
      * Google Analytics
8
      * Google Analytics
5
      */
9
      */
8
     })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
12
     })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
9
     ga('create', 'UA-319188-14', 'jit.si');
13
     ga('create', 'UA-319188-14', 'jit.si');
10
     ga('send', 'pageview');
14
     ga('send', 'pageview');
15
+
16
+    /* eslint-enable */
11
   }
17
   }
12
 
18
 
13
   Analytics.prototype.sendEvent = function (action, data, label, browserName) {
19
   Analytics.prototype.sendEvent = function (action, data, label, browserName) {

+ 1
- 1
app.js 파일 보기

1
-/* global $, JitsiMeetJS, config, getRoomName */
1
+/* global $, config, getRoomName */
2
 /* application specific logic */
2
 /* application specific logic */
3
 
3
 
4
 import "babel-polyfill";
4
 import "babel-polyfill";

+ 18
- 38
conference.js 파일 보기

19
 import UIErrors from './modules/UI/UIErrors';
19
 import UIErrors from './modules/UI/UIErrors';
20
 import UIUtil from './modules/UI/util/UIUtil';
20
 import UIUtil from './modules/UI/util/UIUtil';
21
 
21
 
22
-const ConnectionEvents = JitsiMeetJS.events.connection;
23
 const ConnectionErrors = JitsiMeetJS.errors.connection;
22
 const ConnectionErrors = JitsiMeetJS.errors.connection;
24
 
23
 
25
 const ConferenceEvents = JitsiMeetJS.events.conference;
24
 const ConferenceEvents = JitsiMeetJS.events.conference;
159
 
158
 
160
 /**
159
 /**
161
  * Mute or unmute local audio stream if it exists.
160
  * Mute or unmute local audio stream if it exists.
162
- * @param {boolean} muted if audio stream should be muted or unmuted.
163
- * @param {boolean} indicates if this local audio mute was a result of user
164
- * interaction
165
- *
161
+ * @param {boolean} muted - if audio stream should be muted or unmuted.
162
+ * @param {boolean} userInteraction - indicates if this local audio mute was a
163
+ * result of user interaction
166
  */
164
  */
167
-function muteLocalAudio (muted, userInteraction) {
168
-    if (!localAudio) {
165
+function muteLocalAudio (muted) {
166
+    muteLocalMedia(localAudio, muted, 'Audio');
167
+}
168
+
169
+function muteLocalMedia(localMedia, muted, localMediaTypeString) {
170
+    if (!localMedia) {
169
         return;
171
         return;
170
     }
172
     }
171
 
173
 
172
-    if (muted) {
173
-        localAudio.mute().then(function(value) {},
174
-            function(value) {
175
-                console.warn('Audio Mute was rejected:', value);
176
-            }
177
-        );
178
-    } else {
179
-        localAudio.unmute().then(function(value) {},
180
-            function(value) {
181
-                console.warn('Audio unmute was rejected:', value);
182
-            }
183
-        );
184
-    }
174
+    const method = muted ? 'mute' : 'unmute';
175
+
176
+    localMedia[method]().catch(reason => {
177
+        console.warn(`${localMediaTypeString} ${method} was rejected:`, reason);
178
+    });
185
 }
179
 }
186
 
180
 
187
 /**
181
 /**
189
  * @param {boolean} muted if video stream should be muted or unmuted.
183
  * @param {boolean} muted if video stream should be muted or unmuted.
190
  */
184
  */
191
 function muteLocalVideo (muted) {
185
 function muteLocalVideo (muted) {
192
-    if (!localVideo) {
193
-        return;
194
-    }
195
-
196
-    if (muted) {
197
-        localVideo.mute().then(function(value) {},
198
-            function(value) {
199
-                console.warn('Video mute was rejected:', value);
200
-            }
201
-        );
202
-    } else {
203
-        localVideo.unmute().then(function(value) {},
204
-            function(value) {
205
-                console.warn('Video unmute was rejected:', value);
206
-            }
207
-        );
208
-    }
186
+    muteLocalMedia(localVideo, muted, 'Video');
209
 }
187
 }
210
 
188
 
211
 /**
189
 /**
433
         room.on(ConferenceEvents.CONFERENCE_ERROR,
411
         room.on(ConferenceEvents.CONFERENCE_ERROR,
434
             this._onConferenceError.bind(this));
412
             this._onConferenceError.bind(this));
435
     }
413
     }
436
-    _handleConferenceFailed(err, msg) {
414
+    _handleConferenceFailed(err) {
437
         this._unsubscribe();
415
         this._unsubscribe();
438
         this._reject(err);
416
         this._reject(err);
439
     }
417
     }
1284
             UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000);
1262
             UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000);
1285
         });
1263
         });
1286
 
1264
 
1265
+/*
1287
         room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => {
1266
         room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => {
1288
             //FIXME
1267
             //FIXME
1289
             if (config.muteLocalVideoIfNotInLastN) {
1268
             if (config.muteLocalVideoIfNotInLastN) {
1292
                 // APP.UI.markVideoMuted(true/false);
1271
                 // APP.UI.markVideoMuted(true/false);
1293
             }
1272
             }
1294
         });
1273
         });
1274
+*/
1295
         room.on(
1275
         room.on(
1296
             ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, (ids, enteringIds) => {
1276
             ConferenceEvents.LAST_N_ENDPOINTS_CHANGED, (ids, enteringIds) => {
1297
             APP.UI.handleLastNEndpoints(ids, enteringIds);
1277
             APP.UI.handleLastNEndpoints(ids, enteringIds);

+ 3
- 2
config.js 파일 보기

1
-/* jshint -W101 */
2
-var config = {
1
+/* jshint maxlen:false */
2
+
3
+var config = { // eslint-disable-line no-unused-vars
3
 //    configLocation: './config.json', // see ./modules/HttpConfigFetch.js
4
 //    configLocation: './config.json', // see ./modules/HttpConfigFetch.js
4
     hosts: {
5
     hosts: {
5
         domain: 'jitsi-meet.example.com',
6
         domain: 'jitsi-meet.example.com',

+ 2
- 2
interface_config.js 파일 보기

1
-var interfaceConfig = {
1
+var interfaceConfig = { // eslint-disable-line no-unused-vars
2
     CANVAS_EXTRA: 104,
2
     CANVAS_EXTRA: 104,
3
     CANVAS_RADIUS: 0,
3
     CANVAS_RADIUS: 0,
4
     SHADOW_COLOR: '#ffffff',
4
     SHADOW_COLOR: '#ffffff',
44
     DISABLE_FOCUS_INDICATOR: false,
44
     DISABLE_FOCUS_INDICATOR: false,
45
     AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)",
45
     AUDIO_LEVEL_PRIMARY_COLOR: "rgba(255,255,255,0.7)",
46
     AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)"
46
     AUDIO_LEVEL_SECONDARY_COLOR: "rgba(255,255,255,0.4)"
47
-};
47
+};

+ 0
- 1
modules/API/external/external_api.js 파일 보기

336
  * @param events array with the names of the events.
336
  * @param events array with the names of the events.
337
  */
337
  */
338
 JitsiMeetExternalAPI.prototype.removeEventListeners = function(events) {
338
 JitsiMeetExternalAPI.prototype.removeEventListeners = function(events) {
339
-    var eventsArray = [];
340
     for(var i = 0; i < events.length; i++)
339
     for(var i = 0; i < events.length; i++)
341
         this.removeEventListener(events[i]);
340
         this.removeEventListener(events[i]);
342
 };
341
 };

+ 7
- 6
modules/FollowMe.js 파일 보기

261
      * @param newValue the new value
261
      * @param newValue the new value
262
      * @private
262
      * @private
263
      */
263
      */
264
+    // eslint-disable-next-line no-unused-vars
264
     _localPropertyChange (property, oldValue, newValue) {
265
     _localPropertyChange (property, oldValue, newValue) {
265
         // Only a moderator is allowed to send commands.
266
         // Only a moderator is allowed to send commands.
266
-        var conference = this._conference;
267
+        const conference = this._conference;
267
         if (!conference.isModerator)
268
         if (!conference.isModerator)
268
             return;
269
             return;
269
 
270
 
270
-        var commands = conference.commands;
271
+        const commands = conference.commands;
271
         // XXX The "Follow Me" command represents a snapshot of all states
272
         // XXX The "Follow Me" command represents a snapshot of all states
272
         // which are to be followed so don't forget to removeCommand before
273
         // which are to be followed so don't forget to removeCommand before
273
         // sendCommand!
274
         // sendCommand!
274
         commands.removeCommand(_COMMAND);
275
         commands.removeCommand(_COMMAND);
275
-        var self = this;
276
+        const local = this._local;
276
         commands.sendCommandOnce(
277
         commands.sendCommandOnce(
277
                 _COMMAND,
278
                 _COMMAND,
278
                 {
279
                 {
279
                     attributes: {
280
                     attributes: {
280
-                        filmStripVisible: self._local.filmStripVisible,
281
-                        nextOnStage: self._local.nextOnStage,
282
-                        sharedDocumentVisible: self._local.sharedDocumentVisible
281
+                        filmStripVisible: local.filmStripVisible,
282
+                        nextOnStage: local.nextOnStage,
283
+                        sharedDocumentVisible: local.sharedDocumentVisible
283
                     }
284
                     }
284
                 });
285
                 });
285
     }
286
     }

+ 27
- 39
modules/UI/UI.js 파일 보기

1
 /* global APP, JitsiMeetJS, $, config, interfaceConfig, toastr */
1
 /* global APP, JitsiMeetJS, $, config, interfaceConfig, toastr */
2
-/* jshint -W101 */
3
 var UI = {};
2
 var UI = {};
4
 
3
 
5
 import Chat from "./side_pannels/chat/Chat";
4
 import Chat from "./side_pannels/chat/Chat";
10
 import SideContainerToggler from "./side_pannels/SideContainerToggler";
9
 import SideContainerToggler from "./side_pannels/SideContainerToggler";
11
 import UIUtil from "./util/UIUtil";
10
 import UIUtil from "./util/UIUtil";
12
 import UIEvents from "../../service/UI/UIEvents";
11
 import UIEvents from "../../service/UI/UIEvents";
13
-import CQEvents from '../../service/connectionquality/CQEvents';
14
 import EtherpadManager from './etherpad/Etherpad';
12
 import EtherpadManager from './etherpad/Etherpad';
15
 import SharedVideoManager from './shared_video/SharedVideo';
13
 import SharedVideoManager from './shared_video/SharedVideo';
16
 import Recording from "./recording/Recording";
14
 import Recording from "./recording/Recording";
17
-import GumPermissionsOverlay from './gum_overlay/UserMediaPermissionsGuidanceOverlay';
15
+import GumPermissionsOverlay
16
+    from './gum_overlay/UserMediaPermissionsGuidanceOverlay';
18
 
17
 
19
 import VideoLayout from "./videolayout/VideoLayout";
18
 import VideoLayout from "./videolayout/VideoLayout";
20
 import FilmStrip from "./videolayout/FilmStrip";
19
 import FilmStrip from "./videolayout/FilmStrip";
194
         "dialog.reservationError");
193
         "dialog.reservationError");
195
     var message = APP.translation.generateTranslationHTML(
194
     var message = APP.translation.generateTranslationHTML(
196
         "dialog.reservationErrorMsg", {code: code, msg: msg});
195
         "dialog.reservationErrorMsg", {code: code, msg: msg});
197
-    messageHandler.openDialog(
198
-        title,
199
-        message,
200
-        true, {},
201
-        function (event, value, message, formVals) {
202
-            return false;
203
-        }
204
-    );
196
+    messageHandler.openDialog(title, message, true, {}, () => false);
205
 };
197
 };
206
 
198
 
207
 /**
199
 /**
208
  * Notify user that he has been kicked from the server.
200
  * Notify user that he has been kicked from the server.
209
  */
201
  */
210
 UI.notifyKicked = function () {
202
 UI.notifyKicked = function () {
211
-    messageHandler.openMessageDialog("dialog.sessTerminated", "dialog.kickMessage");
203
+    messageHandler.openMessageDialog(
204
+            "dialog.sessTerminated",
205
+            "dialog.kickMessage");
212
 };
206
 };
213
 
207
 
214
 /**
208
 /**
218
 UI.notifyConferenceDestroyed = function (reason) {
212
 UI.notifyConferenceDestroyed = function (reason) {
219
     //FIXME: use Session Terminated from translation, but
213
     //FIXME: use Session Terminated from translation, but
220
     // 'reason' text comes from XMPP packet and is not translated
214
     // 'reason' text comes from XMPP packet and is not translated
221
-    var title = APP.translation.generateTranslationHTML("dialog.sessTerminated");
222
-    messageHandler.openDialog(
223
-        title, reason, true, {},
224
-        function (event, value, message, formVals) {
225
-            return false;
226
-        }
227
-    );
215
+    const title
216
+        = APP.translation.generateTranslationHTML("dialog.sessTerminated");
217
+    messageHandler.openDialog(title, reason, true, {}, () => false);
228
 };
218
 };
229
 
219
 
230
 /**
220
 /**
287
  * Sets the local "raised hand" status.
277
  * Sets the local "raised hand" status.
288
  */
278
  */
289
 UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
279
 UI.setLocalRaisedHandStatus = (raisedHandStatus) => {
290
-    VideoLayout.setRaisedHandStatus(APP.conference.getMyUserId(), raisedHandStatus);
280
+    VideoLayout.setRaisedHandStatus(
281
+            APP.conference.getMyUserId(),
282
+            raisedHandStatus);
291
 };
283
 };
292
 
284
 
293
 /**
285
 /**
579
     VideoLayout.onRemoteStreamRemoved(track);
571
     VideoLayout.onRemoteStreamRemoved(track);
580
 };
572
 };
581
 
573
 
582
-function chatAddError(errorMessage, originalText) {
583
-    return Chat.chatAddError(errorMessage, originalText);
584
-}
585
-
586
 /**
574
 /**
587
  * Update chat subject.
575
  * Update chat subject.
588
  * @param {string} subject new chat subject
576
  * @param {string} subject new chat subject
959
             "dialog.connectError");
947
             "dialog.connectError");
960
     }
948
     }
961
 
949
 
962
-    messageHandler.openDialog(
963
-        title, message, true, {}, function (e, v, m, f) { return false; }
964
-    );
950
+    messageHandler.openDialog(title, message, true, {}, () => false);
965
 };
951
 };
966
 
952
 
967
 
953
 
975
     var message = APP.translation.generateTranslationHTML(
961
     var message = APP.translation.generateTranslationHTML(
976
             "dialog.maxUsersLimitReached");
962
             "dialog.maxUsersLimitReached");
977
 
963
 
978
-    messageHandler.openDialog(
979
-        title, message, true, {}, function (e, v, m, f) { return false; }
980
-    );
964
+    messageHandler.openDialog(title, message, true, {}, () => false);
981
 };
965
 };
982
 
966
 
983
 /**
967
 /**
985
  */
969
  */
986
 UI.notifyInitiallyMuted = function () {
970
 UI.notifyInitiallyMuted = function () {
987
     messageHandler.notify(
971
     messageHandler.notify(
988
-        null, "notify.mutedTitle", "connected", "notify.muted", null, {timeOut: 120000}
989
-    );
972
+        null,
973
+        "notify.mutedTitle",
974
+        "connected",
975
+        "notify.muted",
976
+        null,
977
+        { timeOut: 120000 });
990
 };
978
 };
991
 
979
 
992
 /**
980
 /**
1089
     Chat.updateChatConversation(from, displayName, message, stamp);
1077
     Chat.updateChatConversation(from, displayName, message, stamp);
1090
 };
1078
 };
1091
 
1079
 
1080
+// eslint-disable-next-line no-unused-vars
1092
 UI.updateDTMFSupport = function (isDTMFSupported) {
1081
 UI.updateDTMFSupport = function (isDTMFSupported) {
1093
     //TODO: enable when the UI is ready
1082
     //TODO: enable when the UI is ready
1094
     //Toolbar.showDialPadButton(dtmfSupport);
1083
     //Toolbar.showDialPadButton(dtmfSupport);
1105
     else if (Feedback.isEnabled() && Feedback.isSubmitted())
1094
     else if (Feedback.isEnabled() && Feedback.isSubmitted())
1106
         return Promise.resolve();
1095
         return Promise.resolve();
1107
     else
1096
     else
1108
-        return new Promise(function (resolve, reject) {
1097
+        return new Promise(function (resolve) {
1109
             if (Feedback.isEnabled()) {
1098
             if (Feedback.isEnabled()) {
1110
                 // If the user has already entered feedback, we'll show the
1099
                 // If the user has already entered feedback, we'll show the
1111
                 // window and immidiately start the conference dispose timeout.
1100
                 // window and immidiately start the conference dispose timeout.
1272
         null,
1261
         null,
1273
         true,
1262
         true,
1274
         "dialog.goToStore",
1263
         "dialog.goToStore",
1275
-         function(e,v,m,f){
1264
+        function(e,v) {
1276
             if (v) {
1265
             if (v) {
1277
                 e.preventDefault();
1266
                 e.preventDefault();
1278
                 eventEmitter.emit(UIEvents.OPEN_EXTENSION_STORE, url);
1267
                 eventEmitter.emit(UIEvents.OPEN_EXTENSION_STORE, url);
1407
         let title = "dialog.error";
1396
         let title = "dialog.error";
1408
 
1397
 
1409
         if (micError && micError.name === TrackErrors.PERMISSION_DENIED) {
1398
         if (micError && micError.name === TrackErrors.PERMISSION_DENIED) {
1410
-            if (cameraError && cameraError.name === TrackErrors.PERMISSION_DENIED) {
1411
-                title = "dialog.permissionDenied";
1412
-            } else if (!cameraError) {
1399
+            if (!cameraError
1400
+                    || cameraError.name === TrackErrors.PERMISSION_DENIED) {
1413
                 title = "dialog.permissionDenied";
1401
                 title = "dialog.permissionDenied";
1414
             }
1402
             }
1415
-        } else if (cameraError &&
1416
-            cameraError.name === TrackErrors.PERMISSION_DENIED) {
1403
+        } else if (cameraError
1404
+                && cameraError.name === TrackErrors.PERMISSION_DENIED) {
1417
             title = "dialog.permissionDenied";
1405
             title = "dialog.permissionDenied";
1418
         }
1406
         }
1419
 
1407
 

+ 1
- 6
modules/UI/authentication/AuthHandler.js 파일 보기

4
 import UIUtil from '../util/UIUtil';
4
 import UIUtil from '../util/UIUtil';
5
 import {openConnection} from '../../../connection';
5
 import {openConnection} from '../../../connection';
6
 
6
 
7
-const ConferenceEvents = JitsiMeetJS.events.conference;
8
 const ConnectionErrors = JitsiMeetJS.errors.connection;
7
 const ConnectionErrors = JitsiMeetJS.errors.connection;
9
 
8
 
10
 let externalAuthWindow;
9
 let externalAuthWindow;
73
  * @param room the name fo the conference room.
72
  * @param room the name fo the conference room.
74
  */
73
  */
75
 function initJWTTokenListener(room) {
74
 function initJWTTokenListener(room) {
76
-    var self = this;
77
     var listener = function (event) {
75
     var listener = function (event) {
78
         if (externalAuthWindow !== event.source) {
76
         if (externalAuthWindow !== event.source) {
79
             console.warn("Ignored message not coming " +
77
             console.warn("Ignored message not coming " +
279
 function requestAuth(roomName, connect) {
277
 function requestAuth(roomName, connect) {
280
     if (isTokenAuthEnabled) {
278
     if (isTokenAuthEnabled) {
281
         // This Promise never resolves as user gets redirected to another URL
279
         // This Promise never resolves as user gets redirected to another URL
282
-        return new Promise(function (resolve, reject) {
283
-            redirectToTokenAuthService(roomName);
284
-        });
280
+        return new Promise(() => redirectToTokenAuthService(roomName));
285
     } else {
281
     } else {
286
         return showXmppPasswordPrompt(roomName, connect);
282
         return showXmppPasswordPrompt(roomName, connect);
287
     }
283
     }
288
 }
284
 }
289
 
285
 
290
-
291
 export default {
286
 export default {
292
     authenticate,
287
     authenticate,
293
     requireAuth,
288
     requireAuth,

+ 2
- 2
modules/UI/authentication/LoginDialog.js 파일 보기

1
-/* global $, APP, config*/
1
+/* global APP, config */
2
 
2
 
3
 /**
3
 /**
4
  * Build html for "password required" dialog.
4
  * Build html for "password required" dialog.
109
             html:   '<div id="errorMessage"></div>',
109
             html:   '<div id="errorMessage"></div>',
110
             buttons: finishedButtons,
110
             buttons: finishedButtons,
111
             defaultButton: 0,
111
             defaultButton: 0,
112
-            submit: function (e, v, m, f) {
112
+            submit: function (e, v) {
113
                 e.preventDefault();
113
                 e.preventDefault();
114
                 if (v === 'retry') {
114
                 if (v === 'retry') {
115
                     connDialog.goToState('login');
115
                     connDialog.goToState('login');

+ 1
- 1
modules/UI/authentication/RoomLocker.js 파일 보기

51
         APP.UI.messageHandler.openTwoButtonDialog(
51
         APP.UI.messageHandler.openTwoButtonDialog(
52
             null, null, null, msg,
52
             null, null, null, msg,
53
             true, "dialog.Ok",
53
             true, "dialog.Ok",
54
-            function (e, v, m, f) {}, null,
54
+            function () {}, null,
55
             function (e, v, m, f) {
55
             function (e, v, m, f) {
56
                 if (v && f.lockKey) {
56
                 if (v && f.lockKey) {
57
                     resolve(UIUtil.escapeHtml(f.lockKey));
57
                     resolve(UIUtil.escapeHtml(f.lockKey));

+ 1
- 1
modules/UI/etherpad/Etherpad.js 파일 보기

2
 
2
 
3
 import VideoLayout from "../videolayout/VideoLayout";
3
 import VideoLayout from "../videolayout/VideoLayout";
4
 import LargeContainer from '../videolayout/LargeContainer';
4
 import LargeContainer from '../videolayout/LargeContainer';
5
-import UIUtil from "../util/UIUtil";
6
 import UIEvents from "../../../service/UI/UIEvents";
5
 import UIEvents from "../../../service/UI/UIEvents";
7
 import FilmStrip from '../videolayout/FilmStrip';
6
 import FilmStrip from '../videolayout/FilmStrip';
8
 
7
 
101
         return document.getElementById('etherpad');
100
         return document.getElementById('etherpad');
102
     }
101
     }
103
 
102
 
103
+    // eslint-disable-next-line no-unused-vars
104
     resize (containerWidth, containerHeight, animate) {
104
     resize (containerWidth, containerHeight, animate) {
105
         let height = containerHeight - FilmStrip.getFilmStripHeight();
105
         let height = containerHeight - FilmStrip.getFilmStripHeight();
106
         let width = containerWidth;
106
         let width = containerWidth;

+ 2
- 2
modules/UI/feedback/Feedback.js 파일 보기

1
-/* global $, APP, config, interfaceConfig, JitsiMeetJS */
1
+/* global $, APP, JitsiMeetJS */
2
 import UIEvents from "../../../service/UI/UIEvents";
2
 import UIEvents from "../../../service/UI/UIEvents";
3
 import FeedabckWindow from "./FeedbackWindow";
3
 import FeedabckWindow from "./FeedbackWindow";
4
 
4
 
125
     }
125
     }
126
 };
126
 };
127
 
127
 
128
-module.exports = Feedback;
128
+module.exports = Feedback;

+ 12
- 8
modules/UI/feedback/FeedbackWindow.js 파일 보기

1
 /* global $, APP, interfaceConfig, AJS */
1
 /* global $, APP, interfaceConfig, AJS */
2
-/* jshint -W101 */
3
 
2
 
4
 const selector = '#aui-feedback-dialog';
3
 const selector = '#aui-feedback-dialog';
5
 
4
 
9
  *
8
  *
10
  * @param starCount the number of stars, for which to toggle the css class
9
  * @param starCount the number of stars, for which to toggle the css class
11
  */
10
  */
12
-let toggleStars = function(starCount) {
11
+function toggleStars(starCount) {
13
     $('#stars > a').each(function(index, el) {
12
     $('#stars > a').each(function(index, el) {
14
         if (index <= starCount) {
13
         if (index <= starCount) {
15
             el.classList.add("starHover");
14
             el.classList.add("starHover");
16
         } else
15
         } else
17
             el.classList.remove("starHover");
16
             el.classList.remove("starHover");
18
     });
17
     });
19
-};
18
+}
20
 
19
 
21
 /**
20
 /**
22
  * Constructs the html for the rated feedback window.
21
  * Constructs the html for the rated feedback window.
23
  *
22
  *
24
  * @returns {string} the contructed html string
23
  * @returns {string} the contructed html string
25
  */
24
  */
26
-let createRateFeedbackHTML = function (Feedback) {
25
+function createRateFeedbackHTML() {
27
     let rateExperience
26
     let rateExperience
28
             = APP.translation.translateString('dialog.rateExperience'),
27
             = APP.translation.translateString('dialog.rateExperience'),
29
         feedbackHelp = APP.translation.translateString('dialog.feedbackHelp');
28
         feedbackHelp = APP.translation.translateString('dialog.feedbackHelp');
58
                     <p>&nbsp;</p>
57
                     <p>&nbsp;</p>
59
                     <p>${ feedbackHelp }</p>
58
                     <p>${ feedbackHelp }</p>
60
                 </div>
59
                 </div>
61
-                <textarea id="feedbackTextArea" rows="10" cols="40" autofocus></textarea>
60
+                <textarea id="feedbackTextArea" rows="10" cols="40" autofocus>
61
+                </textarea>
62
             </form>
62
             </form>
63
             <footer class="aui-dialog2-footer feedback__footer">
63
             <footer class="aui-dialog2-footer feedback__footer">
64
                 <div class="aui-dialog2-footer-actions">
64
                 <div class="aui-dialog2-footer-actions">
65
-                    <button id="dialog-close-button" class="aui-button aui-button_close">Close</button>
66
-                    <button id="dialog-submit-button" class="aui-button aui-button_submit">Submit</button>
65
+                    <button
66
+                        id="dialog-close-button"
67
+                        class="aui-button aui-button_close">Close</button>
68
+                    <button
69
+                        id="dialog-submit-button"
70
+                        class="aui-button aui-button_submit">Submit</button>
67
                 </div>
71
                 </div>
68
             </footer>
72
             </footer>
69
         </div>
73
         </div>
70
 `;
74
 `;
71
-};
75
+}
72
 
76
 
73
 /**
77
 /**
74
  * Callback for Rate Feedback
78
  * Callback for Rate Feedback

+ 2
- 2
modules/UI/gum_overlay/UserMediaPermissionsGuidanceOverlay.js 파일 보기

1
-/* global $, APP, JitsiMeetJS */
1
+/* global $, APP */
2
 
2
 
3
 let $overlay;
3
 let $overlay;
4
 
4
 
43
     hide() {
43
     hide() {
44
         $overlay && $overlay.detach();
44
         $overlay && $overlay.detach();
45
     }
45
     }
46
-};
46
+};

+ 2
- 2
modules/UI/recording/Recording.js 파일 보기

97
                 ],
97
                 ],
98
                 focus: ':input:first',
98
                 focus: ':input:first',
99
                 defaultButton: 1,
99
                 defaultButton: 1,
100
-                submit: function (e, v, m, f) {
100
+                submit: function (e, v) {
101
                     e.preventDefault();
101
                     e.preventDefault();
102
                     if (v === 0) {
102
                     if (v === 0) {
103
                         reject(APP.UI.messageHandler.CANCEL);
103
                         reject(APP.UI.messageHandler.CANCEL);
177
             null,
177
             null,
178
             false,
178
             false,
179
             buttonKey,
179
             buttonKey,
180
-            function(e,v,m,f) {
180
+            function(e,v) {
181
                 if (v) {
181
                 if (v) {
182
                     resolve();
182
                     resolve();
183
                 } else {
183
                 } else {

+ 2
- 2
modules/UI/shared_video/SharedVideo.js 파일 보기

729
             null,
729
             null,
730
             false,
730
             false,
731
             "dialog.Remove",
731
             "dialog.Remove",
732
-            function(e,v,m,f) {
732
+            function(e,v) {
733
                 if (v) {
733
                 if (v) {
734
                     resolve();
734
                     resolve();
735
                 } else {
735
                 } else {
811
                 ],
811
                 ],
812
                 focus: ':input:first',
812
                 focus: ':input:first',
813
                 defaultButton: 1,
813
                 defaultButton: 1,
814
-                submit: function (e, v, m, f) {
814
+                submit: function (e, v) {
815
                     e.preventDefault();
815
                     e.preventDefault();
816
                     if (v === 0) {
816
                     if (v === 0) {
817
                         reject();
817
                         reject();

+ 0
- 1
modules/UI/side_pannels/chat/Commands.js 파일 보기

1
-/* global APP */
2
 import UIUtil from '../../util/UIUtil';
1
 import UIUtil from '../../util/UIUtil';
3
 import UIEvents from '../../../../service/UI/UIEvents';
2
 import UIEvents from '../../../../service/UI/UIEvents';
4
 
3
 

+ 0
- 5
modules/UI/side_pannels/contactlist/ContactList.js 파일 보기

4
 import UIUtil from '../../util/UIUtil';
4
 import UIUtil from '../../util/UIUtil';
5
 
5
 
6
 let numberOfContacts = 0;
6
 let numberOfContacts = 0;
7
-let notificationInterval;
8
 
7
 
9
 /**
8
 /**
10
  * Updates the number of participants in the contact list button and sets
9
  * Updates the number of participants in the contact list button and sets
61
     return $(`#contacts>li[id="${id}"]`);
60
     return $(`#contacts>li[id="${id}"]`);
62
 }
61
 }
63
 
62
 
64
-function contactElExists (id) {
65
-    return getContactEl(id).length > 0;
66
-}
67
-
68
 /**
63
 /**
69
  * Contact list.
64
  * Contact list.
70
  */
65
  */

+ 2
- 3
modules/UI/side_pannels/profile/Profile.js 파일 보기

1
-/* global APP, $, JitsiMeetJS */
1
+/* global $ */
2
 import UIUtil from "../../util/UIUtil";
2
 import UIUtil from "../../util/UIUtil";
3
 import UIEvents from "../../../../service/UI/UIEvents";
3
 import UIEvents from "../../../../service/UI/UIEvents";
4
-import languages from "../../../../service/translation/languages";
5
 import Settings from '../../../settings/Settings';
4
 import Settings from '../../../settings/Settings';
6
 
5
 
7
 export default {
6
 export default {
58
     changeAvatar (avatarUrl) {
57
     changeAvatar (avatarUrl) {
59
         $('#avatar').attr('src', avatarUrl);
58
         $('#avatar').attr('src', avatarUrl);
60
     }
59
     }
61
-};
60
+};

+ 2
- 2
modules/UI/side_pannels/settings/SettingsMenu.js 파일 보기

1
-/* global APP, $, JitsiMeetJS, interfaceConfig */
1
+/* global APP, $, JitsiMeetJS */
2
 import UIUtil from "../../util/UIUtil";
2
 import UIUtil from "../../util/UIUtil";
3
 import UIEvents from "../../../../service/UI/UIEvents";
3
 import UIEvents from "../../../../service/UI/UIEvents";
4
 import languages from "../../../../service/translation/languages";
4
 import languages from "../../../../service/translation/languages";
268
 
268
 
269
         APP.translation.translateElement($('#settings_container option'));
269
         APP.translation.translateElement($('#settings_container option'));
270
     }
270
     }
271
-};
271
+};

+ 7
- 4
modules/UI/toolbars/Toolbar.js 파일 보기

1
 /* global APP, $, config, interfaceConfig, JitsiMeetJS */
1
 /* global APP, $, config, interfaceConfig, JitsiMeetJS */
2
-/* jshint -W101 */
3
 import UIUtil from '../util/UIUtil';
2
 import UIUtil from '../util/UIUtil';
4
 import UIEvents from '../../../service/UI/UIEvents';
3
 import UIEvents from '../../../service/UI/UIEvents';
5
 import SideContainerToggler from "../side_pannels/SideContainerToggler";
4
 import SideContainerToggler from "../side_pannels/SideContainerToggler";
350
     APP.UI.messageHandler.openTwoButtonDialog(
349
     APP.UI.messageHandler.openTwoButtonDialog(
351
         null, null, null,
350
         null, null, null,
352
         `<h2>${sipMsg}</h2>
351
         `<h2>${sipMsg}</h2>
353
-            <input name="sipNumber" type="text" value="${defaultNumber}" autofocus>`,
352
+            <input
353
+                name="sipNumber"
354
+                type="text"
355
+                value="${defaultNumber}"
356
+                autofocus>`,
354
         false, "dialog.Dial",
357
         false, "dialog.Dial",
355
         function (e, v, m, f) {
358
         function (e, v, m, f) {
356
             if (v && f.sipNumber) {
359
             if (v && f.sipNumber) {
739
     /**
742
     /**
740
      * Handles the side toolbar toggle.
743
      * Handles the side toolbar toggle.
741
      */
744
      */
742
-    _handleSideToolbarContainerToggled(containerId, isVisible) {
745
+    _handleSideToolbarContainerToggled(containerId) {
743
         Object.keys(defaultToolbarButtons).forEach(
746
         Object.keys(defaultToolbarButtons).forEach(
744
             id => {
747
             id => {
745
                 if (!UIUtil.isButtonEnabled(id))
748
                 if (!UIUtil.isButtonEnabled(id))
819
     }
822
     }
820
 };
823
 };
821
 
824
 
822
-export default Toolbar;
825
+export default Toolbar;

+ 1
- 2
modules/UI/toolbars/ToolbarToggler.js 파일 보기

3
 import UIUtil from '../util/UIUtil';
3
 import UIUtil from '../util/UIUtil';
4
 import Toolbar from './Toolbar';
4
 import Toolbar from './Toolbar';
5
 import SideContainerToggler from "../side_pannels/SideContainerToggler";
5
 import SideContainerToggler from "../side_pannels/SideContainerToggler";
6
-import FilmStrip from '../videolayout/FilmStrip.js';
7
 
6
 
8
 let toolbarTimeoutObject;
7
 let toolbarTimeoutObject;
9
 let toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
8
 let toolbarTimeout = interfaceConfig.INITIAL_TOOLBAR_TIMEOUT;
27
  * @param force {true} to force the hiding of the toolbar without caring about
26
  * @param force {true} to force the hiding of the toolbar without caring about
28
  * the extended toolbar side panels.
27
  * the extended toolbar side panels.
29
  */
28
  */
30
-function hideToolbar(force) {
29
+function hideToolbar(force) { // eslint-disable-line no-unused-vars
31
     if (alwaysVisibleToolbar) {
30
     if (alwaysVisibleToolbar) {
32
         return;
31
         return;
33
     }
32
     }

+ 3
- 3
modules/UI/util/MessageHandler.js 파일 보기

1
-/* global $, APP, jQuery, toastr, Impromptu */
2
-/* jshint -W101 */
1
+/* global $, APP, toastr, Impromptu */
3
 
2
 
4
 import UIUtil from './UIUtil';
3
 import UIUtil from './UIUtil';
5
 
4
 
274
             displayNameSpan + '<br>' +
273
             displayNameSpan + '<br>' +
275
             '<span class=' + cls + ' data-i18n="' + messageKey + '"' +
274
             '<span class=' + cls + ' data-i18n="' + messageKey + '"' +
276
                 (messageArguments?
275
                 (messageArguments?
277
-                    " data-i18n-options='" + JSON.stringify(messageArguments) + "'"
276
+                    " data-i18n-options='" + JSON.stringify(messageArguments)
277
+                        + "'"
278
                     : "") + ">" +
278
                     : "") + ">" +
279
             APP.translation.translateString(messageKey,
279
             APP.translation.translateString(messageKey,
280
                 messageArguments) +
280
                 messageArguments) +

+ 1
- 1
modules/UI/util/UIUtil.js 파일 보기

1
-/* global $, APP, config, AJS, interfaceConfig */
1
+/* global $, APP, AJS, interfaceConfig */
2
 
2
 
3
 import KeyboardShortcut from '../../keyboardshortcut/keyboardshortcut';
3
 import KeyboardShortcut from '../../keyboardshortcut/keyboardshortcut';
4
 
4
 

+ 1
- 1
modules/UI/videolayout/ConnectionIndicator.js 파일 보기

416
         else if (this.resolution !== null) {
416
         else if (this.resolution !== null) {
417
             let resolutions = this.resolution || {};
417
             let resolutions = this.resolution || {};
418
             Object.keys(resolutions).map(function (ssrc) {
418
             Object.keys(resolutions).map(function (ssrc) {
419
-                    let {width, height} = resolutions[ssrc];
419
+                    const { height } = resolutions[ssrc];
420
                     if (height >= config.minHDHeight)
420
                     if (height >= config.minHDHeight)
421
                         showResolutionLabel = true;
421
                         showResolutionLabel = true;
422
                 });
422
                 });

+ 1
- 1
modules/UI/videolayout/FilmStrip.js 파일 보기

1
-/* global $, APP, interfaceConfig, config*/
1
+/* global $, interfaceConfig */
2
 
2
 
3
 import UIEvents from "../../../service/UI/UIEvents";
3
 import UIEvents from "../../../service/UI/UIEvents";
4
 import UIUtil from "../util/UIUtil";
4
 import UIUtil from "../util/UIUtil";

+ 5
- 4
modules/UI/videolayout/LargeContainer.js 파일 보기

24
      * @param {number} containerHeight available height
24
      * @param {number} containerHeight available height
25
      * @param {boolean} animate if container should animate it's resize process
25
      * @param {boolean} animate if container should animate it's resize process
26
      */
26
      */
27
+    // eslint-disable-next-line no-unused-vars
27
     resize (containerWidth, containerHeight, animate) {
28
     resize (containerWidth, containerHeight, animate) {
28
     }
29
     }
29
 
30
 
30
     /**
31
     /**
31
      * Handler for "hover in" events.
32
      * Handler for "hover in" events.
32
      */
33
      */
33
-    onHoverIn (e) {
34
+    onHoverIn (e) { // eslint-disable-line no-unused-vars
34
     }
35
     }
35
 
36
 
36
     /**
37
     /**
37
      * Handler for "hover out" events.
38
      * Handler for "hover out" events.
38
      */
39
      */
39
-    onHoverOut (e) {
40
+    onHoverOut (e) { // eslint-disable-line no-unused-vars
40
     }
41
     }
41
 
42
 
42
     /**
43
     /**
44
      * @param {JitsiTrack?} stream new stream
45
      * @param {JitsiTrack?} stream new stream
45
      * @param {string} videoType video type
46
      * @param {string} videoType video type
46
      */
47
      */
47
-    setStream (stream, videoType) {
48
+    setStream (stream, videoType) { // eslint-disable-line no-unused-vars
48
     }
49
     }
49
 
50
 
50
     /**
51
     /**
51
      * Show or hide user avatar.
52
      * Show or hide user avatar.
52
      * @param {boolean} show
53
      * @param {boolean} show
53
      */
54
      */
54
-    showAvatar (show) {
55
+    showAvatar (show) { // eslint-disable-line no-unused-vars
55
     }
56
     }
56
 
57
 
57
     /**
58
     /**

+ 0
- 3
modules/UI/videolayout/LargeVideoManager.js 파일 보기

1
 /* global $, APP, interfaceConfig */
1
 /* global $, APP, interfaceConfig */
2
-/* jshint -W101 */
3
 
2
 
4
 import Avatar from "../avatar/Avatar";
3
 import Avatar from "../avatar/Avatar";
5
 import {createDeferred} from '../../util/helpers';
4
 import {createDeferred} from '../../util/helpers';
6
 import UIUtil from "../util/UIUtil";
5
 import UIUtil from "../util/UIUtil";
7
 import {VideoContainer, VIDEO_CONTAINER_TYPE} from "./VideoContainer";
6
 import {VideoContainer, VIDEO_CONTAINER_TYPE} from "./VideoContainer";
8
 
7
 
9
-import LargeContainer from "./LargeContainer";
10
-
11
 import AudioLevels from "../audio_levels/AudioLevels";
8
 import AudioLevels from "../audio_levels/AudioLevels";
12
 
9
 
13
 /**
10
 /**

+ 2
- 18
modules/UI/videolayout/LocalVideo.js 파일 보기

34
 LocalVideo.prototype = Object.create(SmallVideo.prototype);
34
 LocalVideo.prototype = Object.create(SmallVideo.prototype);
35
 LocalVideo.prototype.constructor = LocalVideo;
35
 LocalVideo.prototype.constructor = LocalVideo;
36
 
36
 
37
-/**
38
- * Creates the edit display name button.
39
- *
40
- * @returns {object} the edit button
41
- */
42
-function createEditDisplayNameButton() {
43
-    var editButton = document.createElement('a');
44
-    editButton.className = 'displayname';
45
-    UIUtil.setTooltip(editButton,
46
-        "videothumbnail.editnickname",
47
-        "left");
48
-    editButton.innerHTML = '<i class="icon-edit"></i>';
49
-
50
-    return editButton;
51
-}
52
-
53
 /**
37
 /**
54
  * Sets the display name for the given video span id.
38
  * Sets the display name for the given video span id.
55
  */
39
  */
56
-LocalVideo.prototype.setDisplayName = function(displayName, key) {
40
+LocalVideo.prototype.setDisplayName = function(displayName) {
57
     if (!this.container) {
41
     if (!this.container) {
58
         console.warn(
42
         console.warn(
59
                 "Unable to set displayName - " + this.videoSpanId +
43
                 "Unable to set displayName - " + this.videoSpanId +
138
                 $editDisplayName.focus();
122
                 $editDisplayName.focus();
139
                 $editDisplayName.select();
123
                 $editDisplayName.select();
140
 
124
 
141
-                $editDisplayName.one("focusout", function (e) {
125
+                $editDisplayName.one("focusout", function () {
142
                     self.emitter.emit(UIEvents.NICKNAME_CHANGED, this.value);
126
                     self.emitter.emit(UIEvents.NICKNAME_CHANGED, this.value);
143
                     $editDisplayName.hide();
127
                     $editDisplayName.hide();
144
                     $localDisplayName.show();
128
                     $localDisplayName.show();

+ 1
- 4
modules/UI/videolayout/RemoteVideo.js 파일 보기

3
 import ConnectionIndicator from './ConnectionIndicator';
3
 import ConnectionIndicator from './ConnectionIndicator';
4
 
4
 
5
 import SmallVideo from "./SmallVideo";
5
 import SmallVideo from "./SmallVideo";
6
-import AudioLevels from "../audio_levels/AudioLevels";
7
 import UIUtils from "../util/UIUtil";
6
 import UIUtils from "../util/UIUtil";
8
 import UIEvents from '../../../service/UI/UIEvents';
7
 import UIEvents from '../../../service/UI/UIEvents';
9
 import JitsiPopover from "../util/JitsiPopover";
8
 import JitsiPopover from "../util/JitsiPopover";
61
         this.addRemoteVideoMenu();
60
         this.addRemoteVideoMenu();
62
     }
61
     }
63
 
62
 
64
-    let { remoteVideo } = this.VideoLayout.resizeThumbnails(false, true);
65
-    let { thumbHeight, thumbWidth } = remoteVideo;
63
+    this.VideoLayout.resizeThumbnails(false, true);
66
 
64
 
67
     this.addAudioLevelIndicator();
65
     this.addAudioLevelIndicator();
68
 
66
 
429
         return;
427
         return;
430
 
428
 
431
     let streamElement = SmallVideo.createStreamElement(stream);
429
     let streamElement = SmallVideo.createStreamElement(stream);
432
-    let newElementId = streamElement.id;
433
 
430
 
434
     // Put new stream element always in front
431
     // Put new stream element always in front
435
     UIUtils.prependChild(this.container, streamElement);
432
     UIUtils.prependChild(this.container, streamElement);

+ 3
- 4
modules/UI/videolayout/SmallVideo.js 파일 보기

574
  * is added, and will fire a RESOLUTION_CHANGED event.
574
  * is added, and will fire a RESOLUTION_CHANGED event.
575
  */
575
  */
576
 SmallVideo.prototype.waitForResolutionChange = function() {
576
 SmallVideo.prototype.waitForResolutionChange = function() {
577
-    let self = this;
578
     let beforeChange = window.performance.now();
577
     let beforeChange = window.performance.now();
579
     let videos = this.selectVideoElement();
578
     let videos = this.selectVideoElement();
580
     if (!videos || !videos.length || videos.length <= 0)
579
     if (!videos || !videos.length || videos.length <= 0)
582
     let video = videos[0];
581
     let video = videos[0];
583
     let oldWidth = video.videoWidth;
582
     let oldWidth = video.videoWidth;
584
     let oldHeight = video.videoHeight;
583
     let oldHeight = video.videoHeight;
585
-    video.onresize = (event) => {
584
+    video.onresize = () => {
586
         if (video.videoWidth != oldWidth || video.videoHeight != oldHeight) {
585
         if (video.videoWidth != oldWidth || video.videoHeight != oldHeight) {
587
             // Only run once.
586
             // Only run once.
588
             video.onresize = null;
587
             video.onresize = null;
589
 
588
 
590
             let delay = window.performance.now() - beforeChange;
589
             let delay = window.performance.now() - beforeChange;
591
-            let emitter = self.VideoLayout.getEventEmitter();
590
+            let emitter = this.VideoLayout.getEventEmitter();
592
             if (emitter) {
591
             if (emitter) {
593
                 emitter.emit(
592
                 emitter.emit(
594
                         UIEvents.RESOLUTION_CHANGED,
593
                         UIEvents.RESOLUTION_CHANGED,
595
-                        self.getId(),
594
+                        this.getId(),
596
                         oldWidth + "x" + oldHeight,
595
                         oldWidth + "x" + oldHeight,
597
                         video.videoWidth + "x" + video.videoHeight,
596
                         video.videoWidth + "x" + video.videoHeight,
598
                         delay);
597
                         delay);

+ 1
- 6
modules/UI/videolayout/VideoContainer.js 파일 보기

139
  * @return an array with 2 elements, the horizontal indent and the vertical
139
  * @return an array with 2 elements, the horizontal indent and the vertical
140
  * indent
140
  * indent
141
  */
141
  */
142
-function getDesktopVideoPosition(videoWidth,
143
-                                 videoHeight,
144
-                                 videoSpaceWidth,
145
-                                 videoSpaceHeight) {
146
-
142
+function getDesktopVideoPosition(videoWidth, videoHeight, videoSpaceWidth) {
147
     let horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
143
     let horizontalIndent = (videoSpaceWidth - videoWidth) / 2;
148
 
144
 
149
     let verticalIndent = 0;// Top aligned
145
     let verticalIndent = 0;// Top aligned
428
             return Promise.resolve();
424
             return Promise.resolve();
429
         }
425
         }
430
 
426
 
431
-        let $wrapper = this.$wrapper;
432
         return new Promise((resolve) => {
427
         return new Promise((resolve) => {
433
             this.$wrapper.css('visibility', 'visible').fadeTo(
428
             this.$wrapper.css('visibility', 'visible').fadeTo(
434
                 FADE_DURATION_MS,
429
                 FADE_DURATION_MS,

+ 6
- 12
modules/UI/videolayout/VideoLayout.js 파일 보기

1
-/* global config, APP, $, interfaceConfig, JitsiMeetJS */
2
-/* jshint -W101 */
1
+/* global config, APP, $, interfaceConfig */
3
 
2
 
4
-import Avatar from "../avatar/Avatar";
5
 import FilmStrip from "./FilmStrip";
3
 import FilmStrip from "./FilmStrip";
6
 import UIEvents from "../../../service/UI/UIEvents";
4
 import UIEvents from "../../../service/UI/UIEvents";
7
 import UIUtil from "../util/UIUtil";
5
 import UIUtil from "../util/UIUtil";
9
 import RemoteVideo from "./RemoteVideo";
7
 import RemoteVideo from "./RemoteVideo";
10
 import LargeVideoManager  from "./LargeVideoManager";
8
 import LargeVideoManager  from "./LargeVideoManager";
11
 import {VIDEO_CONTAINER_TYPE} from "./VideoContainer";
9
 import {VIDEO_CONTAINER_TYPE} from "./VideoContainer";
12
-import {SHARED_VIDEO_CONTAINER_TYPE} from '../shared_video/SharedVideo';
13
 import LocalVideo from "./LocalVideo";
10
 import LocalVideo from "./LocalVideo";
14
 
11
 
15
-const RTCUIUtil = JitsiMeetJS.util.RTCUIHelper;
16
-
17
 var remoteVideos = {};
12
 var remoteVideos = {};
18
 var localVideoThumbnail = null;
13
 var localVideoThumbnail = null;
19
 
14
 
106
         localVideoThumbnail.setVideoType(VIDEO_CONTAINER_TYPE);
101
         localVideoThumbnail.setVideoType(VIDEO_CONTAINER_TYPE);
107
         // if we do not resize the thumbs here, if there is no video device
102
         // if we do not resize the thumbs here, if there is no video device
108
         // the local video thumb maybe one pixel
103
         // the local video thumb maybe one pixel
109
-        let { localVideo } = this.resizeThumbnails(false, true);
104
+        this.resizeThumbnails(false, true);
110
 
105
 
111
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
106
         emitter.addListener(UIEvents.CONTACT_CLICKED, onContactClicked);
112
         this.lastNCount = config.channelLastN;
107
         this.lastNCount = config.channelLastN;
316
     onRemoteStreamRemoved (stream) {
311
     onRemoteStreamRemoved (stream) {
317
         let id = stream.getParticipantId();
312
         let id = stream.getParticipantId();
318
         let remoteVideo = remoteVideos[id];
313
         let remoteVideo = remoteVideos[id];
319
-        if (remoteVideo) { // remote stream may be removed after participant left the conference
314
+        // Remote stream may be removed after participant left the conference.
315
+        if (remoteVideo) {
320
             remoteVideo.removeRemoteStreamElement(stream);
316
             remoteVideo.removeRemoteStreamElement(stream);
321
         }
317
         }
322
     },
318
     },
519
     resizeThumbnails (  animate = false,
515
     resizeThumbnails (  animate = false,
520
                         forceUpdate = false,
516
                         forceUpdate = false,
521
                         onComplete = null) {
517
                         onComplete = null) {
522
-
523
-        let { localVideo, remoteVideo }
518
+        const { localVideo, remoteVideo }
524
             = FilmStrip.calculateThumbnailSize();
519
             = FilmStrip.calculateThumbnailSize();
525
 
520
 
526
-        let {thumbWidth, thumbHeight} = remoteVideo;
527
-
528
         FilmStrip.resizeThumbnails(localVideo, remoteVideo,
521
         FilmStrip.resizeThumbnails(localVideo, remoteVideo,
529
             animate, forceUpdate)
522
             animate, forceUpdate)
530
             .then(function () {
523
             .then(function () {
653
      * @param {boolean} isActive true if the connection is ok or false when
646
      * @param {boolean} isActive true if the connection is ok or false when
654
      * the user is having connectivity issues.
647
      * the user is having connectivity issues.
655
      */
648
      */
649
+    // eslint-disable-next-line no-unused-vars
656
     onParticipantConnectionStatusChanged (id, isActive) {
650
     onParticipantConnectionStatusChanged (id, isActive) {
657
         // Show/hide warning on the large video
651
         // Show/hide warning on the large video
658
         if (this.isCurrentlyOnLarge(id)) {
652
         if (this.isCurrentlyOnLarge(id)) {

+ 0
- 2
modules/UI/welcome_page/WelcomePage.js 파일 보기

75
     });
75
     });
76
 
76
 
77
     if (interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE !== false) {
77
     if (interfaceConfig.GENERATE_ROOMNAMES_ON_WELCOME_PAGE !== false) {
78
-        var updateTimeout;
79
-        var animateTimeout;
80
         var selector = $("#reload_roomname");
78
         var selector = $("#reload_roomname");
81
         selector.click(function () {
79
         selector.click(function () {
82
             clearTimeout(updateTimeout);
80
             clearTimeout(updateTimeout);

+ 2
- 2
modules/config/HttpConfigFetch.js 파일 보기

32
                     var error = "Get config response status: " + textStatus;
32
                     var error = "Get config response status: " + textStatus;
33
                     complete(false, error);
33
                     complete(false, error);
34
                 },
34
                 },
35
-                success: function(data, textStatus, jqXHR) {
35
+                success: function(data) {
36
                     try {
36
                     try {
37
                         configUtil.overrideConfigJSON(
37
                         configUtil.overrideConfigJSON(
38
                             config, interfaceConfig, data);
38
                             config, interfaceConfig, data);
48
     }
48
     }
49
 };
49
 };
50
 
50
 
51
-module.exports = HttpConfig;
51
+module.exports = HttpConfig;

+ 1
- 1
modules/config/URLProcessor.js 파일 보기

1
-/* global $, $iq, config, interfaceConfig, getConfigParamsFromUrl */
1
+/* global config, interfaceConfig, getConfigParamsFromUrl */
2
 var configUtils = require('./Util');
2
 var configUtils = require('./Util');
3
 var params = {};
3
 var params = {};
4
 
4
 

+ 1
- 2
modules/config/Util.js 파일 보기

1
-/* global $ */
2
 var ConfigUtil = {
1
 var ConfigUtil = {
3
     /**
2
     /**
4
      * Method overrides JSON properties in <tt>config</tt> and
3
      * Method overrides JSON properties in <tt>config</tt> and
42
     }
41
     }
43
 };
42
 };
44
 
43
 
45
-module.exports = ConfigUtil;
44
+module.exports = ConfigUtil;

+ 0
- 2
modules/connectionquality/connectionquality.js 파일 보기

1
-/* global APP, require */
2
-/* jshint -W101 */
3
 import EventEmitter from "events";
1
 import EventEmitter from "events";
4
 
2
 
5
 import CQEvents from "../../service/connectionquality/CQEvents";
3
 import CQEvents from "../../service/connectionquality/CQEvents";

+ 2
- 2
modules/devices/mediaDeviceHelper.js 파일 보기

1
-/* global $, APP, JitsiMeetJS, config, interfaceConfig */
1
+/* global APP, JitsiMeetJS */
2
 
2
 
3
 let currentAudioInputDevices,
3
 let currentAudioInputDevices,
4
     currentVideoInputDevices,
4
     currentVideoInputDevices,
243
                 });
243
                 });
244
         }
244
         }
245
     }
245
     }
246
-};
246
+};

+ 2
- 3
modules/recorder/Recorder.js 파일 보기

1
-/* global APP, $, config */
1
+/* global APP, config */
2
 
2
 
3
 /**
3
 /**
4
  * The (name of the) command which transports the recorder info.
4
  * The (name of the) command which transports the recorder info.
26
         // which are to be followed so don't forget to removeCommand before
26
         // which are to be followed so don't forget to removeCommand before
27
         // sendCommand!
27
         // sendCommand!
28
         commands.removeCommand(_USER_INFO_COMMAND);
28
         commands.removeCommand(_USER_INFO_COMMAND);
29
-        var self = this;
30
         commands.sendCommand(
29
         commands.sendCommand(
31
             _USER_INFO_COMMAND,
30
             _USER_INFO_COMMAND,
32
             {
31
             {
38
     }
37
     }
39
 }
38
 }
40
 
39
 
41
-export default Recorder;
40
+export default Recorder;

+ 5
- 7
modules/translation/translation.js 파일 보기

3
 var languages = require("../../service/translation/languages");
3
 var languages = require("../../service/translation/languages");
4
 var DEFAULT_LANG = languages.EN;
4
 var DEFAULT_LANG = languages.EN;
5
 
5
 
6
-i18n.addPostProcessor("resolveAppName", function(value, key, options) {
7
-    return value.replace("__app__", interfaceConfig.APP_NAME);
8
-});
9
-
10
-
6
+i18n.addPostProcessor(
7
+    "resolveAppName",
8
+    value => value.replace("__app__", interfaceConfig.APP_NAME));
11
 
9
 
12
 var defaultOptions = {
10
 var defaultOptions = {
13
     detectLngQS: "lang",
11
     detectLngQS: "lang",
34
                                                  { lng: lng, ns: ns });
32
                                                  { lng: lng, ns: ns });
35
         i18n.functions.ajax({
33
         i18n.functions.ajax({
36
             url: url,
34
             url: url,
37
-            success: function(data, status, xhr) {
35
+            success: function(data) {
38
                 i18n.functions.log('loaded: ' + url);
36
                 i18n.functions.log('loaded: ' + url);
39
                 done(null, data);
37
                 done(null, data);
40
             },
38
             },
63
 //                localStorageExpirationTime: 86400000 // in ms, default 1 week
61
 //                localStorageExpirationTime: 86400000 // in ms, default 1 week
64
 };
62
 };
65
 
63
 
66
-function initCompleted(t) {
64
+function initCompleted() {
67
     $("[data-i18n]").i18n();
65
     $("[data-i18n]").i18n();
68
 }
66
 }
69
 
67
 

+ 2
- 1
package.json 파일 보기

44
     "babel-register": "*",
44
     "babel-register": "*",
45
     "clean-css": "*",
45
     "clean-css": "*",
46
     "css-loader": "*",
46
     "css-loader": "*",
47
+    "eslint": "*",
47
     "expose-loader": "*",
48
     "expose-loader": "*",
48
     "file-loader": "*",
49
     "file-loader": "*",
49
     "imports-loader": "*",
50
     "imports-loader": "*",
56
   },
57
   },
57
   "license": "Apache-2.0",
58
   "license": "Apache-2.0",
58
   "scripts": {
59
   "scripts": {
59
-    "lint": "jshint .",
60
+    "lint": "jshint . && eslint .",
60
     "validate": "npm ls"
61
     "validate": "npm ls"
61
   },
62
   },
62
   "pre-commit": [
63
   "pre-commit": [

+ 2
- 1
utils.js 파일 보기

9
 /**
9
 /**
10
  * Builds and returns the room name.
10
  * Builds and returns the room name.
11
  */
11
  */
12
-function getRoomName () {
12
+function getRoomName () { // eslint-disable-line no-unused-vars
13
     var path = window.location.pathname;
13
     var path = window.location.pathname;
14
     var roomName;
14
     var roomName;
15
 
15
 
42
  * @param dontParse if false or undefined some transformations
42
  * @param dontParse if false or undefined some transformations
43
  * (for parsing the value as JSON) are going to be executed
43
  * (for parsing the value as JSON) are going to be executed
44
  */
44
  */
45
+// eslint-disable-next-line no-unused-vars
45
 function getConfigParamsFromUrl(source, dontParse) {
46
 function getConfigParamsFromUrl(source, dontParse) {
46
     var paramStr = (source === "search")? location.search : location.hash;
47
     var paramStr = (source === "search")? location.search : location.hash;
47
     if (!paramStr)
48
     if (!paramStr)

+ 2
- 1
webpack.config.babel.js 파일 보기

1
+/* global __dirname */
2
+
1
 import process from 'process';
3
 import process from 'process';
2
-import webpack from 'webpack';
3
 
4
 
4
 const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
5
 const aui_css = __dirname + '/node_modules/@atlassian/aui/dist/aui/css/';
5
 const minimize
6
 const minimize

Loading…
취소
저장