Просмотр исходного кода

fix(eslint): Add indent rule

master
hristoterezov 8 лет назад
Родитель
Сommit
3e44723582
48 измененных файлов: 1538 добавлений и 1525 удалений
  1. 1
    0
      .eslintrc.js
  2. 94
    94
      JitsiConference.js
  3. 15
    15
      JitsiConferenceEventManager.js
  4. 4
    4
      JitsiConnection.js
  5. 6
    6
      JitsiMediaDevices.js
  6. 6
    6
      JitsiMeetJS.js
  7. 1
    1
      JitsiTrackError.js
  8. 18
    18
      doc/example/example.js
  9. 1
    1
      flow-typed/npm/flow-bin_v0.x.x.js
  10. 22
    22
      karma.conf.js
  11. 7
    7
      modules/RTC/DataChannels.js
  12. 23
    23
      modules/RTC/JitsiLocalTrack.js
  13. 18
    18
      modules/RTC/JitsiRemoteTrack.js
  14. 21
    21
      modules/RTC/JitsiTrack.js
  15. 15
    15
      modules/RTC/RTC.js
  16. 2
    2
      modules/RTC/RTCBrowserType.js
  17. 31
    31
      modules/RTC/RTCUtils.js
  18. 10
    10
      modules/RTC/ScreenObtainer.js
  19. 39
    39
      modules/RTC/TraceablePeerConnection.js
  20. 6
    6
      modules/TalkMutedDetection.js
  21. 7
    7
      modules/connectivity/ConnectionQuality.js
  22. 7
    7
      modules/statistics/CallStats.js
  23. 4
    4
      modules/statistics/LocalStatsCollector.js
  24. 31
    31
      modules/statistics/RTPStatsCollector.js
  25. 37
    37
      modules/statistics/statistics.js
  26. 1
    1
      modules/transcription/audioRecorder.js
  27. 3
    3
      modules/transcription/transcriber.js
  28. 2
    2
      modules/transcription/transcriptionServices/AbstractTranscriptionService.js
  29. 2
    2
      modules/util/EventEmitterForwarder.js
  30. 8
    8
      modules/util/GlobalOnErrorHandler.js
  31. 6
    6
      modules/util/ScriptUtil.js
  32. 419
    407
      modules/util/UsernameGenerator.js
  33. 29
    29
      modules/version/ComponentsVersions.js
  34. 7
    7
      modules/xmpp/Caps.js
  35. 77
    77
      modules/xmpp/ChatRoom.js
  36. 71
    71
      modules/xmpp/JingleSessionPC.js
  37. 6
    6
      modules/xmpp/RtxModifier.js
  38. 173
    173
      modules/xmpp/RtxModifier.spec.js
  39. 46
    46
      modules/xmpp/SDP.js
  40. 6
    6
      modules/xmpp/SDPDiffer.js
  41. 63
    63
      modules/xmpp/SDPUtil.js
  42. 2
    2
      modules/xmpp/SdpTransformUtil.js
  43. 2
    2
      modules/xmpp/moderator.js
  44. 49
    49
      modules/xmpp/recording.js
  45. 10
    10
      modules/xmpp/strophe.emuc.js
  46. 82
    82
      modules/xmpp/strophe.jingle.js
  47. 40
    40
      modules/xmpp/strophe.util.js
  48. 8
    8
      modules/xmpp/xmpp.js

+ 1
- 0
.eslintrc.js Просмотреть файл

@@ -79,6 +79,7 @@ module.exports = {
79 79
 
80 80
         // Stylistic issues group
81 81
         'brace-style': 2,
82
+        'indent': [ 'error', 4, { 'SwitchCase': 0 } ],
82 83
 
83 84
         'prefer-const': 2,
84 85
         'prefer-reflect': 0,

+ 94
- 94
JitsiConference.js Просмотреть файл

@@ -95,8 +95,8 @@ function JitsiConference(options) {
95 95
  */
96 96
 JitsiConference.prototype._init = function (options) {
97 97
     if (!options)        {
98
-options = {};
99
-}
98
+        options = {};
99
+    }
100 100
 
101 101
     // Override connection and xmpp properties (Usefull if the connection
102 102
     // reloaded)
@@ -153,8 +153,8 @@ options = {};
153 153
  */
154 154
 JitsiConference.prototype.join = function (password) {
155 155
     if (this.room)        {
156
-this.room.join(password);
157
-}
156
+        this.room.join(password);
157
+    }
158 158
 };
159 159
 
160 160
 /**
@@ -178,8 +178,8 @@ JitsiConference.prototype.leave = function () {
178 178
 
179 179
     this.rtc.closeAllDataChannels();
180 180
     if (this.statistics)        {
181
-this.statistics.dispose();
182
-}
181
+        this.statistics.dispose();
182
+    }
183 183
 
184 184
     // leave the conference
185 185
     if (this.room) {
@@ -298,8 +298,8 @@ JitsiConference.prototype.getLocalVideoTrack = function () {
298 298
  */
299 299
 JitsiConference.prototype.on = function (eventId, handler) {
300 300
     if (this.eventEmitter)        {
301
-this.eventEmitter.on(eventId, handler);
302
-}
301
+        this.eventEmitter.on(eventId, handler);
302
+    }
303 303
 };
304 304
 
305 305
 /**
@@ -311,8 +311,8 @@ this.eventEmitter.on(eventId, handler);
311 311
  */
312 312
 JitsiConference.prototype.off = function (eventId, handler) {
313 313
     if (this.eventEmitter)        {
314
-this.eventEmitter.removeListener(eventId, handler);
315
-}
314
+        this.eventEmitter.removeListener(eventId, handler);
315
+    }
316 316
 };
317 317
 
318 318
 // Common aliases for event emitter
@@ -325,21 +325,21 @@ JitsiConference.prototype.removeEventListener = JitsiConference.prototype.off;
325 325
  * @param command {String} the name of the command
326 326
  * @param handler {Function} handler for the command
327 327
  */
328
- JitsiConference.prototype.addCommandListener = function (command, handler) {
328
+JitsiConference.prototype.addCommandListener = function (command, handler) {
329 329
     if (this.room)        {
330
-this.room.addPresenceListener(command, handler);
331
-}
332
- };
330
+        this.room.addPresenceListener(command, handler);
331
+    }
332
+};
333 333
 
334 334
 /**
335 335
   * Removes command  listener
336 336
   * @param command {String} the name of the command
337 337
   */
338
- JitsiConference.prototype.removeCommandListener = function (command) {
338
+JitsiConference.prototype.removeCommandListener = function (command) {
339 339
     if (this.room)        {
340
-this.room.removePresenceListener(command);
341
-}
342
- };
340
+        this.room.removePresenceListener(command);
341
+    }
342
+};
343 343
 
344 344
 /**
345 345
  * Sends text message to the other participants in the conference
@@ -347,8 +347,8 @@ this.room.removePresenceListener(command);
347 347
  */
348 348
 JitsiConference.prototype.sendTextMessage = function (message) {
349 349
     if (this.room)        {
350
-this.room.sendMessage(message);
351
-}
350
+        this.room.sendMessage(message);
351
+    }
352 352
 };
353 353
 
354 354
 /**
@@ -379,8 +379,8 @@ JitsiConference.prototype.sendCommandOnce = function (name, values) {
379 379
  **/
380 380
 JitsiConference.prototype.removeCommand = function (name) {
381 381
     if (this.room)        {
382
-this.room.removeFromPresence(name);
383
-}
382
+        this.room.removeFromPresence(name);
383
+    }
384 384
 };
385 385
 
386 386
 /**
@@ -497,8 +497,8 @@ JitsiConference.prototype.onLocalTrackRemoved = function (track) {
497 497
     // FIXME: we assume we have only one screen sharing track
498 498
     // if we change this we need to fix this check
499 499
     if (track.isVideoTrack() && track.videoType === VideoType.DESKTOP)        {
500
-this.statistics.sendScreenSharingEvent(false);
501
-}
500
+        this.statistics.sendScreenSharingEvent(false);
501
+    }
502 502
 
503 503
     this.eventEmitter.emit(JitsiConferenceEvents.TRACK_REMOVED, track);
504 504
 };
@@ -636,8 +636,8 @@ JitsiConference.prototype._setupNewTrack = function (newTrack) {
636 636
     // FIXME: we assume we have only one screen sharing track
637 637
     // if we change this we need to fix this check
638 638
     if (newTrack.isVideoTrack() && newTrack.videoType === VideoType.DESKTOP)        {
639
-this.statistics.sendScreenSharingEvent(true);
640
-}
639
+        this.statistics.sendScreenSharingEvent(true);
640
+    }
641 641
 
642 642
     this.eventEmitter.emit(JitsiConferenceEvents.TRACK_ADDED, newTrack);
643 643
 };
@@ -655,15 +655,15 @@ this.statistics.sendScreenSharingEvent(true);
655 655
  */
656 656
 JitsiConference.prototype._addLocalStream
657 657
     = function (stream, callback, errorCallback, ssrcInfo, dontModifySources) {
658
-    if (this.jingleSession) {
659
-        this.jingleSession.addStream(
658
+        if (this.jingleSession) {
659
+            this.jingleSession.addStream(
660 660
             stream, callback, errorCallback, ssrcInfo, dontModifySources);
661
-    } else {
661
+        } else {
662 662
         // We are done immediately
663
-        logger.warn("Add local MediaStream - no JingleSession started yet");
664
-        callback();
665
-    }
666
-};
663
+            logger.warn("Add local MediaStream - no JingleSession started yet");
664
+            callback();
665
+        }
666
+    };
667 667
 
668 668
 /**
669 669
  * Remove local WebRTC media stream.
@@ -675,15 +675,15 @@ JitsiConference.prototype._addLocalStream
675 675
  */
676 676
 JitsiConference.prototype.removeLocalStream
677 677
     = function (stream, callback, errorCallback, ssrcInfo) {
678
-    if (this.jingleSession) {
679
-        this.jingleSession.removeStream(
678
+        if (this.jingleSession) {
679
+            this.jingleSession.removeStream(
680 680
             stream, callback, errorCallback, ssrcInfo);
681
-    } else {
681
+        } else {
682 682
         // We are done immediately
683
-        logger.warn("Remove local MediaStream - no JingleSession started yet");
684
-        callback();
685
-    }
686
-};
683
+            logger.warn("Remove local MediaStream - no JingleSession started yet");
684
+            callback();
685
+        }
686
+    };
687 687
 
688 688
 /**
689 689
  * Generate ssrc info object for a stream with the following properties:
@@ -722,20 +722,20 @@ JitsiConference.prototype.isModerator = function () {
722 722
  * @returns {Promise}
723 723
  */
724 724
 JitsiConference.prototype.lock = function (password) {
725
-  if (!this.isModerator()) {
726
-    return Promise.reject();
727
-  }
728
-
729
-  var conference = this;
730
-  return new Promise(function (resolve, reject) {
731
-    conference.room.lockRoom(password || "", function () {
732
-      resolve();
733
-    }, function (err) {
734
-      reject(err);
735
-    }, function () {
736
-      reject(JitsiConferenceErrors.PASSWORD_NOT_SUPPORTED);
725
+    if (!this.isModerator()) {
726
+        return Promise.reject();
727
+    }
728
+
729
+    var conference = this;
730
+    return new Promise(function (resolve, reject) {
731
+        conference.room.lockRoom(password || "", function () {
732
+            resolve();
733
+        }, function (err) {
734
+            reject(err);
735
+        }, function () {
736
+            reject(JitsiConferenceErrors.PASSWORD_NOT_SUPPORTED);
737
+        });
737 738
     });
738
-  });
739 739
 };
740 740
 
741 741
 /**
@@ -743,7 +743,7 @@ JitsiConference.prototype.lock = function (password) {
743 743
  * @returns {Promise}
744 744
  */
745 745
 JitsiConference.prototype.unlock = function () {
746
-  return this.lock();
746
+    return this.lock();
747 747
 };
748 748
 
749 749
 /**
@@ -805,13 +805,13 @@ JitsiConference.prototype.getParticipants = function() {
805 805
 JitsiConference.prototype.getParticipantCount
806 806
     = function(countHidden = false) {
807 807
 
808
-    let participants = this.getParticipants();
809
-    if (!countHidden) {
810
-        participants = participants.filter(p => !p.isHidden());
811
-    }
808
+        let participants = this.getParticipants();
809
+        if (!countHidden) {
810
+            participants = participants.filter(p => !p.isHidden());
811
+        }
812 812
     // Add one for the local participant.
813
-    return participants.length + 1;
814
-};
813
+        return participants.length + 1;
814
+    };
815 815
 
816 816
 /**
817 817
  * @returns {JitsiParticipant} the participant in this conference with the
@@ -859,24 +859,24 @@ JitsiConference.prototype.muteParticipant = function (id) {
859 859
  */
860 860
 JitsiConference.prototype.onMemberJoined
861 861
     = function (jid, nick, role, isHidden) {
862
-    var id = Strophe.getResourceFromJid(jid);
863
-    if (id === 'focus' || this.myUserId() === id) {
864
-       return;
865
-    }
866
-    var participant = new JitsiParticipant(jid, this, nick, isHidden);
867
-    participant._role = role;
868
-    this.participants[id] = participant;
869
-    this.eventEmitter.emit(JitsiConferenceEvents.USER_JOINED, id, participant);
870
-    this.xmpp.caps.getFeatures(jid).then(features => {
871
-        participant._supportsDTMF = features.has("urn:xmpp:jingle:dtmf:0");
872
-        this.updateDTMFSupport();
873
-    }, error => logger.error(error));
874
-};
862
+        var id = Strophe.getResourceFromJid(jid);
863
+        if (id === 'focus' || this.myUserId() === id) {
864
+            return;
865
+        }
866
+        var participant = new JitsiParticipant(jid, this, nick, isHidden);
867
+        participant._role = role;
868
+        this.participants[id] = participant;
869
+        this.eventEmitter.emit(JitsiConferenceEvents.USER_JOINED, id, participant);
870
+        this.xmpp.caps.getFeatures(jid).then(features => {
871
+            participant._supportsDTMF = features.has("urn:xmpp:jingle:dtmf:0");
872
+            this.updateDTMFSupport();
873
+        }, error => logger.error(error));
874
+    };
875 875
 
876 876
 JitsiConference.prototype.onMemberLeft = function (jid) {
877 877
     var id = Strophe.getResourceFromJid(jid);
878 878
     if (id === 'focus' || this.myUserId() === id) {
879
-       return;
879
+        return;
880 880
     }
881 881
     var participant = this.participants[id];
882 882
     delete this.participants[id];
@@ -889,9 +889,9 @@ JitsiConference.prototype.onMemberLeft = function (jid) {
889 889
 
890 890
     // there can be no participant in case the member that left is focus
891 891
     if (participant)        {
892
-this.eventEmitter.emit(
892
+        this.eventEmitter.emit(
893 893
             JitsiConferenceEvents.USER_LEFT, id, participant);
894
-}
894
+    }
895 895
 };
896 896
 
897 897
 JitsiConference.prototype.onUserRoleChanged = function (jid, role) {
@@ -912,8 +912,8 @@ JitsiConference.prototype.onDisplayNameChanged = function (jid, displayName) {
912 912
     }
913 913
 
914 914
     if (participant._displayName === displayName)        {
915
-return;
916
-}
915
+        return;
916
+    }
917 917
 
918 918
     participant._displayName = displayName;
919 919
     this.eventEmitter.emit(JitsiConferenceEvents.DISPLAY_NAME_CHANGED, id, displayName);
@@ -1231,8 +1231,8 @@ JitsiConference.prototype.sendTones = function (tones, duration, pause) {
1231 1231
  */
1232 1232
 JitsiConference.prototype.isRecordingSupported = function () {
1233 1233
     if (this.room)        {
1234
-return this.room.isRecordingSupported();
1235
-}
1234
+        return this.room.isRecordingSupported();
1235
+    }
1236 1236
     return false;
1237 1237
 };
1238 1238
 
@@ -1256,11 +1256,11 @@ JitsiConference.prototype.getRecordingURL = function () {
1256 1256
  */
1257 1257
 JitsiConference.prototype.toggleRecording = function (options) {
1258 1258
     if (this.room)        {
1259
-return this.room.toggleRecording(options, function (status, error) {
1259
+        return this.room.toggleRecording(options, function (status, error) {
1260 1260
             this.eventEmitter.emit(
1261 1261
                 JitsiConferenceEvents.RECORDER_STATE_CHANGED, status, error);
1262 1262
         }.bind(this));
1263
-}
1263
+    }
1264 1264
     this.eventEmitter.emit(
1265 1265
         JitsiConferenceEvents.RECORDER_STATE_CHANGED, "error",
1266 1266
         new Error("The conference is not created yet!"));
@@ -1271,8 +1271,8 @@ return this.room.toggleRecording(options, function (status, error) {
1271 1271
  */
1272 1272
 JitsiConference.prototype.isSIPCallingSupported = function () {
1273 1273
     if (this.room)        {
1274
-return this.room.isSIPCallingSupported();
1275
-}
1274
+        return this.room.isSIPCallingSupported();
1275
+    }
1276 1276
     return false;
1277 1277
 };
1278 1278
 
@@ -1282,11 +1282,11 @@ return this.room.isSIPCallingSupported();
1282 1282
  */
1283 1283
 JitsiConference.prototype.dial = function (number) {
1284 1284
     if (this.room)        {
1285
-return this.room.dial(number);
1286
-}
1285
+        return this.room.dial(number);
1286
+    }
1287 1287
     return new Promise(function(resolve, reject){
1288 1288
         reject(new Error("The conference is not created yet!"));
1289
-});
1289
+    });
1290 1290
 };
1291 1291
 
1292 1292
 /**
@@ -1294,11 +1294,11 @@ return this.room.dial(number);
1294 1294
  */
1295 1295
 JitsiConference.prototype.hangup = function () {
1296 1296
     if (this.room)        {
1297
-return this.room.hangup();
1298
-}
1297
+        return this.room.hangup();
1298
+    }
1299 1299
     return new Promise(function(resolve, reject){
1300 1300
         reject(new Error("The conference is not created yet!"));
1301
-});
1301
+    });
1302 1302
 };
1303 1303
 
1304 1304
 /**
@@ -1306,8 +1306,8 @@ return this.room.hangup();
1306 1306
  */
1307 1307
 JitsiConference.prototype.getPhoneNumber = function () {
1308 1308
     if (this.room)        {
1309
-return this.room.getPhoneNumber();
1310
-}
1309
+        return this.room.getPhoneNumber();
1310
+    }
1311 1311
     return null;
1312 1312
 };
1313 1313
 
@@ -1316,8 +1316,8 @@ return this.room.getPhoneNumber();
1316 1316
  */
1317 1317
 JitsiConference.prototype.getPhonePin = function () {
1318 1318
     if (this.room)        {
1319
-return this.room.getPhonePin();
1320
-}
1319
+        return this.room.getPhonePin();
1320
+    }
1321 1321
     return null;
1322 1322
 };
1323 1323
 

+ 15
- 15
JitsiConferenceEventManager.js Просмотреть файл

@@ -24,8 +24,8 @@ function JitsiConferenceEventManager(conference) {
24 24
     conference.on(JitsiConferenceEvents.TRACK_MUTE_CHANGED,
25 25
         function (track) {
26 26
             if(!track.isLocal() || !conference.statistics)                {
27
-return;
28
-}
27
+                return;
28
+            }
29 29
             conference.statistics.sendMuteEvent(track.isMuted(),
30 30
                 track.getType());
31 31
         });
@@ -83,7 +83,7 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function () {
83 83
                 Statistics.analytics.sendEvent('xmpp.' + key,
84 84
                     {value: value});
85 85
             }
86
-    });
86
+        });
87 87
 
88 88
     this.chatRoomForwarder.forward(XMPPEvents.ROOM_JOIN_ERROR,
89 89
         JitsiConferenceEvents.CONFERENCE_FAILED,
@@ -510,12 +510,12 @@ JitsiConferenceEventManager.prototype.setupXMPPListeners = function () {
510 510
             // Jicofo
511 511
             conference.getLocalTracks().forEach(function (track) {
512 512
                 switch (track.getType()) {
513
-                    case MediaType.AUDIO:
514
-                        conference.startAudioMuted && track.mute();
515
-                        break;
516
-                    case MediaType.VIDEO:
517
-                        conference.startVideoMuted && track.mute();
518
-                        break;
513
+                case MediaType.AUDIO:
514
+                    conference.startAudioMuted && track.mute();
515
+                    break;
516
+                case MediaType.VIDEO:
517
+                    conference.startVideoMuted && track.mute();
518
+                    break;
519 519
                 }
520 520
             });
521 521
 
@@ -529,14 +529,14 @@ JitsiConferenceEventManager.prototype.setupXMPPListeners = function () {
529 529
 JitsiConferenceEventManager.prototype.setupStatisticsListeners = function () {
530 530
     var conference = this.conference;
531 531
     if(!conference.statistics)        {
532
-return;
533
-}
532
+        return;
533
+    }
534 534
 
535 535
     conference.statistics.addAudioLevelListener(function (ssrc, level) {
536 536
         var resource = conference.rtc.getResourceBySSRC(ssrc);
537 537
         if (!resource)            {
538
-return;
539
-}
538
+            return;
539
+        }
540 540
 
541 541
         conference.rtc.setAudioLevel(resource, level);
542 542
     });
@@ -582,8 +582,8 @@ return;
582 582
         conference.getLocalTracks(MediaType.AUDIO).forEach(function (track) {
583 583
             const ssrc = track.getSSRC();
584 584
             if (!ssrc || !stats.hasOwnProperty(ssrc))                {
585
-return;
586
-}
585
+                return;
586
+            }
587 587
 
588 588
             track._setByteSent(stats[ssrc]);
589 589
         });

+ 4
- 4
JitsiConnection.js Просмотреть файл

@@ -30,9 +30,9 @@ function JitsiConnection(appID, token, options) {
30 30
             // and then there are no msgs, but we want to log only disconnects
31 31
             // when there is real error
32 32
             if(msg)                {
33
-Statistics.analytics.sendEvent(
33
+                Statistics.analytics.sendEvent(
34 34
                     'connection.disconnected.' + msg);
35
-}
35
+            }
36 36
             Statistics.sendLog(
37 37
                 JSON.stringify({id: "connection.disconnected", msg: msg}));
38 38
         });
@@ -45,8 +45,8 @@ Statistics.analytics.sendEvent(
45 45
  */
46 46
 JitsiConnection.prototype.connect = function (options) {
47 47
     if(!options)        {
48
-options = {};
49
-}
48
+        options = {};
49
+    }
50 50
 
51 51
     this.xmpp.connect(options.id, options.password);
52 52
 };

+ 6
- 6
JitsiMediaDevices.js Просмотреть файл

@@ -73,12 +73,12 @@ var JitsiMediaDevices = {
73 73
         var permissions = RTC.getDeviceAvailability();
74 74
 
75 75
         switch(type) {
76
-            case MediaType.VIDEO:
77
-                return permissions.video === true;
78
-            case MediaType.AUDIO:
79
-                return permissions.audio === true;
80
-            default:
81
-                return permissions.video === true && permissions.audio === true;
76
+        case MediaType.VIDEO:
77
+            return permissions.video === true;
78
+        case MediaType.AUDIO:
79
+            return permissions.audio === true;
80
+        default:
81
+            return permissions.video === true && permissions.audio === true;
82 82
         }
83 83
     },
84 84
     /**

+ 6
- 6
JitsiMeetJS.js Просмотреть файл

@@ -32,8 +32,8 @@ var USER_MEDIA_PERMISSION_PROMPT_TIMEOUT = 500;
32 32
 
33 33
 function getLowerResolution(resolution) {
34 34
     if(!Resolutions[resolution])        {
35
-return null;
36
-}
35
+        return null;
36
+    }
37 37
     var order = Resolutions[resolution].order;
38 38
     var res = null;
39 39
     var resName = null;
@@ -225,8 +225,8 @@ var LibJitsiMeet = {
225 225
         }
226 226
 
227 227
         if(!window.connectionTimes)            {
228
-window.connectionTimes = {};
229
-}
228
+            window.connectionTimes = {};
229
+        }
230 230
         window.connectionTimes["obtainPermissions.start"] =
231 231
             window.performance.now();
232 232
 
@@ -241,7 +241,7 @@ window.connectionTimes = {};
241 241
                     "getUserMedia.success", options), {value: options});
242 242
 
243 243
                 if(!RTC.options.disableAudioLevels)                    {
244
-for(let i = 0; i < tracks.length; i++) {
244
+                    for(let i = 0; i < tracks.length; i++) {
245 245
                         const track = tracks[i];
246 246
                         var mStream = track.getOriginalStream();
247 247
                         if(track.getType() === MediaType.AUDIO){
@@ -254,7 +254,7 @@ for(let i = 0; i < tracks.length; i++) {
254 254
                                 });
255 255
                         }
256 256
                     }
257
-}
257
+                }
258 258
 
259 259
                 // set real device ids
260 260
                 var currentlyAvailableMediaDevices

+ 1
- 1
JitsiTrackError.js Просмотреть файл

@@ -132,7 +132,7 @@ function JitsiTrackError(error, options, devices) {
132 132
 }
133 133
 
134 134
 JitsiTrackError.prototype = Object.create(Error.prototype);
135
- JitsiTrackError.prototype.constructor = JitsiTrackError;
135
+JitsiTrackError.prototype.constructor = JitsiTrackError;
136 136
 
137 137
 /**
138 138
  * Gets failed resolution constraint from corresponding object.

+ 18
- 18
doc/example/example.js Просмотреть файл

@@ -46,8 +46,8 @@ function onLocalTracks(tracks){
46 46
             localTracks[i].attach($("#localAudio" + i)[0]);
47 47
         }
48 48
         if(isJoined)            {
49
-room.addTrack(localTracks[i]);
50
-}
49
+            room.addTrack(localTracks[i]);
50
+        }
51 51
     }
52 52
 }
53 53
 
@@ -57,12 +57,12 @@ room.addTrack(localTracks[i]);
57 57
  */
58 58
 function onRemoteTrack(track) {
59 59
     if(track.isLocal())        {
60
-return;
61
-}
60
+        return;
61
+    }
62 62
     var participant = track.getParticipantId();
63 63
     if(!remoteTracks[participant])        {
64
-remoteTracks[participant] = [];
65
-}
64
+        remoteTracks[participant] = [];
65
+    }
66 66
     var idx = remoteTracks[participant].push(track);
67 67
     track.addEventListener(JitsiMeetJS.events.track.TRACK_AUDIO_LEVEL_CHANGED,
68 68
         function (audioLevel) {
@@ -96,19 +96,19 @@ function onConferenceJoined () {
96 96
     console.log("conference joined!");
97 97
     isJoined = true;
98 98
     for(var i = 0; i < localTracks.length; i++)        {
99
-room.addTrack(localTracks[i]);
100
-}
99
+        room.addTrack(localTracks[i]);
100
+    }
101 101
 }
102 102
 
103 103
 function onUserLeft(id) {
104 104
     console.log("user left");
105 105
     if(!remoteTracks[id])        {
106
-return;
107
-}
106
+        return;
107
+    }
108 108
     var tracks = remoteTracks[id];
109 109
     for(var i = 0; i< tracks.length; i++)        {
110
-tracks[i].detach($("#" + id + tracks[i].getType()));
111
-}
110
+        tracks[i].detach($("#" + id + tracks[i].getType()));
111
+    }
112 112
 }
113 113
 
114 114
 /**
@@ -122,8 +122,8 @@ function onConnectionSuccess(){
122 122
     });
123 123
     room.on(JitsiMeetJS.events.conference.CONFERENCE_JOINED, onConferenceJoined);
124 124
     room.on(JitsiMeetJS.events.conference.USER_JOINED, function(id){
125
- console.log("user join");remoteTracks[id] = [];
126
-});
125
+        console.log("user join");remoteTracks[id] = [];
126
+    });
127 127
     room.on(JitsiMeetJS.events.conference.USER_LEFT, onUserLeft);
128 128
     room.on(JitsiMeetJS.events.conference.TRACK_MUTE_CHANGED, function (track) {
129 129
         console.log(track.getType() + " - " + track.isMuted());
@@ -174,8 +174,8 @@ function disconnect(){
174 174
 
175 175
 function unload() {
176 176
     for(var i = 0; i < localTracks.length; i++)        {
177
-localTracks[i].stop();
178
-}
177
+        localTracks[i].stop();
178
+    }
179 179
     room.leave();
180 180
     connection.disconnect();
181 181
 }
@@ -260,8 +260,8 @@ JitsiMeetJS.init(initOptions).then(function(){
260 260
 if (JitsiMeetJS.mediaDevices.isDeviceChangeAvailable('output')) {
261 261
     JitsiMeetJS.mediaDevices.enumerateDevices(function(devices) {
262 262
         var audioOutputDevices = devices.filter(function(d) {
263
- return d.kind === 'audiooutput'; 
264
-});
263
+            return d.kind === 'audiooutput'; 
264
+        });
265 265
 
266 266
         if (audioOutputDevices.length > 1) {
267 267
             $('#audioOutputSelect').html(

+ 1
- 1
flow-typed/npm/flow-bin_v0.x.x.js Просмотреть файл

@@ -2,5 +2,5 @@
2 2
 // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x
3 3
 
4 4
 declare module "flow-bin" {
5
-  declare module.exports: string;
5
+    declare module.exports: string;
6 6
 }

+ 22
- 22
karma.conf.js Просмотреть файл

@@ -2,73 +2,73 @@
2 2
 // Generated on Wed Dec 07 2016 14:40:28 GMT-0800 (PST)
3 3
 
4 4
 module.exports = function(config) {
5
-  config.set({
5
+    config.set({
6 6
 
7 7
     // base path that will be used to resolve all patterns (eg. files, exclude)
8
-    basePath: '',
8
+        basePath: '',
9 9
 
10 10
 
11 11
     // frameworks to use
12 12
     // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13
-    frameworks: ['jasmine'],
13
+        frameworks: ['jasmine'],
14 14
 
15 15
 
16 16
     // list of files / patterns to load in the browser
17
-    files: [
18
-        './JitsiMeetJS.js',
19
-        './modules/**/*.spec.js',
20
-    ],
17
+        files: [
18
+            './JitsiMeetJS.js',
19
+            './modules/**/*.spec.js',
20
+        ],
21 21
 
22 22
 
23 23
     // list of files to exclude
24
-    exclude: [
25
-    ],
24
+        exclude: [
25
+        ],
26 26
 
27 27
 
28 28
     // preprocess matching files before serving them to the browser
29 29
     // available preprocessors: 
30 30
     //  https://npmjs.org/browse/keyword/karma-preprocessor
31
-    preprocessors: {
32
-        './JitsiMeetJS.js': ['webpack'],
33
-        './**/*.spec.js': ['webpack']
34
-    },
31
+        preprocessors: {
32
+            './JitsiMeetJS.js': ['webpack'],
33
+            './**/*.spec.js': ['webpack']
34
+        },
35 35
 
36 36
 
37 37
     // test results reporter to use
38 38
     // possible values: 'dots', 'progress'
39 39
     // available reporters: https://npmjs.org/browse/keyword/karma-reporter
40
-    reporters: ['progress'],
40
+        reporters: ['progress'],
41 41
 
42 42
 
43 43
     // web server port
44
-    port: 9876,
44
+        port: 9876,
45 45
 
46 46
 
47 47
     // enable / disable colors in the output (reporters and logs)
48
-    colors: true,
48
+        colors: true,
49 49
 
50 50
 
51 51
     // level of logging
52 52
     // possible values: config.LOG_DISABLE || config.LOG_ERROR || 
53 53
     //  config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
54
-    logLevel: config.LOG_INFO,
54
+        logLevel: config.LOG_INFO,
55 55
 
56 56
 
57 57
     // enable / disable watching file and executing tests whenever 
58 58
     // any file changes
59
-    autoWatch: false,
59
+        autoWatch: false,
60 60
 
61 61
 
62 62
     // start these browsers
63 63
     // available browser launchers: 
64 64
     // https://npmjs.org/browse/keyword/karma-launcher
65
-    browsers: ['Chrome'],
65
+        browsers: ['Chrome'],
66 66
 
67 67
 
68 68
     // Continuous Integration mode
69 69
     // if true, Karma captures browsers, runs the tests and exits
70
-    singleRun: false,
70
+        singleRun: false,
71 71
 
72
-	webpack: require("./webpack.config.js"),
73
-  });
72
+        webpack: require("./webpack.config.js"),
73
+    });
74 74
 };

+ 7
- 7
modules/RTC/DataChannels.js Просмотреть файл

@@ -158,8 +158,8 @@ DataChannels.prototype.onDataChannel = function (event) {
158 158
         logger.info("The Data Channel closed", dataChannel);
159 159
         var idx = self._dataChannels.indexOf(dataChannel);
160 160
         if (idx > -1)            {
161
-self._dataChannels = self._dataChannels.splice(idx, 1);
162
-}
161
+            self._dataChannels = self._dataChannels.splice(idx, 1);
162
+        }
163 163
     };
164 164
     this._dataChannels.push(dataChannel);
165 165
 };
@@ -236,10 +236,10 @@ DataChannels.prototype._some = function (callback, thisArg) {
236 236
 
237 237
     if (dataChannels && dataChannels.length !== 0) {
238 238
         if (thisArg)            {
239
-return dataChannels.some(callback, thisArg);
240
-}        else            {
241
-return dataChannels.some(callback);
242
-}
239
+            return dataChannels.some(callback, thisArg);
240
+        }        else            {
241
+            return dataChannels.some(callback);
242
+        }
243 243
     } else {
244 244
         return false;
245 245
     }
@@ -255,7 +255,7 @@ return dataChannels.some(callback);
255 255
 DataChannels.prototype.send = function (jsonObject) {
256 256
     if(!this._some(function (dataChannel) {
257 257
         if (dataChannel.readyState == 'open') {
258
-                dataChannel.send(JSON.stringify(jsonObject));
258
+            dataChannel.send(JSON.stringify(jsonObject));
259 259
             return true;
260 260
         }
261 261
     })) {

+ 23
- 23
modules/RTC/JitsiLocalTrack.js Просмотреть файл

@@ -35,9 +35,9 @@ function JitsiLocalTrack(stream, track, mediaType, videoType, resolution,
35 35
         null /* RTC */, stream, track,
36 36
         function () {
37 37
             if(!this.dontFireRemoveEvent)                {
38
-this.eventEmitter.emit(
38
+                this.eventEmitter.emit(
39 39
                     JitsiTrackEvents.LOCAL_TRACK_STOPPED);
40
-}
40
+            }
41 41
             this.dontFireRemoveEvent = false;
42 42
         }.bind(this) /* inactiveHandler */,
43 43
         mediaType, videoType, null /* ssrc */);
@@ -47,8 +47,8 @@ this.eventEmitter.emit(
47 47
     // FIXME: currently firefox is ignoring our constraints about resolutions
48 48
     // so we do not store it, to avoid wrong reporting of local track resolution
49 49
     if (RTCBrowserType.isFirefox())        {
50
-this.resolution = null;
51
-}
50
+        this.resolution = null;
51
+    }
52 52
 
53 53
     this.deviceId = deviceId;
54 54
     this.startMuted = false;
@@ -185,8 +185,8 @@ JitsiLocalTrack.prototype._clearNoDataFromSourceMuteResources = function () {
185 185
 JitsiLocalTrack.prototype._onNoDataFromSourceError = function () {
186 186
     this._clearNoDataFromSourceMuteResources();
187 187
     if(this._checkForCameraIssues())        {
188
-this._fireNoDataFromSourceEvent();
189
-}
188
+        this._fireNoDataFromSourceEvent();
189
+    }
190 190
 };
191 191
 
192 192
 /**
@@ -296,8 +296,8 @@ JitsiLocalTrack.prototype._setMute = function (mute) {
296 296
         this.videoType === VideoType.DESKTOP ||
297 297
         RTCBrowserType.isFirefox()) {
298 298
         if(this.track)            {
299
-this.track.enabled = !mute;
300
-}
299
+            this.track.enabled = !mute;
300
+        }
301 301
     } else {
302 302
         if(mute) {
303 303
             this.dontFireRemoveEvent = true;
@@ -320,8 +320,8 @@ this.track.enabled = !mute;
320 320
                 facingMode: this.getCameraFacingMode()
321 321
             };
322 322
             if (this.resolution)                {
323
-streamOptions.resolution = this.resolution;
324
-}
323
+                streamOptions.resolution = this.resolution;
324
+            }
325 325
 
326 326
             promise = RTCUtils.obtainAudioAndVideoPermissions(streamOptions)
327 327
                 .then(function (streamsInfo) {
@@ -350,7 +350,7 @@ streamOptions.resolution = this.resolution;
350 350
                         return RTCUtils.attachMediaStream(cont, self.stream);
351 351
                     });
352 352
 
353
-                   return self._addStreamToConferenceAsUnmute();
353
+                    return self._addStreamToConferenceAsUnmute();
354 354
                 });
355 355
         }
356 356
     }
@@ -480,8 +480,8 @@ JitsiLocalTrack.prototype.dispose = function () {
480 480
 JitsiLocalTrack.prototype.isMuted = function () {
481 481
     // this.stream will be null when we mute local video on Chrome
482 482
     if (!this.stream)        {
483
-return true;
484
-}
483
+        return true;
484
+    }
485 485
     if (this.isVideoTrack() && !this.isActive()) {
486 486
         return true;
487 487
     } else {
@@ -524,12 +524,12 @@ JitsiLocalTrack.prototype._setConference = function(conference) {
524 524
  */
525 525
 JitsiLocalTrack.prototype.getSSRC = function () {
526 526
     if(this.ssrc && this.ssrc.groups && this.ssrc.groups.length)        {
527
-return this.ssrc.groups[0].ssrcs[0];
528
-}    else if(this.ssrc && this.ssrc.ssrcs && this.ssrc.ssrcs.length)        {
529
-return this.ssrc.ssrcs[0];
530
-}    else        {
531
-return null;
532
-}
527
+        return this.ssrc.groups[0].ssrcs[0];
528
+    }    else if(this.ssrc && this.ssrc.ssrcs && this.ssrc.ssrcs.length)        {
529
+        return this.ssrc.ssrcs[0];
530
+    }    else        {
531
+        return null;
532
+    }
533 533
 };
534 534
 
535 535
 /**
@@ -628,8 +628,8 @@ JitsiLocalTrack.prototype._stopMediaStream = function () {
628 628
 JitsiLocalTrack.prototype._checkForCameraIssues = function () {
629 629
     if(!this.isVideoTrack() || this.stopStreamInProgress ||
630 630
         this.videoType === VideoType.DESKTOP)        {
631
-return false;
632
-}
631
+        return false;
632
+    }
633 633
 
634 634
     return !this._isReceivingData();
635 635
 };
@@ -645,8 +645,8 @@ return false;
645 645
  */
646 646
 JitsiLocalTrack.prototype._isReceivingData = function () {
647 647
     if(!this.stream)        {
648
-return false;
649
-}
648
+        return false;
649
+    }
650 650
     // In older version of the spec there is no muted property and
651 651
     // readyState can have value muted. In the latest versions
652 652
     // readyState can have values "live" and "ended" and there is

+ 18
- 18
modules/RTC/JitsiRemoteTrack.js Просмотреть файл

@@ -38,8 +38,8 @@ function JitsiRemoteTrack(rtc, conference, ownerEndpointId, stream, track,
38 38
     this.hasBeenMuted = muted;
39 39
     // Bind 'onmute' and 'onunmute' event handlers
40 40
     if (this.rtc && this.track)        {
41
-this._bindMuteHandlers();
42
-}
41
+        this._bindMuteHandlers();
42
+    }
43 43
 }
44 44
 
45 45
 JitsiRemoteTrack.prototype = Object.create(JitsiTrack.prototype);
@@ -78,17 +78,17 @@ JitsiRemoteTrack.prototype._bindMuteHandlers = function() {
78 78
  */
79 79
 JitsiRemoteTrack.prototype.setMute = function (value) {
80 80
     if(this.muted === value)        {
81
-return;
82
-}
81
+        return;
82
+    }
83 83
 
84 84
     if(value)        {
85
-this.hasBeenMuted = true;
86
-}
85
+        this.hasBeenMuted = true;
86
+    }
87 87
 
88 88
     // we can have a fake video stream
89 89
     if(this.stream)        {
90
-this.stream.muted = value;
91
-}
90
+        this.stream.muted = value;
91
+    }
92 92
 
93 93
     this.muted = value;
94 94
     this.eventEmitter.emit(JitsiTrackEvents.TRACK_MUTE_CHANGED, this);
@@ -133,8 +133,8 @@ JitsiRemoteTrack.prototype.getSSRC = function () {
133 133
  */
134 134
 JitsiRemoteTrack.prototype._setVideoType = function (type) {
135 135
     if(this.videoType === type)        {
136
-return;
137
-}
136
+        return;
137
+    }
138 138
     this.videoType = type;
139 139
     this.eventEmitter.emit(JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED, type);
140 140
 };
@@ -155,8 +155,8 @@ JitsiRemoteTrack.prototype._playCallback = function () {
155 155
     console.log("(TIME) TTFM " + type + ":\t", ttfm);
156 156
     var eventName = type +'.ttfm';
157 157
     if(this.hasBeenMuted)        {
158
-eventName += '.muted';
159
-}
158
+        eventName += '.muted';
159
+    }
160 160
     Statistics.analytics.sendEvent(eventName, {value: ttfm});
161 161
 };
162 162
 
@@ -171,15 +171,15 @@ eventName += '.muted';
171 171
 JitsiRemoteTrack.prototype._attachTTFMTracker = function (container) {
172 172
     if((ttfmTrackerAudioAttached && this.isAudioTrack())
173 173
         || (ttfmTrackerVideoAttached && this.isVideoTrack()))        {
174
-return;
175
-}
174
+        return;
175
+    }
176 176
 
177 177
     if (this.isAudioTrack())        {
178
-ttfmTrackerAudioAttached = true;
179
-}
178
+        ttfmTrackerAudioAttached = true;
179
+    }
180 180
     if (this.isVideoTrack())        {
181
-ttfmTrackerVideoAttached = true;
182
-}
181
+        ttfmTrackerVideoAttached = true;
182
+    }
183 183
 
184 184
     if (RTCBrowserType.isTemasysPluginUsed()) {
185 185
         // XXX Don't require Temasys unless it's to be used because it doesn't

+ 21
- 21
modules/RTC/JitsiTrack.js Просмотреть файл

@@ -27,8 +27,8 @@ function implementOnEndedHandling(jitsiTrack) {
27 27
     var stream = jitsiTrack.getOriginalStream();
28 28
 
29 29
     if(!stream)        {
30
-return;
31
-}
30
+        return;
31
+    }
32 32
 
33 33
     var originalStop = stream.stop;
34 34
     stream.stop = function () {
@@ -47,10 +47,10 @@ return;
47 47
 function addMediaStreamInactiveHandler(mediaStream, handler) {
48 48
     // Temasys will use onended
49 49
     if(typeof mediaStream.active !== "undefined")        {
50
-mediaStream.oninactive = handler;
51
-}    else        {
52
-mediaStream.onended = handler;
53
-}
50
+        mediaStream.oninactive = handler;
51
+    }    else        {
52
+        mediaStream.onended = handler;
53
+    }
54 54
 }
55 55
 
56 56
 /**
@@ -103,8 +103,8 @@ function JitsiTrack(conference, stream, track, streamInactiveHandler, trackMedia
103 103
 JitsiTrack.prototype._setHandler = function (type, handler) {
104 104
     this.handlers[type] = handler;
105 105
     if(!this.stream)        {
106
-return;
107
-}
106
+        return;
107
+    }
108 108
 
109 109
     if(type === "inactive") {
110 110
         if (RTCBrowserType.isFirefox()) {
@@ -318,10 +318,10 @@ JitsiTrack.prototype.isScreenSharing = function() {
318 318
  */
319 319
 JitsiTrack.prototype.getId = function () {
320 320
     if(this.stream)        {
321
-return RTCUtils.getStreamID(this.stream);
322
-}    else        {
323
-return null;
324
-}
321
+        return RTCUtils.getStreamID(this.stream);
322
+    }    else        {
323
+        return null;
324
+    }
325 325
 };
326 326
 
327 327
 /**
@@ -332,10 +332,10 @@ return null;
332 332
  */
333 333
 JitsiTrack.prototype.isActive = function () {
334 334
     if(typeof this.stream.active !== "undefined")        {
335
-return this.stream.active;
336
-}    else        {
337
-return true;
338
-}
335
+        return this.stream.active;
336
+    }    else        {
337
+        return true;
338
+    }
339 339
 };
340 340
 
341 341
 /**
@@ -346,8 +346,8 @@ return true;
346 346
  */
347 347
 JitsiTrack.prototype.on = function (eventId, handler) {
348 348
     if(this.eventEmitter)        {
349
-this.eventEmitter.on(eventId, handler);
350
-}
349
+        this.eventEmitter.on(eventId, handler);
350
+    }
351 351
 };
352 352
 
353 353
 /**
@@ -357,8 +357,8 @@ this.eventEmitter.on(eventId, handler);
357 357
  */
358 358
 JitsiTrack.prototype.off = function (eventId, handler) {
359 359
     if(this.eventEmitter)        {
360
-this.eventEmitter.removeListener(eventId, handler);
361
-}
360
+        this.eventEmitter.removeListener(eventId, handler);
361
+    }
362 362
 };
363 363
 
364 364
 // Common aliases for event emitter
@@ -375,7 +375,7 @@ JitsiTrack.prototype.setAudioLevel = function (audioLevel) {
375 375
             audioLevel);
376 376
         this.audioLevel = audioLevel;
377 377
     }
378
- };
378
+};
379 379
 
380 380
 /**
381 381
  * Returns the msid of the stream attached to the JitsiTrack object or null if

+ 15
- 15
modules/RTC/RTC.js Просмотреть файл

@@ -99,7 +99,7 @@ export default class RTC extends Listenable {
99 99
                     !track._isReceivingData())? tracks
100 100
                         : Promise.reject(new JitsiTrackError(
101 101
                             JitsiTrackErrors.NO_DATA_FROM_SOURCE));
102
-        });
102
+            });
103 103
     }
104 104
 
105 105
     /**
@@ -165,8 +165,8 @@ export default class RTC extends Listenable {
165 165
         // cache the value if channel is missing, till we open it
166 166
         this.selectedEndpoint = id;
167 167
         if(this.dataChannels && this.dataChannelsOpen)            {
168
-this.dataChannels.sendSelectedEndpointMessage(id);
169
-}
168
+            this.dataChannels.sendSelectedEndpointMessage(id);
169
+        }
170 170
     }
171 171
 
172 172
     /**
@@ -254,8 +254,8 @@ this.dataChannels.sendSelectedEndpointMessage(id);
254 254
 
255 255
     addLocalTrack (track) {
256 256
         if (!track)            {
257
-throw new Error('track must not be null nor undefined');
258
-}
257
+            throw new Error('track must not be null nor undefined');
258
+        }
259 259
 
260 260
         this.localTracks.push(track);
261 261
 
@@ -291,8 +291,8 @@ throw new Error('track must not be null nor undefined');
291 291
         if (mediaType !== undefined) {
292 292
             tracks = tracks.filter(
293 293
                 (track) => {
294
- return track.getType() === mediaType; 
295
-});
294
+                    return track.getType() === mediaType; 
295
+                });
296 296
         }
297 297
         return tracks;
298 298
     }
@@ -335,10 +335,10 @@ throw new Error('track must not be null nor undefined');
335 335
      */
336 336
     getRemoteTrackByType (type, resource) {
337 337
         if (this.remoteTracks[resource])            {
338
-return this.remoteTracks[resource][type];
339
-}        else            {
340
-return null;
341
-}
338
+            return this.remoteTracks[resource][type];
339
+        }        else            {
340
+            return null;
341
+        }
342 342
     }
343 343
 
344 344
     /**
@@ -638,8 +638,8 @@ return null;
638 638
 
639 639
     setAudioLevel (resource, audioLevel) {
640 640
         if(!resource)            {
641
-return;
642
-}
641
+            return;
642
+        }
643 643
         var audioTrack = this.getRemoteAudioTrack(resource);
644 644
         if(audioTrack) {
645 645
             audioTrack.setAudioLevel(audioLevel);
@@ -654,8 +654,8 @@ return;
654 654
     getResourceBySSRC (ssrc) {
655 655
         if (this.getLocalTracks().find(
656 656
                 localTrack => {
657
- return localTrack.getSSRC() == ssrc; 
658
-})) {
657
+                    return localTrack.getSSRC() == ssrc; 
658
+                })) {
659 659
             return this.conference.myUserId();
660 660
         }
661 661
 

+ 2
- 2
modules/RTC/RTCBrowserType.js Просмотреть файл

@@ -336,8 +336,8 @@ function detectBrowser() {
336 336
     for (var i = 0; i < detectors.length; i++) {
337 337
         version = detectors[i]();
338 338
         if (version)            {
339
-return version;
340
-}
339
+            return version;
340
+        }
341 341
     }
342 342
     logger.warn("Browser type defaults to Safari ver 1");
343 343
     currentBrowser = RTCBrowserType.RTC_BROWSER_SAFARI;

+ 31
- 31
modules/RTC/RTCUtils.js Просмотреть файл

@@ -73,7 +73,7 @@ function initRawEnumerateDevicesWithCallback() {
73 73
             navigator.mediaDevices.enumerateDevices().then(
74 74
                 callback, function () {
75 75
                     callback([]);
76
-            });
76
+                });
77 77
         }
78 78
         // Safari:
79 79
         // "ReferenceError: Can't find variable: MediaStreamTrack"
@@ -116,13 +116,13 @@ function setResolutionConstraints(constraints, resolution) {
116 116
     }
117 117
 
118 118
     if (constraints.video.mandatory.minWidth)        {
119
-constraints.video.mandatory.maxWidth =
119
+        constraints.video.mandatory.maxWidth =
120 120
             constraints.video.mandatory.minWidth;
121
-}
121
+    }
122 122
     if (constraints.video.mandatory.minHeight)        {
123
-constraints.video.mandatory.maxHeight =
123
+        constraints.video.mandatory.maxHeight =
124 124
             constraints.video.mandatory.minHeight;
125
-}
125
+    }
126 126
 }
127 127
 
128 128
 /**
@@ -450,12 +450,12 @@ function onReady (options, GUM) {
450 450
  * @param {Array} [args=[]] arguments for function
451 451
  */
452 452
 function maybeApply(fn, args) {
453
-  fn && fn(...args);
453
+    fn && fn(...args);
454 454
 }
455 455
 
456 456
 var getUserMediaStatus = {
457
-  initialized: false,
458
-  callbacks: []
457
+    initialized: false,
458
+    callbacks: []
459 459
 };
460 460
 
461 461
 /**
@@ -465,20 +465,20 @@ var getUserMediaStatus = {
465 465
  * @returns {Function} wrapped function
466 466
  */
467 467
 function wrapGetUserMedia(getUserMedia) {
468
-  return function (constraints, successCallback, errorCallback) {
469
-    getUserMedia(constraints, function (stream) {
470
-      maybeApply(successCallback, [stream]);
471
-      if (!getUserMediaStatus.initialized) {
472
-        getUserMediaStatus.initialized = true;
473
-        getUserMediaStatus.callbacks.forEach(function (callback) {
474
-          callback();
468
+    return function (constraints, successCallback, errorCallback) {
469
+        getUserMedia(constraints, function (stream) {
470
+            maybeApply(successCallback, [stream]);
471
+            if (!getUserMediaStatus.initialized) {
472
+                getUserMediaStatus.initialized = true;
473
+                getUserMediaStatus.callbacks.forEach(function (callback) {
474
+                    callback();
475
+                });
476
+                getUserMediaStatus.callbacks.length = 0;
477
+            }
478
+        }, function (error) {
479
+            maybeApply(errorCallback, [error]);
475 480
         });
476
-        getUserMediaStatus.callbacks.length = 0;
477
-      }
478
-    }, function (error) {
479
-      maybeApply(errorCallback, [error]);
480
-    });
481
-  };
481
+    };
482 482
 }
483 483
 
484 484
 /**
@@ -552,10 +552,10 @@ function obtainDevices(options) {
552 552
     var devices = [];
553 553
     devices.push(device);
554 554
     options.deviceGUM[device](function (stream) {
555
-            options.streams = options.streams || {};
556
-            options.streams[device] = stream;
557
-            obtainDevices(options);
558
-        },
555
+        options.streams = options.streams || {};
556
+        options.streams[device] = stream;
557
+        obtainDevices(options);
558
+    },
559 559
         function (error) {
560 560
             Object.keys(options.streams).forEach(function(device) {
561 561
                 rtcUtils.stopMediaStream(options.streams[device]);
@@ -610,8 +610,8 @@ function handleLocalStream(streams, resolution) {
610 610
           // On other types of browser (e.g. Firefox) we choose (namely,
611 611
           // obtainAudioAndVideoPermissions) to call getUsermedia per device
612 612
           // (type).
613
-          audioStream = streams.audio;
614
-          videoStream = streams.video;
613
+            audioStream = streams.audio;
614
+            videoStream = streams.video;
615 615
         }
616 616
         // Again, different choices on different types of browser.
617 617
         desktopStream = streams.desktopStream || streams.desktop;
@@ -772,8 +772,8 @@ class RTCUtils extends Listenable {
772 772
                     if (element) {
773 773
                         defaultSetVideoSrc(element, stream);
774 774
                         if (stream)                            {
775
-element.play();
776
-}
775
+                            element.play();
776
+                        }
777 777
                     }
778 778
                     return element;
779 779
                 });
@@ -1145,8 +1145,8 @@ element.play();
1145 1145
 
1146 1146
     _isDeviceListAvailable () {
1147 1147
         if (!rtcReady)            {
1148
-throw new Error("WebRTC not ready yet");
1149
-}
1148
+            throw new Error("WebRTC not ready yet");
1149
+        }
1150 1150
         var isEnumerateDevicesAvailable
1151 1151
             = navigator.mediaDevices && navigator.mediaDevices.enumerateDevices;
1152 1152
         if (isEnumerateDevicesAvailable) {

+ 10
- 10
modules/RTC/ScreenObtainer.js Просмотреть файл

@@ -74,8 +74,8 @@ var ScreenObtainer = {
74 74
         gumFunction = gum;
75 75
 
76 76
         if (RTCBrowserType.isFirefox())            {
77
-initFirefoxExtensionDetection(options);
78
-}
77
+            initFirefoxExtensionDetection(options);
78
+        }
79 79
 
80 80
         if (RTCBrowserType.isNWJS()) {
81 81
             obtainDesktopStream = (options, onSuccess, onFailure) => {
@@ -208,8 +208,8 @@ initFirefoxExtensionDetection(options);
208 208
             window.setTimeout(
209 209
                 () => {
210 210
                     if (firefoxExtInstalled === null)                        {
211
-firefoxExtInstalled = false;
212
-}
211
+                        firefoxExtInstalled = false;
212
+                    }
213 213
                     this.obtainScreenOnFirefox(callback, errorCallback);
214 214
                 },
215 215
                 300);
@@ -355,11 +355,11 @@ function isUpdateRequired(minVersion, extVersion) {
355 355
                 n2 = 0;
356 356
 
357 357
             if (i < s1.length)                {
358
-n1 = parseInt(s1[i]);
359
-}
358
+                n1 = parseInt(s1[i]);
359
+            }
360 360
             if (i < s2.length)                {
361
-n2 = parseInt(s2[i]);
362
-}
361
+                n2 = parseInt(s2[i]);
362
+            }
363 363
 
364 364
             if (isNaN(n1) || isNaN(n2)) {
365 365
                 return true;
@@ -534,8 +534,8 @@ function initFirefoxExtensionDetection(options) {
534 534
         return;
535 535
     }
536 536
     if (firefoxExtInstalled === false || firefoxExtInstalled === true)        {
537
-return;
538
-}
537
+        return;
538
+    }
539 539
     if (!options.desktopSharingFirefoxExtId) {
540 540
         firefoxExtInstalled = false;
541 541
         return;

+ 39
- 39
modules/RTC/TraceablePeerConnection.js Просмотреть файл

@@ -607,8 +607,8 @@ Object.keys(getters).forEach(function (prop) {
607 607
 TraceablePeerConnection.prototype.addStream = function (stream, ssrcInfo) {
608 608
     this.trace('addStream', stream ? stream.id : "null");
609 609
     if (stream)        {
610
-this.peerconnection.addStream(stream);
611
-}
610
+        this.peerconnection.addStream(stream);
611
+    }
612 612
     if (ssrcInfo && ssrcInfo.type === "addMuted") {
613 613
         this.sdpConsistency.setPrimarySsrc(ssrcInfo.ssrcs[0]);
614 614
         const simGroup
@@ -646,16 +646,16 @@ TraceablePeerConnection.prototype.createDataChannel = function (label, opts) {
646 646
 
647 647
 TraceablePeerConnection.prototype.setLocalDescription
648 648
         = function (description, successCallback, failureCallback) {
649
-    this.trace('setLocalDescription::preTransform', dumpSDP(description));
649
+            this.trace('setLocalDescription::preTransform', dumpSDP(description));
650 650
     // if we're running on FF, transform to Plan A first.
651
-    if (RTCBrowserType.usesUnifiedPlan()) {
652
-        description = this.interop.toUnifiedPlan(description);
653
-        this.trace('setLocalDescription::postTransform (Plan A)',
651
+            if (RTCBrowserType.usesUnifiedPlan()) {
652
+                description = this.interop.toUnifiedPlan(description);
653
+                this.trace('setLocalDescription::postTransform (Plan A)',
654 654
             dumpSDP(description));
655
-    }
655
+            }
656 656
 
657
-    var self = this;
658
-    this.peerconnection.setLocalDescription(description,
657
+            var self = this;
658
+            this.peerconnection.setLocalDescription(description,
659 659
         function () {
660 660
             self.trace('setLocalDescriptionOnSuccess');
661 661
             successCallback();
@@ -668,40 +668,40 @@ TraceablePeerConnection.prototype.setLocalDescription
668 668
             failureCallback(err);
669 669
         }
670 670
     );
671
-};
671
+        };
672 672
 
673 673
 TraceablePeerConnection.prototype.setRemoteDescription
674 674
         = function (description, successCallback, failureCallback) {
675
-    this.trace('setRemoteDescription::preTransform', dumpSDP(description));
675
+            this.trace('setRemoteDescription::preTransform', dumpSDP(description));
676 676
     // TODO the focus should squeze or explode the remote simulcast
677
-    description = this.simulcast.mungeRemoteDescription(description);
678
-    this.trace(
677
+            description = this.simulcast.mungeRemoteDescription(description);
678
+            this.trace(
679 679
         'setRemoteDescription::postTransform (simulcast)',
680 680
         dumpSDP(description));
681 681
 
682
-    if (this.options.preferH264) {
683
-        const parsedSdp = transform.parse(description.sdp);
684
-        const videoMLine = parsedSdp.media.find(m => m.type === "video");
685
-        SDPUtil.preferVideoCodec(videoMLine, "h264");
686
-        description.sdp = transform.write(parsedSdp);
687
-    }
682
+            if (this.options.preferH264) {
683
+                const parsedSdp = transform.parse(description.sdp);
684
+                const videoMLine = parsedSdp.media.find(m => m.type === "video");
685
+                SDPUtil.preferVideoCodec(videoMLine, "h264");
686
+                description.sdp = transform.write(parsedSdp);
687
+            }
688 688
 
689 689
     // if we're running on FF, transform to Plan A first.
690
-    if (RTCBrowserType.usesUnifiedPlan()) {
691
-        description.sdp = this.rtxModifier.stripRtx(description.sdp);
692
-        this.trace('setRemoteDescription::postTransform (stripRtx)', dumpSDP(description));
693
-        description = this.interop.toUnifiedPlan(description);
694
-        this.trace(
690
+            if (RTCBrowserType.usesUnifiedPlan()) {
691
+                description.sdp = this.rtxModifier.stripRtx(description.sdp);
692
+                this.trace('setRemoteDescription::postTransform (stripRtx)', dumpSDP(description));
693
+                description = this.interop.toUnifiedPlan(description);
694
+                this.trace(
695 695
             'setRemoteDescription::postTransform (Plan A)',
696 696
             dumpSDP(description));
697
-    }
697
+            }
698 698
 
699
-    if (RTCBrowserType.usesPlanB()) {
700
-        description = normalizePlanB(description);
701
-    }
699
+            if (RTCBrowserType.usesPlanB()) {
700
+                description = normalizePlanB(description);
701
+            }
702 702
 
703
-    var self = this;
704
-    this.peerconnection.setRemoteDescription(description,
703
+            var self = this;
704
+            this.peerconnection.setRemoteDescription(description,
705 705
         function () {
706 706
             self.trace('setRemoteDescriptionOnSuccess');
707 707
             successCallback();
@@ -718,7 +718,7 @@ TraceablePeerConnection.prototype.setRemoteDescription
718 718
      // start gathering stats
719 719
      }
720 720
      */
721
-};
721
+        };
722 722
 
723 723
 /**
724 724
  * Makes the underlying TraceablePeerConnection generate new SSRC for
@@ -815,8 +815,8 @@ var _fixAnswerRFC4145Setup = function (offer, answer) {
815 815
 
816 816
 TraceablePeerConnection.prototype.createAnswer
817 817
         = function (successCallback, failureCallback, constraints) {
818
-    this.trace('createAnswer', JSON.stringify(constraints, null, ' '));
819
-    this.peerconnection.createAnswer(
818
+            this.trace('createAnswer', JSON.stringify(constraints, null, ' '));
819
+            this.peerconnection.createAnswer(
820 820
         (answer) => {
821 821
             try {
822 822
                 this.trace(
@@ -885,14 +885,14 @@ TraceablePeerConnection.prototype.createAnswer
885 885
         },
886 886
         constraints
887 887
     );
888
-};
888
+        };
889 889
 
890 890
 TraceablePeerConnection.prototype.addIceCandidate
891 891
         // eslint-disable-next-line no-unused-vars
892 892
         = function (candidate, successCallback, failureCallback) {
893 893
     //var self = this;
894
-    this.trace('addIceCandidate', JSON.stringify(candidate, null, ' '));
895
-    this.peerconnection.addIceCandidate(candidate);
894
+            this.trace('addIceCandidate', JSON.stringify(candidate, null, ' '));
895
+            this.peerconnection.addIceCandidate(candidate);
896 896
     /* maybe later
897 897
      this.peerconnection.addIceCandidate(candidate,
898 898
      function () {
@@ -905,7 +905,7 @@ TraceablePeerConnection.prototype.addIceCandidate
905 905
      }
906 906
      );
907 907
      */
908
-};
908
+        };
909 909
 
910 910
 TraceablePeerConnection.prototype.getStats = function(callback, errback) {
911 911
     // TODO: Is this the correct way to handle Opera, Temasys?
@@ -914,8 +914,8 @@ TraceablePeerConnection.prototype.getStats = function(callback, errback) {
914 914
             || RTCBrowserType.isReactNative()) {
915 915
         // ignore for now...
916 916
         if(!errback)            {
917
-errback = function () {};
918
-}
917
+            errback = function () {};
918
+        }
919 919
         this.peerconnection.getStats(null, callback, errback);
920 920
     } else {
921 921
         this.peerconnection.getStats(callback);

+ 6
- 6
modules/TalkMutedDetection.js Просмотреть файл

@@ -60,8 +60,8 @@ export default class TalkMutedDetection {
60 60
         // We are interested in the local audio stream only and if event is not
61 61
         // sent yet.
62 62
         if (!isLocal || !this.audioTrack || this._eventFired)            {
63
-return;
64
-}
63
+            return;
64
+        }
65 65
 
66 66
         if (this.audioTrack.isMuted() && audioLevel > 0.6) {
67 67
             this._eventFired = true;
@@ -93,8 +93,8 @@ return;
93 93
      */
94 94
     _trackAdded(track) {
95 95
         if (this._isLocalAudioTrack(track))            {
96
-this.audioTrack = track;
97
-}
96
+            this.audioTrack = track;
97
+        }
98 98
     }
99 99
 
100 100
     /**
@@ -107,7 +107,7 @@ this.audioTrack = track;
107 107
      */
108 108
     _trackMuteChanged(track) {
109 109
         if (this._isLocalAudioTrack(track) && track.isMuted())            {
110
-this._eventFired = false;
111
-}
110
+            this._eventFired = false;
111
+        }
112 112
     }
113 113
 }

+ 7
- 7
modules/connectivity/ConnectionQuality.js Просмотреть файл

@@ -188,7 +188,7 @@ export default class ConnectionQuality {
188 188
                     this._updateRemoteStats(
189 189
                         participant.getId(), payload.values);
190 190
                 }
191
-        });
191
+            });
192 192
 
193 193
         // Listen to local statistics events originating from the RTC module
194 194
         // and update the _localStats field.
@@ -426,13 +426,13 @@ export default class ConnectionQuality {
426 426
      */
427 427
     _updateRemoteStats(id, data) {
428 428
             // Use only the fields we need
429
-            this._remoteStats[id] = {
430
-                bitrate: data.bitrate,
431
-                packetLoss: data.packetLoss,
432
-                connectionQuality: data.connectionQuality
433
-            };
429
+        this._remoteStats[id] = {
430
+            bitrate: data.bitrate,
431
+            packetLoss: data.packetLoss,
432
+            connectionQuality: data.connectionQuality
433
+        };
434 434
 
435
-            this.eventEmitter.emit(
435
+        this.eventEmitter.emit(
436 436
                 ConnectionQualityEvents.REMOTE_STATS_UPDATED,
437 437
                 id,
438 438
                 this._remoteStats[id]);

+ 7
- 7
modules/statistics/CallStats.js Просмотреть файл

@@ -212,8 +212,8 @@ CallStats.feedbackEnabled = false;
212 212
 CallStats._checkInitialize = function () {
213 213
     if (CallStats.initialized || !CallStats.initializeFailed
214 214
         || !callStats || CallStats.initializeInProgress)        {
215
-return;
216
-}
215
+        return;
216
+    }
217 217
 
218 218
     // callstats object created, not initialized and it had previously failed,
219 219
     // and there is no init in progress, so lets try initialize it again
@@ -237,8 +237,8 @@ var reportType = {
237 237
 
238 238
 CallStats.prototype.pcCallback = _try_catch(function (err, msg) {
239 239
     if (callStats && err !== 'success')        {
240
-logger.error("Monitoring status: "+ err + " msg: " + msg);
241
-}
240
+        logger.error("Monitoring status: "+ err + " msg: " + msg);
241
+    }
242 242
 });
243 243
 
244 244
 /**
@@ -356,9 +356,9 @@ CallStats._reportEvent = function (event, eventData) {
356 356
             this.peerconnection, event, this.confID, eventData);
357 357
     } else {
358 358
         CallStats.reportsQueue.push({
359
-                type: reportType.EVENT,
360
-                data: {event: event, eventData: eventData}
361
-            });
359
+            type: reportType.EVENT,
360
+            data: {event: event, eventData: eventData}
361
+        });
362 362
         CallStats._checkInitialize();
363 363
     }
364 364
 };

+ 4
- 4
modules/statistics/LocalStatsCollector.js Просмотреть файл

@@ -47,8 +47,8 @@ function timeDomainDataToAudioLevel(samples) {
47 47
 
48 48
     for (var i = 0; i < length; i++) {
49 49
         if (maxVolume < samples[i])            {
50
-maxVolume = samples[i];
51
-}
50
+            maxVolume = samples[i];
51
+        }
52 52
     }
53 53
 
54 54
     return parseFloat(((maxVolume - 127) / 128).toFixed(3));
@@ -97,8 +97,8 @@ function LocalStatsCollector(stream, interval, callback) {
97 97
 LocalStatsCollector.prototype.start = function () {
98 98
     if (!context ||
99 99
         RTCBrowserType.isTemasysPluginUsed())        {
100
-return;
101
-}
100
+        return;
101
+    }
102 102
     context.resume();
103 103
     var analyser = context.createAnalyser();
104 104
     analyser.smoothingTimeConstant = WEBAUDIO_ANALYZER_SMOOTING_TIME;

+ 31
- 31
modules/statistics/RTPStatsCollector.js Просмотреть файл

@@ -65,8 +65,8 @@ KEYS_BY_BROWSER_TYPE[RTCBrowserType.RTC_BROWSER_REACT_NATIVE] =
65 65
  */
66 66
 function calculatePacketLoss(lostPackets, totalPackets) {
67 67
     if(!totalPackets || totalPackets <= 0 || !lostPackets || lostPackets <= 0)        {
68
-return 0;
69
-}
68
+        return 0;
69
+    }
70 70
     return Math.round((lostPackets/totalPackets)*100);
71 71
 }
72 72
 
@@ -181,8 +181,8 @@ function StatsCollector(
181 181
     this._browserType = RTCBrowserType.getBrowserType();
182 182
     var keys = KEYS_BY_BROWSER_TYPE[this._browserType];
183 183
     if (!keys)        {
184
-throw "The browser type '" + this._browserType + "' isn't supported!";
185
-}
184
+        throw "The browser type '" + this._browserType + "' isn't supported!";
185
+    }
186 186
     /**
187 187
      * The function which is to be used to retrieve the value associated in a
188 188
      * report returned by RTCPeerConnection#getStats with a LibJitsiMeet
@@ -315,10 +315,10 @@ StatsCollector.prototype._defineGetStatValueMethod = function (keys) {
315 315
     var keyFromName = function (name) {
316 316
         var key = keys[name];
317 317
         if (key)            {
318
-return key;
319
-}        else            {
320
-throw "The property '" + name + "' isn't supported!";
321
-}
318
+            return key;
319
+        }        else            {
320
+            throw "The property '" + name + "' isn't supported!";
321
+        }
322 322
     };
323 323
 
324 324
     // Define the function which retrieves the value from a specific report
@@ -338,8 +338,8 @@ throw "The property '" + name + "' isn't supported!";
338 338
         // likely that whoever defined it wanted you to call it in order to
339 339
         // retrieve the value associated with a specific key.
340 340
         itemStatByKey = function (item, key) {
341
- return item.stat(key); 
342
-};
341
+            return item.stat(key); 
342
+        };
343 343
         break;
344 344
     case RTCBrowserType.RTC_BROWSER_REACT_NATIVE:
345 345
         // The implementation provided by react-native-webrtc follows the
@@ -360,8 +360,8 @@ throw "The property '" + name + "' isn't supported!";
360 360
         break;
361 361
     default:
362 362
         itemStatByKey = function (item, key) {
363
- return item[key]; 
364
-};
363
+            return item[key]; 
364
+        };
365 365
     }
366 366
 
367 367
     // Compose the 2 functions defined above to get a function which retrieves
@@ -417,15 +417,15 @@ StatsCollector.prototype.processStatsReport = function () {
417 417
                 active = getStatValue(now, "activeConnection");
418 418
             }            catch(e){/*not supported*/}
419 419
             if(!ip || !type || !localip || active != "true")                {
420
-continue;
421
-}
420
+                continue;
421
+            }
422 422
             // Save the address unless it has been saved already.
423 423
             var conferenceStatsTransport = this.conferenceStats.transport;
424 424
             if(!conferenceStatsTransport.some(function (t) {
425
- return (
425
+                return (
426 426
                         t.ip == ip && t.type == type && t.localip == localip
427
-                    );
428
-})) {
427
+                );
428
+            })) {
429 429
                 conferenceStatsTransport.push(
430 430
                     {ip: ip, type: type, localip: localip});
431 431
             }
@@ -434,8 +434,8 @@ continue;
434 434
 
435 435
         if(now.type == "candidatepair") {
436 436
             if(now.state == "succeeded")                {
437
-continue;
438
-}
437
+                continue;
438
+            }
439 439
 
440 440
             var local = this.currentStatsReport[now.localCandidateId];
441 441
             var remote = this.currentStatsReport[now.remoteCandidateId];
@@ -474,8 +474,8 @@ continue;
474 474
             }
475 475
         }
476 476
         if (!packetsNow || packetsNow < 0)            {
477
-packetsNow = 0;
478
-}
477
+            packetsNow = 0;
478
+        }
479 479
 
480 480
         var packetsBefore = getNonNegativeStat(before, key);
481 481
         var packetsDiff = Math.max(0, packetsNow - packetsBefore);
@@ -593,12 +593,12 @@ packetsNow = 0;
593 593
             calculatePacketLoss(lostPackets.upload, totalPackets.upload)
594 594
     };
595 595
     this.eventEmitter.emit(StatisticsEvents.CONNECTION_STATS, {
596
-            "bandwidth": this.conferenceStats.bandwidth,
597
-            "bitrate": this.conferenceStats.bitrate,
598
-            "packetLoss": this.conferenceStats.packetLoss,
599
-            "resolution": resolutions,
600
-            "transport": this.conferenceStats.transport
601
-        });
596
+        "bandwidth": this.conferenceStats.bandwidth,
597
+        "bitrate": this.conferenceStats.bitrate,
598
+        "packetLoss": this.conferenceStats.packetLoss,
599
+        "resolution": resolutions,
600
+        "transport": this.conferenceStats.transport
601
+    });
602 602
     this.conferenceStats.transport = [];
603 603
 };
604 604
 
@@ -616,8 +616,8 @@ StatsCollector.prototype.processAudioLevelReport = function () {
616 616
         var now = this.currentAudioLevelsReport[idx];
617 617
 
618 618
         if (now.type != 'ssrc')            {
619
-continue;
620
-}
619
+            continue;
620
+        }
621 621
 
622 622
         var before = this.baselineAudioLevelsReport[idx];
623 623
         var ssrc = getStatValue(now, 'ssrc');
@@ -628,8 +628,8 @@ continue;
628 628
 
629 629
         if (!ssrc) {
630 630
             if ((Date.now() - now.timestamp) < 3000)                {
631
-logger.warn("No ssrc: ");
632
-}
631
+                logger.warn("No ssrc: ");
632
+            }
633 633
             continue;
634 634
         }
635 635
 

+ 37
- 37
modules/statistics/statistics.js Просмотреть файл

@@ -12,7 +12,7 @@ import * as StatisticsEvents from "../../service/statistics/Events";
12 12
 /**
13 13
  * True if callstats API is loaded
14 14
  */
15
- var isCallstatsLoaded = false;
15
+var isCallstatsLoaded = false;
16 16
 
17 17
 // Since callstats.io is a third party, we cannot guarantee the quality of their
18 18
 // service. More specifically, their server may take noticeably long time to
@@ -90,8 +90,8 @@ function Statistics(xmpp, options) {
90 90
             // requests to any third parties.
91 91
             && (Statistics.disableThirdPartyRequests !== true);
92 92
     if(this.callStatsIntegrationEnabled)        {
93
-loadCallStatsAPI(this.options.callStatsCustomScriptUrl);
94
-}
93
+        loadCallStatsAPI(this.options.callStatsCustomScriptUrl);
94
+    }
95 95
     this.callStats = null;
96 96
     // Flag indicates whether or not the CallStats have been started for this
97 97
     // Statistics instance
@@ -126,8 +126,8 @@ Statistics.localStats = [];
126 126
 
127 127
 Statistics.startLocalStats = function (stream, callback) {
128 128
     if(!Statistics.audioLevelsEnabled)        {
129
-return;
130
-}
129
+        return;
130
+    }
131 131
     var localStats = new LocalStats(stream, Statistics.audioLevelsInterval,
132 132
         callback);
133 133
     this.localStats.push(localStats);
@@ -136,15 +136,15 @@ return;
136 136
 
137 137
 Statistics.prototype.addAudioLevelListener = function(listener) {
138 138
     if(!Statistics.audioLevelsEnabled)        {
139
-return;
140
-}
139
+        return;
140
+    }
141 141
     this.eventEmitter.on(StatisticsEvents.AUDIO_LEVEL, listener);
142 142
 };
143 143
 
144 144
 Statistics.prototype.removeAudioLevelListener = function(listener) {
145 145
     if(!Statistics.audioLevelsEnabled)        {
146
-return;
147
-}
146
+        return;
147
+    }
148 148
     this.eventEmitter.removeListener(StatisticsEvents.AUDIO_LEVEL, listener);
149 149
 };
150 150
 
@@ -181,22 +181,22 @@ Statistics.prototype.dispose = function () {
181 181
     this.stopCallStats();
182 182
     this.stopRemoteStats();
183 183
     if(this.eventEmitter)        {
184
-this.eventEmitter.removeAllListeners();
185
-}
184
+        this.eventEmitter.removeAllListeners();
185
+    }
186 186
 };
187 187
 
188 188
 Statistics.stopLocalStats = function (stream) {
189 189
     if(!Statistics.audioLevelsEnabled)        {
190
-return;
191
-}
190
+        return;
191
+    }
192 192
 
193 193
     for(var i = 0; i < Statistics.localStats.length; i++)        {
194
-if(Statistics.localStats[i].stream === stream){
194
+        if(Statistics.localStats[i].stream === stream){
195 195
             var localStats = Statistics.localStats.splice(i, 1);
196 196
             localStats[0].stop();
197 197
             break;
198 198
         }
199
-}
199
+    }
200 200
 };
201 201
 
202 202
 Statistics.prototype.stopRemoteStats = function () {
@@ -231,8 +231,8 @@ Statistics.prototype.stopCallStats = function () {
231 231
     if(this.callStatsStarted) {
232 232
         var index = Statistics.callsStatsInstances.indexOf(this.callstats);
233 233
         if(index > -1)            {
234
-Statistics.callsStatsInstances.splice(index, 1);
235
-}
234
+            Statistics.callsStatsInstances.splice(index, 1);
235
+        }
236 236
         // The next line is commented because we need to be able to send
237 237
         // feedback even after the conference has been destroyed.
238 238
         // this.callstats = null;
@@ -258,8 +258,8 @@ Statistics.prototype.isCallstatsEnabled = function () {
258 258
  */
259 259
 Statistics.prototype.sendIceConnectionFailedEvent = function (pc) {
260 260
     if(this.callstats)        {
261
-this.callstats.sendIceConnectionFailedEvent(pc, this.callstats);
262
-}
261
+        this.callstats.sendIceConnectionFailedEvent(pc, this.callstats);
262
+    }
263 263
     Statistics.analytics.sendEvent('connection.ice_failed');
264 264
 };
265 265
 
@@ -270,8 +270,8 @@ this.callstats.sendIceConnectionFailedEvent(pc, this.callstats);
270 270
  */
271 271
 Statistics.prototype.sendMuteEvent = function (muted, type) {
272 272
     if(this.callstats)        {
273
-CallStats.sendMuteEvent(muted, type, this.callstats);
274
-}
273
+        CallStats.sendMuteEvent(muted, type, this.callstats);
274
+    }
275 275
 };
276 276
 
277 277
 /**
@@ -281,8 +281,8 @@ CallStats.sendMuteEvent(muted, type, this.callstats);
281 281
  */
282 282
 Statistics.prototype.sendScreenSharingEvent = function (start) {
283 283
     if(this.callstats)        {
284
-CallStats.sendScreenSharingEvent(start, this.callstats);
285
-}
284
+        CallStats.sendScreenSharingEvent(start, this.callstats);
285
+    }
286 286
 };
287 287
 
288 288
 /**
@@ -291,8 +291,8 @@ CallStats.sendScreenSharingEvent(start, this.callstats);
291 291
  */
292 292
 Statistics.prototype.sendDominantSpeakerEvent = function () {
293 293
     if(this.callstats)        {
294
-CallStats.sendDominantSpeakerEvent(this.callstats);
295
-}
294
+        CallStats.sendDominantSpeakerEvent(this.callstats);
295
+    }
296 296
 };
297 297
 
298 298
 /**
@@ -361,8 +361,8 @@ Statistics.sendGetUserMediaFailed = function (e) {
361 361
  */
362 362
 Statistics.prototype.sendCreateOfferFailed = function (e, pc) {
363 363
     if(this.callstats)        {
364
-CallStats.sendCreateOfferFailed(e, pc, this.callstats);
365
-}
364
+        CallStats.sendCreateOfferFailed(e, pc, this.callstats);
365
+    }
366 366
 };
367 367
 
368 368
 /**
@@ -373,8 +373,8 @@ CallStats.sendCreateOfferFailed(e, pc, this.callstats);
373 373
  */
374 374
 Statistics.prototype.sendCreateAnswerFailed = function (e, pc) {
375 375
     if(this.callstats)        {
376
-CallStats.sendCreateAnswerFailed(e, pc, this.callstats);
377
-}
376
+        CallStats.sendCreateAnswerFailed(e, pc, this.callstats);
377
+    }
378 378
 };
379 379
 
380 380
 /**
@@ -385,8 +385,8 @@ CallStats.sendCreateAnswerFailed(e, pc, this.callstats);
385 385
  */
386 386
 Statistics.prototype.sendSetLocalDescFailed = function (e, pc) {
387 387
     if(this.callstats)        {
388
-CallStats.sendSetLocalDescFailed(e, pc, this.callstats);
389
-}
388
+        CallStats.sendSetLocalDescFailed(e, pc, this.callstats);
389
+    }
390 390
 };
391 391
 
392 392
 /**
@@ -397,8 +397,8 @@ CallStats.sendSetLocalDescFailed(e, pc, this.callstats);
397 397
  */
398 398
 Statistics.prototype.sendSetRemoteDescFailed = function (e, pc) {
399 399
     if(this.callstats)        {
400
-CallStats.sendSetRemoteDescFailed(e, pc, this.callstats);
401
-}
400
+        CallStats.sendSetRemoteDescFailed(e, pc, this.callstats);
401
+    }
402 402
 };
403 403
 
404 404
 /**
@@ -409,8 +409,8 @@ CallStats.sendSetRemoteDescFailed(e, pc, this.callstats);
409 409
  */
410 410
 Statistics.prototype.sendAddIceCandidateFailed = function (e, pc) {
411 411
     if(this.callstats)        {
412
-CallStats.sendAddIceCandidateFailed(e, pc, this.callstats);
413
-}
412
+        CallStats.sendAddIceCandidateFailed(e, pc, this.callstats);
413
+    }
414 414
 };
415 415
 
416 416
 /**
@@ -436,8 +436,8 @@ Statistics.sendLog = function (m) {
436 436
  */
437 437
 Statistics.prototype.sendFeedback = function(overall, detailed) {
438 438
     if(this.callstats)        {
439
-this.callstats.sendFeedback(overall, detailed);
440
-}
439
+        this.callstats.sendFeedback(overall, detailed);
440
+    }
441 441
     Statistics.analytics.sendEvent("feedback.rating",
442 442
         {value: overall, detailed: detailed});
443 443
 };

+ 1
- 1
modules/transcription/audioRecorder.js Просмотреть файл

@@ -226,7 +226,7 @@ audioRecorder.prototype.stop = function() {
226 226
     this.isRecording = false;
227 227
     //stop all recorders
228 228
     this.recorders.forEach(function(trackRecorder){
229
-       stopRecorder(trackRecorder);
229
+        stopRecorder(trackRecorder);
230 230
     });
231 231
     console.log("stopped recording");
232 232
 };

+ 3
- 3
modules/transcription/transcriber.js Просмотреть файл

@@ -175,9 +175,9 @@ transcriber.prototype.merge = function() {
175 175
         //first select the lowest array;
176 176
         lowestWordArray = arrays[0];
177 177
         arrays.forEach(function(wordArray){
178
-           if(wordArray[0].begin < lowestWordArray[0].begin){
179
-               lowestWordArray = wordArray;
180
-           }
178
+            if(wordArray[0].begin < lowestWordArray[0].begin){
179
+                lowestWordArray = wordArray;
180
+            }
181 181
         });
182 182
         //put the word in the transcription
183 183
         wordToAdd = lowestWordArray.shift();

+ 2
- 2
modules/transcription/transcriptionServices/AbstractTranscriptionService.js Просмотреть файл

@@ -20,7 +20,7 @@ TranscriptionService.prototype.send = function send(recordingResult, callback){
20 20
     var t = this;
21 21
     this.sendRequest(recordingResult.blob, function(response){
22 22
         if(!t.verify(response)){
23
-               console.log("the retrieved response from the server" +
23
+            console.log("the retrieved response from the server" +
24 24
                    " is not valid!");
25 25
             recordingResult.wordArray = [];
26 26
             callback(recordingResult);
@@ -73,7 +73,7 @@ TranscriptionService.prototype.formatResponse = function(response){
73 73
  */
74 74
 // eslint-disable-next-line no-unused-vars
75 75
 TranscriptionService.prototype.verify = function(response){
76
-      throw new Error("TranscriptionService.verify is abstract");
76
+    throw new Error("TranscriptionService.verify is abstract");
77 77
 };
78 78
 
79 79
 module.exports = TranscriptionService;

+ 2
- 2
modules/util/EventEmitterForwarder.js Просмотреть файл

@@ -8,8 +8,8 @@
8 8
 function EventEmitterForwarder (src, dest) {
9 9
     if (!src || !dest || typeof src.addListener !== "function" ||
10 10
         typeof dest.emit !== "function")        {
11
-throw new Error("Invalid arguments passed to EventEmitterForwarder");
12
-}
11
+        throw new Error("Invalid arguments passed to EventEmitterForwarder");
12
+    }
13 13
     this.src = src;
14 14
     this.dest = dest;
15 15
 }

+ 8
- 8
modules/util/GlobalOnErrorHandler.js Просмотреть файл

@@ -23,8 +23,8 @@ function JitsiGlobalErrorHandler(message, source, lineno, colno, error) {
23 23
         handler(message, source, lineno, colno, error);
24 24
     });
25 25
     if (oldOnErrorHandler)        {
26
-oldOnErrorHandler(message, source, lineno, colno, error);
27
-}
26
+        oldOnErrorHandler(message, source, lineno, colno, error);
27
+    }
28 28
 }
29 29
 
30 30
 // If an old handler exists, also fire its events.
@@ -39,8 +39,8 @@ function JitsiGlobalUnhandledRejection(event) {
39 39
         handler(null, null, null, null, event.reason);
40 40
     });
41 41
     if(oldOnUnhandledRejection)        {
42
-oldOnUnhandledRejection(event);
43
-}
42
+        oldOnUnhandledRejection(event);
43
+    }
44 44
 }
45 45
 
46 46
 // Setting the custom error handlers.
@@ -63,8 +63,8 @@ var GlobalOnErrorHandler = {
63 63
     callErrorHandler: function (error) {
64 64
         var errHandler = window.onerror;
65 65
         if(!errHandler)            {
66
-return;
67
-}
66
+            return;
67
+        }
68 68
         errHandler(null, null, null, null, error);
69 69
     },
70 70
     /**
@@ -74,8 +74,8 @@ return;
74 74
     callUnhandledRejectionHandler: function (error) {
75 75
         var errHandler = window.onunhandledrejection;
76 76
         if(!errHandler)            {
77
-return;
78
-}
77
+            return;
78
+        }
79 79
         errHandler(error);
80 80
     }
81 81
 };

+ 6
- 6
modules/util/ScriptUtil.js Просмотреть файл

@@ -39,17 +39,17 @@ var ScriptUtil = {
39 39
                 var baseScriptSrc
40 40
                     = scriptSrc.substring(0, scriptSrc.lastIndexOf('/') + 1);
41 41
                 if (scriptSrc && baseScriptSrc)                    {
42
-src = baseScriptSrc + src;
43
-}
42
+                    src = baseScriptSrc + src;
43
+                }
44 44
             }
45 45
         }
46 46
 
47 47
         if (loadCallback)            {
48
-script.onload = loadCallback;
49
-}
48
+            script.onload = loadCallback;
49
+        }
50 50
         if (errorCallback)            {
51
-script.onerror = errorCallback;
52
-}
51
+            script.onerror = errorCallback;
52
+        }
53 53
 
54 54
         script.src = src;
55 55
         if (prepend) {

+ 419
- 407
modules/util/UsernameGenerator.js Просмотреть файл

@@ -8,409 +8,421 @@ var RandomUtil = require('./RandomUtil');
8 8
  * @const
9 9
  */
10 10
 var names = [
11
-  "Aaliyah", "Aaron", "Abagail", "Abbey", "Abbie", "Abbigail",
12
-  "Abby", "Abdiel", "Abdul", "Abdullah", "Abe", "Abel", "Abelardo", "Abigail",
13
-  "Abigale", "Abigayle", "Abner", "Abraham", "Ada", "Adah", "Adalberto",
14
-  "Adaline", "Adam", "Adan", "Addie", "Addison", "Adela", "Adelbert", "Adele",
15
-  "Adelia", "Adeline", "Adell", "Adella", "Adelle", "Aditya", "Adolf", "Adolfo",
16
-  "Adolph", "Adolphus", "Adonis", "Adrain", "Adrian", "Adriana", "Adrianna",
17
-  "Adriel", "Adrien", "Adrienne", "Afton", "Aglae", "Agnes", "Agustin",
18
-  "Agustina", "Ahmad", "Ahmed", "Aida", "Aidan", "Aiden", "Aileen", "Aimee",
19
-  "Aisha", "Aiyana", "Akeem", "Al", "Alaina", "Alan", "Alana", "Alanis",
20
-  "Alanna", "Alayna", "Alba", "Albert", "Alberta", "Albertha", "Alberto",
21
-  "Albin", "Albina", "Alda", "Alden", "Alec", "Aleen", "Alejandra",
22
-  "Alejandrin", "Alek", "Alena", "Alene", "Alessandra", "Alessandro", "Alessia",
23
-  "Aletha", "Alex", "Alexa", "Alexander", "Alexandra", "Alexandre",
24
-  "Alexandrea", "Alexandria", "Alexandrine", "Alexandro", "Alexane", "Alexanne",
25
-  "Alexie", "Alexis", "Alexys", "Alexzander", "Alf", "Alfonso", "Alfonzo",
26
-  "Alford", "Alfred", "Alfreda", "Alfredo", "Ali", "Alia", "Alice", "Alicia",
27
-  "Alisa", "Alisha", "Alison", "Alivia", "Aliya", "Aliyah", "Aliza", "Alize",
28
-  "Allan", "Allen", "Allene", "Allie", "Allison", "Ally", "Alphonso", "Alta",
29
-  "Althea", "Alva", "Alvah", "Alvena", "Alvera", "Alverta", "Alvina", "Alvis",
30
-  "Alyce", "Alycia", "Alysa", "Alysha", "Alyson", "Alysson", "Amalia", "Amanda",
31
-  "Amani", "Amara", "Amari", "Amaya", "Amber", "Ambrose", "Amelia", "Amelie",
32
-  "Amely", "America", "Americo", "Amie", "Amina", "Amir", "Amira", "Amiya",
33
-  "Amos", "Amparo", "Amy", "Amya", "Ana", "Anabel", "Anabelle", "Anahi",
34
-  "Anais", "Anastacio", "Anastasia", "Anderson", "Andre", "Andreane",
35
-  "Andreanne", "Andres", "Andrew", "Andy", "Angel", "Angela", "Angelica",
36
-  "Angelina", "Angeline", "Angelita", "Angelo", "Angie", "Angus", "Anibal",
37
-  "Anika", "Anissa", "Anita", "Aniya", "Aniyah", "Anjali", "Anna", "Annabel",
38
-  "Annabell", "Annabelle", "Annalise", "Annamae", "Annamarie", "Anne",
39
-  "Annetta", "Annette", "Annie", "Ansel", "Ansley", "Anthony", "Antoinette",
40
-  "Antone", "Antonetta", "Antonette", "Antonia", "Antonietta", "Antonina",
41
-  "Antonio", "Antwan", "Antwon", "Anya", "April", "Ara", "Araceli", "Aracely",
42
-  "Arch", "Archibald", "Ardella", "Arden", "Ardith", "Arely", "Ari", "Ariane",
43
-  "Arianna", "Aric", "Ariel", "Arielle", "Arjun", "Arlene", "Arlie", "Arlo",
44
-  "Armand", "Armando", "Armani", "Arnaldo", "Arne", "Arno", "Arnold", "Arnoldo",
45
-  "Arnulfo", "Aron", "Art", "Arthur", "Arturo", "Arvel", "Arvid", "Arvilla",
46
-  "Aryanna", "Asa", "Asha", "Ashlee", "Ashleigh", "Ashley", "Ashly", "Ashlynn",
47
-  "Ashton", "Ashtyn", "Asia", "Assunta", "Astrid", "Athena", "Aubree", "Aubrey",
48
-  "Audie", "Audra", "Audreanne", "Audrey", "August", "Augusta", "Augustine",
49
-  "Augustus", "Aurelia", "Aurelie", "Aurelio", "Aurore", "Austen", "Austin",
50
-  "Austyn", "Autumn", "Ava", "Avery", "Avis", "Axel", "Ayana", "Ayden", "Ayla",
51
-  "Aylin", "Baby", "Bailee", "Bailey", "Barbara", "Barney", "Baron", "Barrett",
52
-  "Barry", "Bart", "Bartholome", "Barton", "Baylee", "Beatrice", "Beau",
53
-  "Beaulah", "Bell", "Bella", "Belle", "Ben", "Benedict", "Benjamin", "Bennett",
54
-  "Bennie", "Benny", "Benton", "Berenice", "Bernadette", "Bernadine", "Bernard",
55
-  "Bernardo", "Berneice", "Bernhard", "Bernice", "Bernie", "Berniece",
56
-  "Bernita", "Berry", "Bert", "Berta", "Bertha", "Bertram", "Bertrand", "Beryl",
57
-  "Bessie", "Beth", "Bethany", "Bethel", "Betsy", "Bette", "Bettie", "Betty",
58
-  "Bettye", "Beulah", "Beverly", "Bianka", "Bill", "Billie", "Billy", "Birdie",
59
-  "Blair", "Blaise", "Blake", "Blanca", "Blanche", "Blaze", "Bo", "Bobbie",
60
-  "Bobby", "Bonita", "Bonnie", "Boris", "Boyd", "Brad", "Braden", "Bradford",
61
-  "Bradley", "Bradly", "Brady", "Braeden", "Brain", "Brandi", "Brando",
62
-  "Brandon", "Brandt", "Brandy", "Brandyn", "Brannon", "Branson", "Brant",
63
-  "Braulio", "Braxton", "Brayan", "Breana", "Breanna", "Breanne", "Brenda",
64
-  "Brendan", "Brenden", "Brendon", "Brenna", "Brennan", "Brennon", "Brent",
65
-  "Bret", "Brett", "Bria", "Brian", "Briana", "Brianne", "Brice", "Bridget",
66
-  "Bridgette", "Bridie", "Brielle", "Brigitte", "Brionna", "Brisa", "Britney",
67
-  "Brittany", "Brock", "Broderick", "Brody", "Brook", "Brooke", "Brooklyn",
68
-  "Brooks", "Brown", "Bruce", "Bryana", "Bryce", "Brycen", "Bryon", "Buck",
69
-  "Bud", "Buddy", "Buford", "Bulah", "Burdette", "Burley", "Burnice", "Buster",
70
-  "Cade", "Caden", "Caesar", "Caitlyn", "Cale", "Caleb", "Caleigh", "Cali",
71
-  "Calista", "Callie", "Camden", "Cameron", "Camila", "Camilla", "Camille",
72
-  "Camren", "Camron", "Camryn", "Camylle", "Candace", "Candelario", "Candice",
73
-  "Candida", "Candido", "Cara", "Carey", "Carissa", "Carlee", "Carleton",
74
-  "Carley", "Carli", "Carlie", "Carlo", "Carlos", "Carlotta", "Carmel",
75
-  "Carmela", "Carmella", "Carmelo", "Carmen", "Carmine", "Carol", "Carolanne",
76
-  "Carole", "Carolina", "Caroline", "Carolyn", "Carolyne", "Carrie", "Carroll",
77
-  "Carson", "Carter", "Cary", "Casandra", "Casey", "Casimer", "Casimir",
78
-  "Casper", "Cassandra", "Cassandre", "Cassidy", "Cassie", "Catalina",
79
-  "Caterina", "Catharine", "Catherine", "Cathrine", "Cathryn", "Cathy", "Cayla",
80
-  "Ceasar", "Cecelia", "Cecil", "Cecile", "Cecilia", "Cedrick", "Celestine",
81
-  "Celestino", "Celia", "Celine", "Cesar", "Chad", "Chadd", "Chadrick", "Chaim",
82
-  "Chance", "Chandler", "Chanel", "Chanelle", "Charity", "Charlene", "Charles",
83
-  "Charley", "Charlie", "Charlotte", "Chase", "Chasity", "Chauncey", "Chaya",
84
-  "Chaz", "Chelsea", "Chelsey", "Chelsie", "Chesley", "Chester", "Chet",
85
-  "Cheyanne", "Cheyenne", "Chloe", "Chris", "Christ", "Christa", "Christelle",
86
-  "Christian", "Christiana", "Christina", "Christine", "Christop", "Christophe",
87
-  "Christopher", "Christy", "Chyna", "Ciara", "Cicero", "Cielo", "Cierra",
88
-  "Cindy", "Citlalli", "Clair", "Claire", "Clara", "Clarabelle", "Clare",
89
-  "Clarissa", "Clark", "Claud", "Claude", "Claudia", "Claudie", "Claudine",
90
-  "Clay", "Clemens", "Clement", "Clementina", "Clementine", "Clemmie", "Cleo",
91
-  "Cleora", "Cleta", "Cletus", "Cleve", "Cleveland", "Clifford", "Clifton",
92
-  "Clint", "Clinton", "Clotilde", "Clovis", "Cloyd", "Clyde", "Coby", "Cody",
93
-  "Colby", "Cole", "Coleman", "Colin", "Colleen", "Collin", "Colt", "Colten",
94
-  "Colton", "Columbus", "Concepcion", "Conner", "Connie", "Connor", "Conor",
95
-  "Conrad", "Constance", "Constantin", "Consuelo", "Cooper", "Cora", "Coralie",
96
-  "Corbin", "Cordelia", "Cordell", "Cordia", "Cordie", "Corene", "Corine",
97
-  "Cornelius", "Cornell", "Corrine", "Cortez", "Cortney", "Cory", "Coty",
98
-  "Courtney", "Coy", "Craig", "Crawford", "Creola", "Cristal", "Cristian",
99
-  "Cristina", "Cristobal", "Cristopher", "Cruz", "Crystal", "Crystel", "Cullen",
100
-  "Curt", "Curtis", "Cydney", "Cynthia", "Cyril", "Cyrus", "Dagmar", "Dahlia",
101
-  "Daija", "Daisha", "Daisy", "Dakota", "Dale", "Dallas", "Dallin", "Dalton",
102
-  "Damaris", "Dameon", "Damian", "Damien", "Damion", "Damon", "Dan", "Dana",
103
-  "Dandre", "Dane", "D'angelo", "Dangelo", "Danial", "Daniela", "Daniella",
104
-  "Danielle", "Danika", "Dannie", "Danny", "Dante", "Danyka", "Daphne",
105
-  "Daphnee", "Daphney", "Darby", "Daren", "Darian", "Dariana", "Darien",
106
-  "Dario", "Darion", "Darius", "Darlene", "Daron", "Darrel", "Darrell",
107
-  "Darren", "Darrick", "Darrin", "Darrion", "Darron", "Darryl", "Darwin",
108
-  "Daryl", "Dashawn", "Dasia", "Dave", "David", "Davin", "Davion", "Davon",
109
-  "Davonte", "Dawn", "Dawson", "Dax", "Dayana", "Dayna", "Dayne", "Dayton",
110
-  "Dean", "Deangelo", "Deanna", "Deborah", "Declan", "Dedric", "Dedrick", "Dee",
111
-  "Deion", "Deja", "Dejah", "Dejon", "Dejuan", "Delaney", "Delbert", "Delfina",
112
-  "Delia", "Delilah", "Dell", "Della", "Delmer", "Delores", "Delpha", "Delphia",
113
-  "Delphine", "Delta", "Demarco", "Demarcus", "Demario", "Demetris",
114
-  "Demetrius", "Demond", "Dena", "Denis", "Dennis", "Deon", "Deondre",
115
-  "Deontae", "Deonte", "Dereck", "Derek", "Derick", "Deron", "Derrick",
116
-  "Deshaun", "Deshawn", "Desiree", "Desmond", "Dessie", "Destany", "Destin",
117
-  "Destinee", "Destiney", "Destini", "Destiny", "Devan", "Devante", "Deven",
118
-  "Devin", "Devon", "Devonte", "Devyn", "Dewayne", "Dewitt", "Dexter",
119
-  "Diamond", "Diana", "Dianna", "Diego", "Dillan", "Dillon", "Dimitri", "Dina",
120
-  "Dino", "Dion", "Dixie", "Dock", "Dolly", "Dolores", "Domenic", "Domenica",
121
-  "Domenick", "Domenico", "Domingo", "Dominic", "Dominique", "Don", "Donald",
122
-  "Donato", "Donavon", "Donna", "Donnell", "Donnie", "Donny", "Dora", "Dorcas",
123
-  "Dorian", "Doris", "Dorothea", "Dorothy", "Dorris", "Dortha", "Dorthy",
124
-  "Doug", "Douglas", "Dovie", "Doyle", "Drake", "Drew", "Duane", "Dudley",
125
-  "Dulce", "Duncan", "Durward", "Dustin", "Dusty", "Dwight", "Dylan", "Earl",
126
-  "Earlene", "Earline", "Earnest", "Earnestine", "Easter", "Easton", "Ebba",
127
-  "Ebony", "Ed", "Eda", "Edd", "Eddie", "Eden", "Edgar", "Edgardo", "Edison",
128
-  "Edmond", "Edmund", "Edna", "Eduardo", "Edward", "Edwardo", "Edwin", "Edwina",
129
-  "Edyth", "Edythe", "Effie", "Efrain", "Efren", "Eileen", "Einar", "Eino",
130
-  "Eladio", "Elaina", "Elbert", "Elda", "Eldon", "Eldora", "Eldred", "Eldridge",
131
-  "Eleanora", "Eleanore", "Eleazar", "Electa", "Elena", "Elenor", "Elenora",
132
-  "Eleonore", "Elfrieda", "Eli", "Elian", "Eliane", "Elias", "Eliezer",
133
-  "Elijah", "Elinor", "Elinore", "Elisa", "Elisabeth", "Elise", "Eliseo",
134
-  "Elisha", "Elissa", "Eliza", "Elizabeth", "Ella", "Ellen", "Ellie", "Elliot",
135
-  "Elliott", "Ellis", "Ellsworth", "Elmer", "Elmira", "Elmo", "Elmore", "Elna",
136
-  "Elnora", "Elody", "Eloisa", "Eloise", "Elouise", "Eloy", "Elroy", "Elsa",
137
-  "Else", "Elsie", "Elta", "Elton", "Elva", "Elvera", "Elvie", "Elvis", "Elwin",
138
-  "Elwyn", "Elyse", "Elyssa", "Elza", "Emanuel", "Emelia", "Emelie", "Emely",
139
-  "Emerald", "Emerson", "Emery", "Emie", "Emil", "Emile", "Emilia", "Emiliano",
140
-  "Emilie", "Emilio", "Emily", "Emma", "Emmalee", "Emmanuel", "Emmanuelle",
141
-  "Emmet", "Emmett", "Emmie", "Emmitt", "Emmy", "Emory", "Ena", "Enid", "Enoch",
142
-  "Enola", "Enos", "Enrico", "Enrique", "Ephraim", "Era", "Eriberto", "Eric",
143
-  "Erica", "Erich", "Erick", "Ericka", "Erik", "Erika", "Erin", "Erling",
144
-  "Erna", "Ernest", "Ernestina", "Ernestine", "Ernesto", "Ernie", "Ervin",
145
-  "Erwin", "Eryn", "Esmeralda", "Esperanza", "Esta", "Esteban", "Estefania",
146
-  "Estel", "Estell", "Estella", "Estelle", "Estevan", "Esther", "Estrella",
147
-  "Etha", "Ethan", "Ethel", "Ethelyn", "Ethyl", "Ettie", "Eudora", "Eugene",
148
-  "Eugenia", "Eula", "Eulah", "Eulalia", "Euna", "Eunice", "Eusebio", "Eva",
149
-  "Evalyn", "Evan", "Evangeline", "Evans", "Eve", "Eveline", "Evelyn",
150
-  "Everardo", "Everett", "Everette", "Evert", "Evie", "Ewald", "Ewell",
151
-  "Ezekiel", "Ezequiel", "Ezra", "Fabian", "Fabiola", "Fae", "Fannie", "Fanny",
152
-  "Fatima", "Faustino", "Fausto", "Favian", "Fay", "Faye", "Federico",
153
-  "Felicia", "Felicita", "Felicity", "Felipa", "Felipe", "Felix", "Felton",
154
-  "Fermin", "Fern", "Fernando", "Ferne", "Fidel", "Filiberto", "Filomena",
155
-  "Finn", "Fiona", "Flavie", "Flavio", "Fleta", "Fletcher", "Flo", "Florence",
156
-  "Florencio", "Florian", "Florida", "Florine", "Flossie", "Floy", "Floyd",
157
-  "Ford", "Forest", "Forrest", "Foster", "Frances", "Francesca", "Francesco",
158
-  "Francis", "Francisca", "Francisco", "Franco", "Frank", "Frankie", "Franz",
159
-  "Fred", "Freda", "Freddie", "Freddy", "Frederic", "Frederick", "Frederik",
160
-  "Frederique", "Fredrick", "Fredy", "Freeda", "Freeman", "Freida", "Frida",
161
-  "Frieda", "Friedrich", "Fritz", "Furman", "Gabe", "Gabriel", "Gabriella",
162
-  "Gabrielle", "Gaetano", "Gage", "Gail", "Gardner", "Garett", "Garfield",
163
-  "Garland", "Garnet", "Garnett", "Garret", "Garrett", "Garrick", "Garrison",
164
-  "Garry", "Garth", "Gaston", "Gavin", "Gay", "Gayle", "Gaylord", "Gene",
165
-  "General", "Genesis", "Genevieve", "Gennaro", "Genoveva", "Geo", "Geoffrey",
166
-  "George", "Georgette", "Georgiana", "Georgianna", "Geovanni", "Geovanny",
167
-  "Geovany", "Gerald", "Geraldine", "Gerard", "Gerardo", "Gerda", "Gerhard",
168
-  "Germaine", "German", "Gerry", "Gerson", "Gertrude", "Gia", "Gianni",
169
-  "Gideon", "Gilbert", "Gilberto", "Gilda", "Giles", "Gillian", "Gina", "Gino",
170
-  "Giovani", "Giovanna", "Giovanni", "Giovanny", "Gisselle", "Giuseppe",
171
-  "Gladyce", "Gladys", "Glen", "Glenda", "Glenna", "Glennie", "Gloria",
172
-  "Godfrey", "Golda", "Golden", "Gonzalo", "Gordon", "Grace", "Gracie",
173
-  "Graciela", "Grady", "Graham", "Grant", "Granville", "Grayce", "Grayson",
174
-  "Green", "Greg", "Gregg", "Gregoria", "Gregorio", "Gregory", "Greta",
175
-  "Gretchen", "Greyson", "Griffin", "Grover", "Guadalupe", "Gudrun", "Guido",
176
-  "Guillermo", "Guiseppe", "Gunnar", "Gunner", "Gus", "Gussie", "Gust",
177
-  "Gustave", "Guy", "Gwen", "Gwendolyn", "Hadley", "Hailee", "Hailey", "Hailie",
178
-  "Hal", "Haleigh", "Haley", "Halie", "Halle", "Hallie", "Hank", "Hanna",
179
-  "Hannah", "Hans", "Hardy", "Harley", "Harmon", "Harmony", "Harold",
180
-  "Harrison", "Harry", "Harvey", "Haskell", "Hassan", "Hassie", "Hattie",
181
-  "Haven", "Hayden", "Haylee", "Hayley", "Haylie", "Hazel", "Hazle", "Heath",
182
-  "Heather", "Heaven", "Heber", "Hector", "Heidi", "Helen", "Helena", "Helene",
183
-  "Helga", "Hellen", "Helmer", "Heloise", "Henderson", "Henri", "Henriette",
184
-  "Henry", "Herbert", "Herman", "Hermann", "Hermina", "Herminia", "Herminio",
185
-  "Hershel", "Herta", "Hertha", "Hester", "Hettie", "Hilario", "Hilbert",
186
-  "Hilda", "Hildegard", "Hillard", "Hillary", "Hilma", "Hilton", "Hipolito",
187
-  "Hiram", "Hobart", "Holden", "Hollie", "Hollis", "Holly", "Hope", "Horace",
188
-  "Horacio", "Hortense", "Hosea", "Houston", "Howard", "Howell", "Hoyt",
189
-  "Hubert", "Hudson", "Hugh", "Hulda", "Humberto", "Hunter", "Hyman", "Ian",
190
-  "Ibrahim", "Icie", "Ida", "Idell", "Idella", "Ignacio", "Ignatius", "Ike",
191
-  "Ila", "Ilene", "Iliana", "Ima", "Imani", "Imelda", "Immanuel", "Imogene",
192
-  "Ines", "Irma", "Irving", "Irwin", "Isaac", "Isabel", "Isabell", "Isabella",
193
-  "Isabelle", "Isac", "Isadore", "Isai", "Isaiah", "Isaias", "Isidro", "Ismael",
194
-  "Isobel", "Isom", "Israel", "Issac", "Itzel", "Iva", "Ivah", "Ivory", "Ivy",
195
-  "Izabella", "Izaiah", "Jabari", "Jace", "Jacey", "Jacinthe", "Jacinto",
196
-  "Jack", "Jackeline", "Jackie", "Jacklyn", "Jackson", "Jacky", "Jaclyn",
197
-  "Jacquelyn", "Jacques", "Jacynthe", "Jada", "Jade", "Jaden", "Jadon", "Jadyn",
198
-  "Jaeden", "Jaida", "Jaiden", "Jailyn", "Jaime", "Jairo", "Jakayla", "Jake",
199
-  "Jakob", "Jaleel", "Jalen", "Jalon", "Jalyn", "Jamaal", "Jamal", "Jamar",
200
-  "Jamarcus", "Jamel", "Jameson", "Jamey", "Jamie", "Jamil", "Jamir", "Jamison",
201
-  "Jammie", "Jan", "Jana", "Janae", "Jane", "Janelle", "Janessa", "Janet",
202
-  "Janice", "Janick", "Janie", "Janis", "Janiya", "Jannie", "Jany", "Jaquan",
203
-  "Jaquelin", "Jaqueline", "Jared", "Jaren", "Jarod", "Jaron", "Jarred",
204
-  "Jarrell", "Jarret", "Jarrett", "Jarrod", "Jarvis", "Jasen", "Jasmin",
205
-  "Jason", "Jasper", "Jaunita", "Javier", "Javon", "Javonte", "Jay", "Jayce",
206
-  "Jaycee", "Jayda", "Jayde", "Jayden", "Jaydon", "Jaylan", "Jaylen", "Jaylin",
207
-  "Jaylon", "Jayme", "Jayne", "Jayson", "Jazlyn", "Jazmin", "Jazmyn", "Jazmyne",
208
-  "Jean", "Jeanette", "Jeanie", "Jeanne", "Jed", "Jedediah", "Jedidiah", "Jeff",
209
-  "Jefferey", "Jeffery", "Jeffrey", "Jeffry", "Jena", "Jenifer", "Jennie",
210
-  "Jennifer", "Jennings", "Jennyfer", "Jensen", "Jerad", "Jerald", "Jeramie",
211
-  "Jeramy", "Jerel", "Jeremie", "Jeremy", "Jermain", "Jermaine", "Jermey",
212
-  "Jerod", "Jerome", "Jeromy", "Jerrell", "Jerrod", "Jerrold", "Jerry", "Jess",
213
-  "Jesse", "Jessica", "Jessie", "Jessika", "Jessy", "Jessyca", "Jesus", "Jett",
214
-  "Jettie", "Jevon", "Jewel", "Jewell", "Jillian", "Jimmie", "Jimmy", "Jo",
215
-  "Joan", "Joana", "Joanie", "Joanne", "Joannie", "Joanny", "Joany", "Joaquin",
216
-  "Jocelyn", "Jodie", "Jody", "Joe", "Joel", "Joelle", "Joesph", "Joey",
217
-  "Johan", "Johann", "Johanna", "Johathan", "John", "Johnathan", "Johnathon",
218
-  "Johnnie", "Johnny", "Johnpaul", "Johnson", "Jolie", "Jon", "Jonas",
219
-  "Jonatan", "Jonathan", "Jonathon", "Jordan", "Jordane", "Jordi", "Jordon",
220
-  "Jordy", "Jordyn", "Jorge", "Jose", "Josefa", "Josefina", "Joseph",
221
-  "Josephine", "Josh", "Joshua", "Joshuah", "Josiah", "Josiane", "Josianne",
222
-  "Josie", "Josue", "Jovan", "Jovani", "Jovanny", "Jovany", "Joy", "Joyce",
223
-  "Juana", "Juanita", "Judah", "Judd", "Jude", "Judge", "Judson", "Judy",
224
-  "Jules", "Julia", "Julian", "Juliana", "Julianne", "Julie", "Julien",
225
-  "Juliet", "Julio", "Julius", "June", "Junior", "Junius", "Justen", "Justice",
226
-  "Justina", "Justine", "Juston", "Justus", "Justyn", "Juvenal", "Juwan",
227
-  "Kacey", "Kaci", "Kacie", "Kade", "Kaden", "Kadin", "Kaela", "Kaelyn", "Kaia",
228
-  "Kailee", "Kailey", "Kailyn", "Kaitlin", "Kaitlyn", "Kale", "Kaleb",
229
-  "Kaleigh", "Kaley", "Kali", "Kallie", "Kameron", "Kamille", "Kamren",
230
-  "Kamron", "Kamryn", "Kane", "Kara", "Kareem", "Karelle", "Karen", "Kari",
231
-  "Kariane", "Karianne", "Karina", "Karine", "Karl", "Karlee", "Karley",
232
-  "Karli", "Karlie", "Karolann", "Karson", "Kasandra", "Kasey", "Kassandra",
233
-  "Katarina", "Katelin", "Katelyn", "Katelynn", "Katharina", "Katherine",
234
-  "Katheryn", "Kathleen", "Kathlyn", "Kathryn", "Kathryne", "Katlyn", "Katlynn",
235
-  "Katrina", "Katrine", "Kattie", "Kavon", "Kay", "Kaya", "Kaycee", "Kayden",
236
-  "Kayla", "Kaylah", "Kaylee", "Kayleigh", "Kayley", "Kayli", "Kaylie",
237
-  "Kaylin", "Keagan", "Keanu", "Keara", "Keaton", "Keegan", "Keeley", "Keely",
238
-  "Keenan", "Keira", "Keith", "Kellen", "Kelley", "Kelli", "Kellie", "Kelly",
239
-  "Kelsi", "Kelsie", "Kelton", "Kelvin", "Ken", "Kendall", "Kendra", "Kendrick",
240
-  "Kenna", "Kennedi", "Kennedy", "Kenneth", "Kennith", "Kenny", "Kenton",
241
-  "Kenya", "Kenyatta", "Kenyon", "Keon", "Keshaun", "Keshawn", "Keven", "Kevin",
242
-  "Kevon", "Keyon", "Keyshawn", "Khalid", "Khalil", "Kian", "Kiana", "Kianna",
243
-  "Kiara", "Kiarra", "Kiel", "Kiera", "Kieran", "Kiley", "Kim", "Kimberly",
244
-  "King", "Kip", "Kira", "Kirk", "Kirsten", "Kirstin", "Kitty", "Kobe", "Koby",
245
-  "Kody", "Kolby", "Kole", "Korbin", "Korey", "Kory", "Kraig", "Kris", "Krista",
246
-  "Kristian", "Kristin", "Kristina", "Kristofer", "Kristoffer", "Kristopher",
247
-  "Kristy", "Krystal", "Krystel", "Krystina", "Kurt", "Kurtis", "Kyla", "Kyle",
248
-  "Kylee", "Kyleigh", "Kyler", "Kylie", "Kyra", "Lacey", "Lacy", "Ladarius",
249
-  "Lafayette", "Laila", "Laisha", "Lamar", "Lambert", "Lamont", "Lance",
250
-  "Landen", "Lane", "Laney", "Larissa", "Laron", "Larry", "Larue", "Laura",
251
-  "Laurel", "Lauren", "Laurence", "Lauretta", "Lauriane", "Laurianne", "Laurie",
252
-  "Laurine", "Laury", "Lauryn", "Lavada", "Lavern", "Laverna", "Laverne",
253
-  "Lavina", "Lavinia", "Lavon", "Lavonne", "Lawrence", "Lawson", "Layla",
254
-  "Layne", "Lazaro", "Lea", "Leann", "Leanna", "Leanne", "Leatha", "Leda",
255
-  "Lee", "Leif", "Leila", "Leilani", "Lela", "Lelah", "Leland", "Lelia",
256
-  "Lempi", "Lemuel", "Lenna", "Lennie", "Lenny", "Lenora", "Lenore", "Leo",
257
-  "Leola", "Leon", "Leonard", "Leonardo", "Leone", "Leonel", "Leonie", "Leonor",
258
-  "Leonora", "Leopold", "Leopoldo", "Leora", "Lera", "Lesley", "Leslie",
259
-  "Lesly", "Lessie", "Lester", "Leta", "Letha", "Letitia", "Levi", "Lew",
260
-  "Lewis", "Lexi", "Lexie", "Lexus", "Lia", "Liam", "Liana", "Libbie", "Libby",
261
-  "Lila", "Lilian", "Liliana", "Liliane", "Lilla", "Lillian", "Lilliana",
262
-  "Lillie", "Lilly", "Lily", "Lilyan", "Lina", "Lincoln", "Linda", "Lindsay",
263
-  "Lindsey", "Linnea", "Linnie", "Linwood", "Lionel", "Lisa", "Lisandro",
264
-  "Lisette", "Litzy", "Liza", "Lizeth", "Lizzie", "Llewellyn", "Lloyd", "Logan",
265
-  "Lois", "Lola", "Lolita", "Loma", "Lon", "London", "Lonie", "Lonnie", "Lonny",
266
-  "Lonzo", "Lora", "Loraine", "Loren", "Lorena", "Lorenz", "Lorenza", "Lorenzo",
267
-  "Lori", "Lorine", "Lorna", "Lottie", "Lou", "Louie", "Louisa", "Lourdes",
268
-  "Louvenia", "Lowell", "Loy", "Loyal", "Loyce", "Lucas", "Luciano", "Lucie",
269
-  "Lucienne", "Lucile", "Lucinda", "Lucio", "Lucious", "Lucius", "Lucy",
270
-  "Ludie", "Ludwig", "Lue", "Luella", "Luigi", "Luis", "Luisa", "Lukas", "Lula",
271
-  "Lulu", "Luna", "Lupe", "Lura", "Lurline", "Luther", "Luz", "Lyda", "Lydia",
272
-  "Lyla", "Lynn", "Lyric", "Lysanne", "Mabel", "Mabelle", "Mable", "Mac",
273
-  "Macey", "Maci", "Macie", "Mack", "Mackenzie", "Macy", "Madaline", "Madalyn",
274
-  "Maddison", "Madeline", "Madelyn", "Madelynn", "Madge", "Madie", "Madilyn",
275
-  "Madisen", "Madison", "Madisyn", "Madonna", "Madyson", "Mae", "Maegan",
276
-  "Maeve", "Mafalda", "Magali", "Magdalen", "Magdalena", "Maggie", "Magnolia",
277
-  "Magnus", "Maia", "Maida", "Maiya", "Major", "Makayla", "Makenna", "Makenzie",
278
-  "Malachi", "Malcolm", "Malika", "Malinda", "Mallie", "Mallory", "Malvina",
279
-  "Mandy", "Manley", "Manuel", "Manuela", "Mara", "Marc", "Marcel", "Marcelina",
280
-  "Marcelino", "Marcella", "Marcelle", "Marcellus", "Marcelo", "Marcia",
281
-  "Marco", "Marcos", "Marcus", "Margaret", "Margarete", "Margarett",
282
-  "Margaretta", "Margarette", "Margarita", "Marge", "Margie", "Margot",
283
-  "Margret", "Marguerite", "Maria", "Mariah", "Mariam", "Marian", "Mariana",
284
-  "Mariane", "Marianna", "Marianne", "Mariano", "Maribel", "Marie", "Mariela",
285
-  "Marielle", "Marietta", "Marilie", "Marilou", "Marilyne", "Marina", "Mario",
286
-  "Marion", "Marisa", "Marisol", "Maritza", "Marjolaine", "Marjorie", "Marjory",
287
-  "Mark", "Markus", "Marlee", "Marlen", "Marlene", "Marley", "Marlin", "Marlon",
288
-  "Marques", "Marquis", "Marquise", "Marshall", "Marta", "Martin", "Martina",
289
-  "Martine", "Marty", "Marvin", "Mary", "Maryam", "Maryjane", "Maryse", "Mason",
290
-  "Mateo", "Mathew", "Mathias", "Mathilde", "Matilda", "Matilde", "Matt",
291
-  "Matteo", "Mattie", "Maud", "Maude", "Maudie", "Maureen", "Maurice",
292
-  "Mauricio", "Maurine", "Maverick", "Mavis", "Max", "Maxie", "Maxime",
293
-  "Maximilian", "Maximillia", "Maximillian", "Maximo", "Maximus", "Maxine",
294
-  "Maxwell", "May", "Maya", "Maybell", "Maybelle", "Maye", "Maymie", "Maynard",
295
-  "Mayra", "Mazie", "Mckayla", "Mckenna", "Mckenzie", "Meagan", "Meaghan",
296
-  "Meda", "Megane", "Meggie", "Meghan", "Mekhi", "Melany", "Melba", "Melisa",
297
-  "Melissa", "Mellie", "Melody", "Melvin", "Melvina", "Melyna", "Melyssa",
298
-  "Mercedes", "Meredith", "Merl", "Merle", "Merlin", "Merritt", "Mertie",
299
-  "Mervin", "Meta", "Mia", "Micaela", "Micah", "Michael", "Michaela", "Michale",
300
-  "Micheal", "Michel", "Michele", "Michelle", "Miguel", "Mikayla", "Mike",
301
-  "Mikel", "Milan", "Miles", "Milford", "Miller", "Millie", "Milo", "Milton",
302
-  "Mina", "Minerva", "Minnie", "Miracle", "Mireille", "Mireya", "Misael",
303
-  "Missouri", "Misty", "Mitchel", "Mitchell", "Mittie", "Modesta", "Modesto",
304
-  "Mohamed", "Mohammad", "Mohammed", "Moises", "Mollie", "Molly", "Mona",
305
-  "Monica", "Monique", "Monroe", "Monserrat", "Monserrate", "Montana", "Monte",
306
-  "Monty", "Morgan", "Moriah", "Morris", "Mortimer", "Morton", "Mose", "Moses",
307
-  "Moshe", "Mossie", "Mozell", "Mozelle", "Muhammad", "Muriel", "Murl",
308
-  "Murphy", "Murray", "Mustafa", "Mya", "Myah", "Mylene", "Myles", "Myra",
309
-  "Myriam", "Myrl", "Myrna", "Myron", "Myrtice", "Myrtie", "Myrtis", "Myrtle",
310
-  "Nadia", "Nakia", "Name", "Nannie", "Naomi", "Naomie", "Napoleon", "Narciso",
311
-  "Nash", "Nasir", "Nat", "Natalia", "Natalie", "Natasha", "Nathan",
312
-  "Nathanael", "Nathanial", "Nathaniel", "Nathen", "Nayeli", "Neal", "Ned",
313
-  "Nedra", "Neha", "Neil", "Nelda", "Nella", "Nelle", "Nellie", "Nels",
314
-  "Nelson", "Neoma", "Nestor", "Nettie", "Neva", "Newell", "Newton", "Nia",
315
-  "Nicholas", "Nicholaus", "Nichole", "Nick", "Nicklaus", "Nickolas", "Nico",
316
-  "Nicola", "Nicolas", "Nicole", "Nicolette", "Nigel", "Nikita", "Nikki",
317
-  "Nikko", "Niko", "Nikolas", "Nils", "Nina", "Noah", "Noble", "Noe", "Noel",
318
-  "Noelia", "Noemi", "Noemie", "Noemy", "Nola", "Nolan", "Nona", "Nora",
319
-  "Norbert", "Norberto", "Norene", "Norma", "Norris", "Norval", "Norwood",
320
-  "Nova", "Novella", "Nya", "Nyah", "Nyasia", "Obie", "Oceane", "Ocie",
321
-  "Octavia", "Oda", "Odell", "Odessa", "Odie", "Ofelia", "Okey", "Ola", "Olaf",
322
-  "Ole", "Olen", "Oleta", "Olga", "Olin", "Oliver", "Ollie", "Oma", "Omari",
323
-  "Omer", "Ona", "Onie", "Opal", "Ophelia", "Ora", "Oral", "Oran", "Oren",
324
-  "Orie", "Orin", "Orion", "Orland", "Orlando", "Orlo", "Orpha", "Orrin",
325
-  "Orval", "Orville", "Osbaldo", "Osborne", "Oscar", "Osvaldo", "Oswald",
326
-  "Oswaldo", "Otha", "Otho", "Otilia", "Otis", "Ottilie", "Ottis", "Otto",
327
-  "Ova", "Owen", "Ozella", "Pablo", "Paige", "Palma", "Pamela", "Pansy",
328
-  "Paolo", "Paris", "Parker", "Pascale", "Pasquale", "Pat", "Patience",
329
-  "Patricia", "Patrick", "Patsy", "Pattie", "Paul", "Paula", "Pauline",
330
-  "Paxton", "Payton", "Pearl", "Pearlie", "Pearline", "Pedro", "Peggie",
331
-  "Penelope", "Percival", "Percy", "Perry", "Pete", "Peter", "Petra", "Peyton",
332
-  "Philip", "Phoebe", "Phyllis", "Pierce", "Pierre", "Pietro", "Pink", "Pinkie",
333
-  "Piper", "Polly", "Porter", "Precious", "Presley", "Preston", "Price",
334
-  "Prince", "Princess", "Priscilla", "Providenci", "Prudence", "Queen",
335
-  "Queenie", "Quentin", "Quincy", "Quinn", "Quinten", "Quinton", "Rachael",
336
-  "Rachel", "Rachelle", "Rae", "Raegan", "Rafael", "Rafaela", "Raheem",
337
-  "Rahsaan", "Rahul", "Raina", "Raleigh", "Ralph", "Ramiro", "Ramon", "Ramona",
338
-  "Randal", "Randall", "Randi", "Randy", "Ransom", "Raoul", "Raphael",
339
-  "Raphaelle", "Raquel", "Rashad", "Rashawn", "Rasheed", "Raul", "Raven", "Ray",
340
-  "Raymond", "Raymundo", "Reagan", "Reanna", "Reba", "Rebeca", "Rebecca",
341
-  "Rebeka", "Rebekah", "Reece", "Reed", "Reese", "Regan", "Reggie", "Reginald",
342
-  "Reid", "Reilly", "Reina", "Reinhold", "Remington", "Rene", "Renee", "Ressie",
343
-  "Reta", "Retha", "Retta", "Reuben", "Reva", "Rex", "Rey", "Reyes", "Reymundo",
344
-  "Reyna", "Reynold", "Rhea", "Rhett", "Rhianna", "Rhiannon", "Rhoda",
345
-  "Ricardo", "Richard", "Richie", "Richmond", "Rick", "Rickey", "Rickie",
346
-  "Ricky", "Rico", "Rigoberto", "Riley", "Rita", "River", "Robb", "Robbie",
347
-  "Robert", "Roberta", "Roberto", "Robin", "Robyn", "Rocio", "Rocky", "Rod",
348
-  "Roderick", "Rodger", "Rodolfo", "Rodrick", "Rodrigo", "Roel", "Rogelio",
349
-  "Roger", "Rogers", "Rolando", "Rollin", "Roma", "Romaine", "Roman", "Ron",
350
-  "Ronaldo", "Ronny", "Roosevelt", "Rory", "Rosa", "Rosalee", "Rosalia",
351
-  "Rosalind", "Rosalinda", "Rosalyn", "Rosamond", "Rosanna", "Rosario",
352
-  "Roscoe", "Rose", "Rosella", "Roselyn", "Rosemarie", "Rosemary", "Rosendo",
353
-  "Rosetta", "Rosie", "Rosina", "Roslyn", "Ross", "Rossie", "Rowan", "Rowena",
354
-  "Rowland", "Roxane", "Roxanne", "Roy", "Royal", "Royce", "Rozella", "Ruben",
355
-  "Rubie", "Ruby", "Rubye", "Rudolph", "Rudy", "Rupert", "Russ", "Russel",
356
-  "Russell", "Rusty", "Ruth", "Ruthe", "Ruthie", "Ryan", "Ryann", "Ryder",
357
-  "Rylan", "Rylee", "Ryleigh", "Ryley", "Sabina", "Sabrina", "Sabryna", "Sadie",
358
-  "Sadye", "Sage", "Saige", "Sallie", "Sally", "Salma", "Salvador", "Salvatore",
359
-  "Sam", "Samanta", "Samantha", "Samara", "Samir", "Sammie", "Sammy", "Samson",
360
-  "Sandra", "Sandrine", "Sandy", "Sanford", "Santa", "Santiago", "Santina",
361
-  "Santino", "Santos", "Sarah", "Sarai", "Sarina", "Sasha", "Saul", "Savanah",
362
-  "Savanna", "Savannah", "Savion", "Scarlett", "Schuyler", "Scot", "Scottie",
363
-  "Scotty", "Seamus", "Sean", "Sebastian", "Sedrick", "Selena", "Selina",
364
-  "Selmer", "Serena", "Serenity", "Seth", "Shad", "Shaina", "Shakira", "Shana",
365
-  "Shane", "Shanel", "Shanelle", "Shania", "Shanie", "Shaniya", "Shanna",
366
-  "Shannon", "Shanny", "Shanon", "Shany", "Sharon", "Shaun", "Shawn", "Shawna",
367
-  "Shaylee", "Shayna", "Shayne", "Shea", "Sheila", "Sheldon", "Shemar",
368
-  "Sheridan", "Sherman", "Sherwood", "Shirley", "Shyann", "Shyanne", "Sibyl",
369
-  "Sid", "Sidney", "Sienna", "Sierra", "Sigmund", "Sigrid", "Sigurd", "Silas",
370
-  "Sim", "Simeon", "Simone", "Sincere", "Sister", "Skye", "Skyla", "Skylar",
371
-  "Sofia", "Soledad", "Solon", "Sonia", "Sonny", "Sonya", "Sophia", "Sophie",
372
-  "Spencer", "Stacey", "Stacy", "Stan", "Stanford", "Stanley", "Stanton",
373
-  "Stefan", "Stefanie", "Stella", "Stephan", "Stephania", "Stephanie",
374
-  "Stephany", "Stephen", "Stephon", "Sterling", "Steve", "Stevie", "Stewart",
375
-  "Stone", "Stuart", "Summer", "Sunny", "Susan", "Susana", "Susanna", "Susie",
376
-  "Suzanne", "Sven", "Syble", "Sydnee", "Sydney", "Sydni", "Sydnie", "Sylvan",
377
-  "Sylvester", "Sylvia", "Tabitha", "Tad", "Talia", "Talon", "Tamara", "Tamia",
378
-  "Tania", "Tanner", "Tanya", "Tara", "Taryn", "Tate", "Tatum", "Tatyana",
379
-  "Taurean", "Tavares", "Taya", "Taylor", "Teagan", "Ted", "Telly", "Terence",
380
-  "Teresa", "Terrance", "Terrell", "Terrence", "Terrill", "Terry", "Tess",
381
-  "Tessie", "Tevin", "Thad", "Thaddeus", "Thalia", "Thea", "Thelma", "Theo",
382
-  "Theodora", "Theodore", "Theresa", "Therese", "Theresia", "Theron", "Thomas",
383
-  "Thora", "Thurman", "Tia", "Tiana", "Tianna", "Tiara", "Tierra", "Tiffany",
384
-  "Tillman", "Timmothy", "Timmy", "Timothy", "Tina", "Tito", "Titus", "Tobin",
385
-  "Toby", "Tod", "Tom", "Tomas", "Tomasa", "Tommie", "Toney", "Toni", "Tony",
386
-  "Torey", "Torrance", "Torrey", "Toy", "Trace", "Tracey", "Tracy", "Travis",
387
-  "Travon", "Tre", "Tremaine", "Tremayne", "Trent", "Trenton", "Tressa",
388
-  "Tressie", "Treva", "Trever", "Trevion", "Trevor", "Trey", "Trinity",
389
-  "Trisha", "Tristian", "Tristin", "Triston", "Troy", "Trudie", "Trycia",
390
-  "Trystan", "Turner", "Twila", "Tyler", "Tyra", "Tyree", "Tyreek", "Tyrel",
391
-  "Tyrell", "Tyrese", "Tyrique", "Tyshawn", "Tyson", "Ubaldo", "Ulices",
392
-  "Ulises", "Una", "Unique", "Urban", "Uriah", "Uriel", "Ursula", "Vada",
393
-  "Valentin", "Valentina", "Valentine", "Valerie", "Vallie", "Van", "Vance",
394
-  "Vanessa", "Vaughn", "Veda", "Velda", "Vella", "Velma", "Velva", "Vena",
395
-  "Verda", "Verdie", "Vergie", "Verla", "Verlie", "Vern", "Verna", "Verner",
396
-  "Vernice", "Vernie", "Vernon", "Verona", "Veronica", "Vesta", "Vicenta",
397
-  "Vicente", "Vickie", "Vicky", "Victor", "Victoria", "Vida", "Vidal", "Vilma",
398
-  "Vince", "Vincent", "Vincenza", "Vincenzo", "Vinnie", "Viola", "Violet",
399
-  "Violette", "Virgie", "Virgil", "Virginia", "Virginie", "Vita", "Vito",
400
-  "Viva", "Vivian", "Viviane", "Vivianne", "Vivien", "Vivienne", "Vladimir",
401
-  "Wade", "Waino", "Waldo", "Walker", "Wallace", "Walter", "Walton", "Wanda",
402
-  "Ward", "Warren", "Watson", "Wava", "Waylon", "Wayne", "Webster", "Weldon",
403
-  "Wellington", "Wendell", "Wendy", "Werner", "Westley", "Weston", "Whitney",
404
-  "Wilber", "Wilbert", "Wilburn", "Wiley", "Wilford", "Wilfred", "Wilfredo",
405
-  "Wilfrid", "Wilhelm", "Wilhelmine", "Will", "Willa", "Willard", "William",
406
-  "Willie", "Willis", "Willow", "Willy", "Wilma", "Wilmer", "Wilson", "Wilton",
407
-  "Winfield", "Winifred", "Winnifred", "Winona", "Winston", "Woodrow", "Wyatt",
408
-  "Wyman", "Xander", "Xavier", "Xzavier", "Yadira", "Yasmeen", "Yasmin",
409
-  "Yasmine", "Yazmin", "Yesenia", "Yessenia", "Yolanda", "Yoshiko", "Yvette",
410
-  "Yvonne", "Zachariah", "Zachary", "Zachery", "Zack", "Zackary", "Zackery",
411
-  "Zakary", "Zander", "Zane", "Zaria", "Zechariah", "Zelda", "Zella", "Zelma",
412
-  "Zena", "Zetta", "Zion", "Zita", "Zoe", "Zoey", "Zoie", "Zoila", "Zola",
413
-  "Zora", "Zula"
11
+    "Aaliyah", "Aaron", "Abagail", "Abbey", "Abbie", "Abbigail", "Abby",
12
+    "Abdiel", "Abdul", "Abdullah", "Abe", "Abel", "Abelardo", "Abigail",
13
+    "Abigale", "Abigayle", "Abner", "Abraham", "Ada", "Adah", "Adalberto",
14
+    "Adaline", "Adam", "Adan", "Addie", "Addison", "Adela", "Adelbert", "Adele",
15
+    "Adelia", "Adeline", "Adell", "Adella", "Adelle", "Aditya", "Adolf",
16
+    "Adolfo", "Adolph", "Adolphus", "Adonis", "Adrain", "Adrian", "Adriana",
17
+    "Adrianna", "Adriel", "Adrien", "Adrienne", "Afton", "Aglae", "Agnes",
18
+    "Agustin", "Agustina", "Ahmad", "Ahmed", "Aida", "Aidan", "Aiden", "Aileen",
19
+    "Aisha", "Aiyana", "Akeem", "Al", "Alaina", "Alan", "Alana", "Alanis",
20
+    "Alanna", "Alayna", "Alba", "Albert", "Alberta", "Albertha", "Alberto",
21
+    "Albin", "Albina", "Alda", "Alden", "Alec", "Aleen", "Alejandra",
22
+    "Alejandrin", "Alek", "Alena", "Alene", "Alessandra", "Alessandro",
23
+    "Alessia", "Aletha", "Alex", "Alexa", "Alexander", "Alexandra", "Alexandre",
24
+    "Alexandrea", "Alexandria", "Alexandrine", "Alexandro", "Alexane",
25
+    "Alexanne", "Alexie", "Alexis", "Alexys", "Alexzander", "Alf", "Alfonso",
26
+    "Alfonzo", "Alford", "Alfred", "Alfreda", "Alfredo", "Ali", "Alia", "Alice",
27
+    "Alicia", "Alisa", "Alisha", "Alison", "Alivia", "Aliya", "Aliyah", "Aliza",
28
+    "Alize", "Allan", "Allen", "Allene", "Allie", "Allison", "Ally", "Alphonso",
29
+    "Alta", "Althea", "Alva", "Alvah", "Alvena", "Alvera", "Alverta", "Alvina",
30
+    "Alvis", "Alyce", "Alycia", "Alysa", "Alysha", "Alyson", "Alysson",
31
+    "Amalia", "Amanda", "Amani", "Amara", "Amari", "Amaya", "Amber", "Ambrose",
32
+    "Amelia", "Amelie", "Amely", "America", "Americo", "Amie", "Amina", "Amir",
33
+    "Amira", "Amiya", "Amos", "Amparo", "Amy", "Amya", "Ana", "Anabel",
34
+    "Anabelle", "Anahi", "Anais", "Anastacio", "Anastasia", "Anderson", "Andre",
35
+    "Andreane", "Andreanne", "Andres", "Andrew", "Andy", "Angel", "Angela",
36
+    "Angelica", "Angelina", "Angeline", "Angelita", "Angelo", "Angie", "Angus",
37
+    "Anibal", "Anika", "Anissa", "Anita", "Aniya", "Aniyah", "Anjali", "Anna",
38
+    "Annabel", "Annabell", "Annabelle", "Annalise", "Annamae", "Annamarie",
39
+    "Anne", "Annetta", "Annette", "Annie", "Ansel", "Ansley", "Anthony",
40
+    "Antoinette", "Antone", "Antonetta", "Antonette", "Antonia", "Antonietta",
41
+    "Antonina", "Antonio", "Antwan", "Antwon", "Anya", "April", "Ara",
42
+    "Araceli", "Aracely", "Arch", "Archibald", "Ardella", "Arden", "Ardith",
43
+    "Arely", "Ari", "Ariane", "Arianna", "Aric", "Ariel", "Arielle", "Arjun",
44
+    "Arlene", "Arlie", "Arlo", "Armand", "Armando", "Armani", "Arnaldo", "Arne",
45
+    "Arno", "Arnold", "Arnoldo", "Arnulfo", "Aron", "Art", "Arthur", "Arturo",
46
+    "Arvel", "Arvid", "Arvilla", "Aryanna", "Asa", "Asha", "Ashlee", "Ashleigh",
47
+    "Ashley", "Ashly", "Ashlynn", "Ashton", "Ashtyn", "Asia", "Assunta",
48
+    "Astrid", "Athena", "Aubree", "Aubrey", "Audie", "Audra", "Audreanne",
49
+    "Audrey", "August", "Augusta", "Augustine", "Augustus", "Aurelia",
50
+    "Aurelie", "Aurelio", "Aurore", "Austen", "Austin", "Austyn", "Autumn",
51
+    "Ava", "Avery", "Avis", "Axel", "Ayana", "Ayden", "Ayla", "Aylin", "Baby",
52
+    "Bailee", "Bailey", "Barbara", "Barney", "Baron", "Barrett", "Barry",
53
+    "Bart", "Bartholome", "Barton", "Baylee", "Beatrice", "Beau", "Beaulah",
54
+    "Bell", "Bella", "Belle", "Ben", "Benedict", "Benjamin", "Bennett",
55
+    "Bennie", "Benny", "Benton", "Berenice", "Bernadette", "Bernadine",
56
+    "Bernard", "Bernardo", "Berneice", "Bernhard", "Bernice", "Bernie",
57
+    "Berniece", "Bernita", "Berry", "Bert", "Berta", "Bertha", "Bertram",
58
+    "Bertrand", "Beryl", "Bessie", "Beth", "Bethany", "Bethel", "Betsy",
59
+    "Bette", "Bettie", "Betty", "Bettye", "Beulah", "Beverly", "Bianka", "Bill",
60
+    "Billie", "Billy", "Birdie", "Blair", "Blaise", "Blake", "Blanca",
61
+    "Blanche", "Blaze", "Bo", "Bobbie", "Bobby", "Bonita", "Bonnie", "Boris",
62
+    "Boyd", "Brad", "Braden", "Bradford", "Bradley", "Bradly", "Brady",
63
+    "Braeden", "Brain", "Brandi", "Brando", "Brandon", "Brandt", "Brandy",
64
+    "Brandyn", "Brannon", "Branson", "Brant", "Braulio", "Braxton", "Brayan",
65
+    "Breana", "Breanna", "Breanne", "Brenda", "Brendan", "Brenden", "Brendon",
66
+    "Brenna", "Brennan", "Brennon", "Brent", "Bret", "Brett", "Bria", "Brian",
67
+    "Briana", "Brianne", "Brice", "Bridget", "Bridgette", "Bridie", "Brielle",
68
+    "Brigitte", "Brionna", "Brisa", "Britney", "Brittany", "Brock", "Broderick",
69
+    "Brody", "Brook", "Brooke", "Brooklyn", "Brooks", "Brown", "Bruce",
70
+    "Bryana", "Bryce", "Brycen", "Bryon", "Buck", "Bud", "Buddy", "Buford",
71
+    "Bulah", "Burdette", "Burley", "Burnice", "Buster", "Cade", "Caden",
72
+    "Caesar", "Caitlyn", "Cale", "Caleb", "Caleigh", "Cali", "Calista",
73
+    "Callie", "Camden", "Cameron", "Camila", "Camilla", "Camille", "Camren",
74
+    "Camron", "Camryn", "Camylle", "Candace", "Candelario", "Candice",
75
+    "Candida", "Candido", "Cara", "Carey", "Carissa", "Carlee", "Carleton",
76
+    "Carley", "Carli", "Carlie", "Carlo", "Carlos", "Carlotta", "Carmel",
77
+    "Carmela", "Carmella", "Carmelo", "Carmen", "Carmine", "Carol", "Carolanne",
78
+    "Carole", "Carolina", "Caroline", "Carolyn", "Carolyne", "Carrie",
79
+    "Carroll", "Carson", "Carter", "Cary", "Casandra", "Casey", "Casimer",
80
+    "Casimir", "Casper", "Cassandra", "Cassandre", "Cassidy", "Cassie",
81
+    "Catalina", "Caterina", "Catharine", "Catherine", "Cathrine", "Cathryn",
82
+    "Cathy", "Cayla", "Ceasar", "Cecelia", "Cecil", "Cecile", "Cecilia",
83
+    "Cedrick", "Celestine", "Celestino", "Celia", "Celine", "Cesar", "Chad",
84
+    "Chadd", "Chadrick", "Chaim", "Chance", "Chandler", "Chanel", "Chanelle",
85
+    "Charity", "Charlene", "Charles", "Charley", "Charlie", "Charlotte",
86
+    "Chase", "Chasity", "Chauncey", "Chaya", "Chaz", "Chelsea", "Chelsey",
87
+    "Chelsie", "Chesley", "Chester", "Chet", "Cheyanne", "Cheyenne", "Chloe",
88
+    "Chris", "Christ", "Christa", "Christelle", "Christian", "Christiana",
89
+    "Christina", "Christine", "Christop", "Christophe", "Christopher",
90
+    "Christy", "Chyna", "Ciara", "Cicero", "Cielo", "Cierra", "Cindy",
91
+    "Citlalli", "Clair", "Claire", "Clara", "Clarabelle", "Clare", "Clarissa",
92
+    "Clark", "Claud", "Claude", "Claudia", "Claudie", "Claudine", "Clay",
93
+    "Clemens", "Clement", "Clementina", "Clementine", "Clemmie", "Cleo",
94
+    "Cleora", "Cleta", "Cletus", "Cleve", "Cleveland", "Clifford", "Clifton",
95
+    "Clint", "Clinton", "Clotilde", "Clovis", "Cloyd", "Clyde", "Coby", "Cody",
96
+    "Colby", "Cole", "Coleman", "Colin", "Colleen", "Collin", "Colt", "Colten",
97
+    "Colton", "Columbus", "Concepcion", "Conner", "Connie", "Connor", "Conor",
98
+    "Conrad", "Constance", "Constantin", "Consuelo", "Cooper", "Cora",
99
+    "Coralie", "Corbin", "Cordelia", "Cordell", "Cordia", "Cordie", "Corene",
100
+    "Corine", "Cornelius", "Cornell", "Corrine", "Cortez", "Cortney", "Cory",
101
+    "Coty", "Courtney", "Coy", "Craig", "Crawford", "Creola", "Cristal",
102
+    "Cristian", "Cristina", "Cristobal", "Cristopher", "Cruz", "Crystal",
103
+    "Crystel", "Cullen", "Curt", "Curtis", "Cydney", "Cynthia", "Cyril",
104
+    "Cyrus", "Dagmar", "Dahlia", "Daija", "Daisha", "Daisy", "Dakota", "Dale",
105
+    "Dallas", "Dallin", "Dalton", "Damaris", "Dameon", "Damian", "Damien",
106
+    "Damion", "Damon", "Dan", "Dana", "Dandre", "Dane", "D'angelo", "Dangelo",
107
+    "Danial", "Daniela", "Daniella", "Danielle", "Danika", "Dannie", "Danny",
108
+    "Dante", "Danyka", "Daphne", "Daphnee", "Daphney", "Darby", "Daren",
109
+    "Darian", "Dariana", "Darien", "Dario", "Darion", "Darius", "Darlene",
110
+    "Daron", "Darrel", "Darrell", "Darren", "Darrick", "Darrin", "Darrion",
111
+    "Darron", "Darryl", "Darwin", "Daryl", "Dashawn", "Dasia", "Dave", "David",
112
+    "Davin", "Davion", "Davon", "Davonte", "Dawn", "Dawson", "Dax", "Dayana",
113
+    "Dayna", "Dayne", "Dayton", "Dean", "Deangelo", "Deanna", "Deborah",
114
+    "Declan", "Dedric", "Dedrick", "Dee", "Deion", "Deja", "Dejah", "Dejon",
115
+    "Dejuan", "Delaney", "Delbert", "Delfina", "Delia", "Delilah", "Dell",
116
+    "Della", "Delmer", "Delores", "Delpha", "Delphia", "Delphine", "Delta",
117
+    "Demarco", "Demarcus", "Demario", "Demetris", "Demetrius", "Demond", "Dena",
118
+    "Denis", "Dennis", "Deon", "Deondre", "Deontae", "Deonte", "Dereck",
119
+    "Derek", "Derick", "Deron", "Derrick", "Deshaun", "Deshawn", "Desiree",
120
+    "Desmond", "Dessie", "Destany", "Destin", "Destinee", "Destiney", "Destini",
121
+    "Destiny", "Devan", "Devante", "Deven", "Devin", "Devon", "Devonte",
122
+    "Devyn", "Dewayne", "Dewitt", "Dexter", "Diamond", "Diana", "Dianna",
123
+    "Diego", "Dillan", "Dillon", "Dimitri", "Dina", "Dino", "Dion", "Dixie",
124
+    "Dock", "Dolly", "Dolores", "Domenic", "Domenica", "Domenick", "Domenico",
125
+    "Domingo", "Dominic", "Dominique", "Don", "Donald", "Donato", "Donavon",
126
+    "Donna", "Donnell", "Donnie", "Donny", "Dora", "Dorcas", "Dorian", "Doris",
127
+    "Dorothea", "Dorothy", "Dorris", "Dortha", "Dorthy", "Doug", "Douglas",
128
+    "Dovie", "Doyle", "Drake", "Drew", "Duane", "Dudley", "Dulce", "Duncan",
129
+    "Durward", "Dustin", "Dusty", "Dwight", "Dylan", "Earl", "Earlene",
130
+    "Earline", "Earnest", "Earnestine", "Easter", "Easton", "Ebba", "Ebony",
131
+    "Ed", "Eda", "Edd", "Eddie", "Eden", "Edgar", "Edgardo", "Edison", "Edmond",
132
+    "Edmund", "Edna", "Eduardo", "Edward", "Edwardo", "Edwin", "Edwina",
133
+    "Edyth", "Edythe", "Effie", "Efrain", "Efren", "Eileen", "Einar", "Eino",
134
+    "Eladio", "Elaina", "Elbert", "Elda", "Eldon", "Eldora", "Eldred",
135
+    "Eldridge", "Eleanora", "Eleanore", "Eleazar", "Electa", "Elena", "Elenor",
136
+    "Elenora", "Eleonore", "Elfrieda", "Eli", "Elian", "Eliane", "Elias",
137
+    "Eliezer", "Elijah", "Elinor", "Elinore", "Elisa", "Elisabeth", "Elise",
138
+    "Eliseo", "Elisha", "Elissa", "Eliza", "Elizabeth", "Ella", "Ellen",
139
+    "Ellie", "Elliot", "Elliott", "Ellis", "Ellsworth", "Elmer", "Elmira",
140
+    "Elmo", "Elmore", "Elna", "Elnora", "Elody", "Eloisa", "Eloise", "Elouise",
141
+    "Eloy", "Elroy", "Elsa", "Else", "Elsie", "Elta", "Elton", "Elva", "Elvera",
142
+    "Elvie", "Elvis", "Elwin", "Elwyn", "Elyse", "Elyssa", "Elza", "Emanuel",
143
+    "Emelia", "Emelie", "Emely", "Emerald", "Emerson", "Emery", "Emie", "Emil",
144
+    "Emile", "Emilia", "Emiliano", "Emilie", "Emilio", "Emily", "Emma",
145
+    "Emmalee", "Emmanuel", "Emmanuelle", "Emmet", "Emmett", "Emmie", "Emmitt",
146
+    "Emmy", "Emory", "Ena", "Enid", "Enoch", "Enola", "Enos", "Enrico",
147
+    "Enrique", "Ephraim", "Era", "Eriberto", "Eric", "Erica", "Erich", "Erick",
148
+    "Ericka", "Erik", "Erika", "Erin", "Erling", "Erna", "Ernest", "Ernestina",
149
+    "Ernestine", "Ernesto", "Ernie", "Ervin", "Erwin", "Eryn", "Esmeralda",
150
+    "Esperanza", "Esta", "Esteban", "Estefania", "Estel", "Estell", "Estella",
151
+    "Estelle", "Estevan", "Esther", "Estrella", "Etha", "Ethan", "Ethel",
152
+    "Ethelyn", "Ethyl", "Ettie", "Eudora", "Eugene", "Eugenia", "Eula", "Eulah",
153
+    "Eulalia", "Euna", "Eunice", "Eusebio", "Eva", "Evalyn", "Evan",
154
+    "Evangeline", "Evans", "Eve", "Eveline", "Evelyn", "Everardo", "Everett",
155
+    "Everette", "Evert", "Evie", "Ewald", "Ewell", "Ezekiel", "Ezequiel",
156
+    "Ezra", "Fabian", "Fabiola", "Fae", "Fannie", "Fanny", "Fatima", "Faustino",
157
+    "Fausto", "Favian", "Fay", "Faye", "Federico", "Felicia", "Felicita",
158
+    "Felicity", "Felipa", "Felipe", "Felix", "Felton", "Fermin", "Fern",
159
+    "Fernando", "Ferne", "Fidel", "Filiberto", "Filomena", "Finn", "Fiona",
160
+    "Flavie", "Flavio", "Fleta", "Fletcher", "Flo", "Florence", "Florencio",
161
+    "Florian", "Florida", "Florine", "Flossie", "Floy", "Floyd", "Ford",
162
+    "Forest", "Forrest", "Foster", "Frances", "Francesca", "Francesco",
163
+    "Francis", "Francisca", "Francisco", "Franco", "Frank", "Frankie", "Franz",
164
+    "Fred", "Freda", "Freddie", "Freddy", "Frederic", "Frederick", "Frederik",
165
+    "Frederique", "Fredrick", "Fredy", "Freeda", "Freeman", "Freida", "Frida",
166
+    "Frieda", "Friedrich", "Fritz", "Furman", "Gabe", "Gabriel", "Gabriella",
167
+    "Gabrielle", "Gaetano", "Gage", "Gail", "Gardner", "Garett", "Garfield",
168
+    "Garland", "Garnet", "Garnett", "Garret", "Garrett", "Garrick", "Garrison",
169
+    "Garry", "Garth", "Gaston", "Gavin", "Gay", "Gayle", "Gaylord", "Gene",
170
+    "General", "Genesis", "Genevieve", "Gennaro", "Genoveva", "Geo", "Geoffrey",
171
+    "George", "Georgette", "Georgiana", "Georgianna", "Geovanni", "Geovanny",
172
+    "Geovany", "Gerald", "Geraldine", "Gerard", "Gerardo", "Gerda", "Gerhard",
173
+    "Germaine", "German", "Gerry", "Gerson", "Gertrude", "Gia", "Gianni",
174
+    "Gideon", "Gilbert", "Gilberto", "Gilda", "Giles", "Gillian", "Gina",
175
+    "Gino", "Giovani", "Giovanna", "Giovanni", "Giovanny", "Gisselle",
176
+    "Giuseppe", "Gladyce", "Gladys", "Glen", "Glenda", "Glenna", "Glennie",
177
+    "Gloria", "Godfrey", "Golda", "Golden", "Gonzalo", "Gordon", "Grace",
178
+    "Gracie", "Graciela", "Grady", "Graham", "Grant", "Granville", "Grayce",
179
+    "Grayson", "Green", "Greg", "Gregg", "Gregoria", "Gregorio", "Gregory",
180
+    "Greta", "Gretchen", "Greyson", "Griffin", "Grover", "Guadalupe", "Gudrun",
181
+    "Guido", "Guillermo", "Guiseppe", "Gunnar", "Gunner", "Gus", "Gussie",
182
+    "Gust", "Gustave", "Guy", "Gwen", "Gwendolyn", "Hadley", "Hailee", "Hailey",
183
+    "Hailie", "Hal", "Haleigh", "Haley", "Halie", "Halle", "Hallie", "Hank",
184
+    "Hanna", "Hannah", "Hans", "Hardy", "Harley", "Harmon", "Harmony", "Harold",
185
+    "Harrison", "Harry", "Harvey", "Haskell", "Hassan", "Hassie", "Hattie",
186
+    "Haven", "Hayden", "Haylee", "Hayley", "Haylie", "Hazel", "Hazle", "Heath",
187
+    "Heather", "Heaven", "Heber", "Hector", "Heidi", "Helen", "Helena",
188
+    "Helene", "Helga", "Hellen", "Helmer", "Heloise", "Henderson", "Henri",
189
+    "Henriette", "Henry", "Herbert", "Herman", "Hermann", "Hermina", "Herminia",
190
+    "Herminio", "Hershel", "Herta", "Hertha", "Hester", "Hettie", "Hilario",
191
+    "Hilbert", "Hilda", "Hildegard", "Hillard", "Hillary", "Hilma", "Hilton",
192
+    "Hipolito", "Hiram", "Hobart", "Holden", "Hollie", "Hollis", "Holly",
193
+    "Hope", "Horace", "Horacio", "Hortense", "Hosea", "Houston", "Howard",
194
+    "Howell", "Hoyt", "Hubert", "Hudson", "Hugh", "Hulda", "Humberto", "Hunter",
195
+    "Hyman", "Ian", "Ibrahim", "Icie", "Ida", "Idell", "Idella", "Ignacio",
196
+    "Ignatius", "Ike", "Ila", "Ilene", "Iliana", "Ima", "Imani", "Imelda",
197
+    "Immanuel", "Imogene", "Ines", "Irma", "Irving", "Irwin", "Isaac", "Isabel",
198
+    "Isabell", "Isabella", "Isabelle", "Isac", "Isadore", "Isai", "Isaiah",
199
+    "Isaias", "Isidro", "Ismael", "Isobel", "Isom", "Israel", "Issac", "Itzel",
200
+    "Iva", "Ivah", "Ivory", "Ivy", "Izabella", "Izaiah", "Jabari", "Jace",
201
+    "Jacey", "Jacinthe", "Jacinto", "Jack", "Jackeline", "Jackie", "Jacklyn",
202
+    "Jackson", "Jacky", "Jaclyn", "Jacquelyn", "Jacques", "Jacynthe", "Jada",
203
+    "Jade", "Jaden", "Jadon", "Jadyn", "Jaeden", "Jaida", "Jaiden", "Jailyn",
204
+    "Jaime", "Jairo", "Jakayla", "Jake", "Jakob", "Jaleel", "Jalen", "Jalon",
205
+    "Jalyn", "Jamaal", "Jamal", "Jamar", "Jamarcus", "Jamel", "Jameson",
206
+    "Jamey", "Jamie", "Jamil", "Jamir", "Jamison", "Jammie", "Jan", "Jana",
207
+    "Janae", "Jane", "Janelle", "Janessa", "Janet", "Janice", "Janick", "Janie",
208
+    "Janis", "Janiya", "Jannie", "Jany", "Jaquan", "Jaquelin", "Jaqueline",
209
+    "Jared", "Jaren", "Jarod", "Jaron", "Jarred", "Jarrell", "Jarret",
210
+    "Jarrett", "Jarrod", "Jarvis", "Jasen", "Jasmin", "Jason", "Jasper",
211
+    "Jaunita", "Javier", "Javon", "Javonte", "Jay", "Jayce", "Jaycee", "Jayda",
212
+    "Jayde", "Jayden", "Jaydon", "Jaylan", "Jaylen", "Jaylin", "Jaylon",
213
+    "Jayme", "Jayne", "Jayson", "Jazlyn", "Jazmin", "Jazmyn", "Jazmyne", "Jean",
214
+    "Jeanette", "Jeanie", "Jeanne", "Jed", "Jedediah", "Jedidiah", "Jeff",
215
+    "Jefferey", "Jeffery", "Jeffrey", "Jeffry", "Jena", "Jenifer", "Jennie",
216
+    "Jennifer", "Jennings", "Jennyfer", "Jensen", "Jerad", "Jerald", "Jeramie",
217
+    "Jeramy", "Jerel", "Jeremie", "Jeremy", "Jermain", "Jermaine", "Jermey",
218
+    "Jerod", "Jerome", "Jeromy", "Jerrell", "Jerrod", "Jerrold", "Jerry",
219
+    "Jess", "Jesse", "Jessica", "Jessie", "Jessika", "Jessy", "Jessyca",
220
+    "Jesus", "Jett", "Jettie", "Jevon", "Jewel", "Jewell", "Jillian", "Jimmie",
221
+    "Jimmy", "Jo", "Joan", "Joana", "Joanie", "Joanne", "Joannie", "Joanny",
222
+    "Joany", "Joaquin", "Jocelyn", "Jodie", "Jody", "Joe", "Joel", "Joelle",
223
+    "Joesph", "Joey", "Johan", "Johann", "Johanna", "Johathan", "John",
224
+    "Johnathan", "Johnathon", "Johnnie", "Johnny", "Johnpaul", "Johnson",
225
+    "Jolie", "Jon", "Jonas", "Jonatan", "Jonathan", "Jonathon", "Jordan",
226
+    "Jordane", "Jordi", "Jordon", "Jordy", "Jordyn", "Jorge", "Jose", "Josefa",
227
+    "Josefina", "Joseph", "Josephine", "Josh", "Joshua", "Joshuah", "Josiah",
228
+    "Josiane", "Josianne", "Josie", "Josue", "Jovan", "Jovani", "Jovanny",
229
+    "Jovany", "Joy", "Joyce", "Juana", "Juanita", "Judah", "Judd", "Jude",
230
+    "Judge", "Judson", "Judy", "Jules", "Julia", "Julian", "Juliana",
231
+    "Julianne", "Julie", "Julien", "Juliet", "Julio", "Julius", "June",
232
+    "Junior", "Junius", "Justen", "Justice", "Justina", "Justine", "Juston",
233
+    "Justus", "Justyn", "Juvenal", "Juwan", "Kacey", "Kaci", "Kacie", "Kade",
234
+    "Kaden", "Kadin", "Kaela", "Kaelyn", "Kaia", "Kailee", "Kailey", "Kailyn",
235
+    "Kaitlin", "Kaitlyn", "Kale", "Kaleb", "Kaleigh", "Kaley", "Kali", "Kallie",
236
+    "Kameron", "Kamille", "Kamren", "Kamron", "Kamryn", "Kane", "Kara",
237
+    "Kareem", "Karelle", "Karen", "Kari", "Kariane", "Karianne", "Karina",
238
+    "Karine", "Karl", "Karlee", "Karley", "Karli", "Karlie", "Karolann",
239
+    "Karson", "Kasandra", "Kasey", "Kassandra", "Katarina", "Katelin",
240
+    "Katelyn", "Katelynn", "Katharina", "Katherine", "Katheryn", "Kathleen",
241
+    "Kathlyn", "Kathryn", "Kathryne", "Katlyn", "Katlynn", "Katrina", "Katrine",
242
+    "Kattie", "Kavon", "Kay", "Kaya", "Kaycee", "Kayden", "Kayla", "Kaylah",
243
+    "Kaylee", "Kayleigh", "Kayley", "Kayli", "Kaylie", "Kaylin", "Keagan",
244
+    "Keanu", "Keara", "Keaton", "Keegan", "Keeley", "Keely", "Keenan", "Keira",
245
+    "Keith", "Kellen", "Kelley", "Kelli", "Kellie", "Kelly", "Kelsi", "Kelsie",
246
+    "Kelton", "Kelvin", "Ken", "Kendall", "Kendra", "Kendrick", "Kenna",
247
+    "Kennedi", "Kennedy", "Kenneth", "Kennith", "Kenny", "Kenton", "Kenya",
248
+    "Kenyatta", "Kenyon", "Keon", "Keshaun", "Keshawn", "Keven", "Kevin",
249
+    "Kevon", "Keyon", "Keyshawn", "Khalid", "Khalil", "Kian", "Kiana", "Kianna",
250
+    "Kiara", "Kiarra", "Kiel", "Kiera", "Kieran", "Kiley", "Kim", "Kimberly",
251
+    "King", "Kip", "Kira", "Kirk", "Kirsten", "Kirstin", "Kitty", "Kobe",
252
+    "Koby", "Kody", "Kolby", "Kole", "Korbin", "Korey", "Kory", "Kraig", "Kris",
253
+    "Krista", "Kristian", "Kristin", "Kristina", "Kristofer", "Kristoffer",
254
+    "Kristopher", "Kristy", "Krystal", "Krystel", "Krystina", "Kurt", "Kurtis",
255
+    "Kyla", "Kyle", "Kylee", "Kyleigh", "Kyler", "Kylie", "Kyra", "Lacey",
256
+    "Lacy", "Ladarius", "Lafayette", "Laila", "Laisha", "Lamar", "Lambert",
257
+    "Lamont", "Lance", "Landen", "Lane", "Laney", "Larissa", "Laron", "Larry",
258
+    "Larue", "Laura", "Laurel", "Lauren", "Laurence", "Lauretta", "Lauriane",
259
+    "Laurianne", "Laurie", "Laurine", "Laury", "Lauryn", "Lavada", "Lavern",
260
+    "Laverna", "Laverne", "Lavina", "Lavinia", "Lavon", "Lavonne", "Lawrence",
261
+    "Lawson", "Layla", "Layne", "Lazaro", "Lea", "Leann", "Leanna", "Leanne",
262
+    "Leatha", "Leda", "Lee", "Leif", "Leila", "Leilani", "Lela", "Lelah",
263
+    "Leland", "Lelia", "Lempi", "Lemuel", "Lenna", "Lennie", "Lenny", "Lenora",
264
+    "Lenore", "Leo", "Leola", "Leon", "Leonard", "Leonardo", "Leone", "Leonel",
265
+    "Leonie", "Leonor", "Leonora", "Leopold", "Leopoldo", "Leora", "Lera",
266
+    "Lesley", "Leslie", "Lesly", "Lessie", "Lester", "Leta", "Letha", "Letitia",
267
+    "Levi", "Lew", "Lewis", "Lexi", "Lexie", "Lexus", "Lia", "Liam", "Liana",
268
+    "Libbie", "Libby", "Lila", "Lilian", "Liliana", "Liliane", "Lilla",
269
+    "Lillian", "Lilliana", "Lillie", "Lilly", "Lily", "Lilyan", "Lina",
270
+    "Lincoln", "Linda", "Lindsay", "Lindsey", "Linnea", "Linnie", "Linwood",
271
+    "Lionel", "Lisa", "Lisandro", "Lisette", "Litzy", "Liza", "Lizeth",
272
+    "Lizzie", "Llewellyn", "Lloyd", "Logan", "Lois", "Lola", "Lolita", "Loma",
273
+    "Lon", "London", "Lonie", "Lonnie", "Lonny", "Lonzo", "Lora", "Loraine",
274
+    "Loren", "Lorena", "Lorenz", "Lorenza", "Lorenzo", "Lori", "Lorine",
275
+    "Lorna", "Lottie", "Lou", "Louie", "Louisa", "Lourdes", "Louvenia",
276
+    "Lowell", "Loy", "Loyal", "Loyce", "Lucas", "Luciano", "Lucie", "Lucienne",
277
+    "Lucile", "Lucinda", "Lucio", "Lucious", "Lucius", "Lucy", "Ludie",
278
+    "Ludwig", "Lue", "Luella", "Luigi", "Luis", "Luisa", "Lukas", "Lula",
279
+    "Lulu", "Luna", "Lupe", "Lura", "Lurline", "Luther", "Luz", "Lyda", "Lydia",
280
+    "Lyla", "Lynn", "Lyric", "Lysanne", "Mabel", "Mabelle", "Mable", "Mac",
281
+    "Macey", "Maci", "Macie", "Mack", "Mackenzie", "Macy", "Madaline",
282
+    "Madalyn", "Maddison", "Madeline", "Madelyn", "Madelynn", "Madge", "Madie",
283
+    "Madilyn", "Madisen", "Madison", "Madisyn", "Madonna", "Madyson", "Mae",
284
+    "Maegan", "Maeve", "Mafalda", "Magali", "Magdalen", "Magdalena", "Maggie",
285
+    "Magnolia", "Magnus", "Maia", "Maida", "Maiya", "Major", "Makayla",
286
+    "Makenna", "Makenzie", "Malachi", "Malcolm", "Malika", "Malinda", "Mallie",
287
+    "Mallory", "Malvina", "Mandy", "Manley", "Manuel", "Manuela", "Mara",
288
+    "Marc", "Marcel", "Marcelina", "Marcelino", "Marcella", "Marcelle",
289
+    "Marcellus", "Marcelo", "Marcia", "Marco", "Marcos", "Marcus", "Margaret",
290
+    "Margarete", "Margarett", "Margaretta", "Margarette", "Margarita", "Marge",
291
+    "Margie", "Margot", "Margret", "Marguerite", "Maria", "Mariah", "Mariam",
292
+    "Marian", "Mariana", "Mariane", "Marianna", "Marianne", "Mariano",
293
+    "Maribel", "Marie", "Mariela", "Marielle", "Marietta", "Marilie", "Marilou",
294
+    "Marilyne", "Marina", "Mario", "Marion", "Marisa", "Marisol", "Maritza",
295
+    "Marjolaine", "Marjorie", "Marjory", "Mark", "Markus", "Marlee", "Marlen",
296
+    "Marlene", "Marley", "Marlin", "Marlon", "Marques", "Marquis", "Marquise",
297
+    "Marshall", "Marta", "Martin", "Martina", "Martine", "Marty", "Marvin",
298
+    "Mary", "Maryam", "Maryjane", "Maryse", "Mason", "Mateo", "Mathew",
299
+    "Mathias", "Mathilde", "Matilda", "Matilde", "Matt", "Matteo", "Mattie",
300
+    "Maud", "Maude", "Maudie", "Maureen", "Maurice", "Mauricio", "Maurine",
301
+    "Maverick", "Mavis", "Max", "Maxie", "Maxime", "Maximilian", "Maximillia",
302
+    "Maximillian", "Maximo", "Maximus", "Maxine", "Maxwell", "May", "Maya",
303
+    "Maybell", "Maybelle", "Maye", "Maymie", "Maynard", "Mayra", "Mazie",
304
+    "Mckayla", "Mckenna", "Mckenzie", "Meagan", "Meaghan", "Meda", "Megane",
305
+    "Meggie", "Meghan", "Mekhi", "Melany", "Melba", "Melisa", "Melissa",
306
+    "Mellie", "Melody", "Melvin", "Melvina", "Melyna", "Melyssa", "Mercedes",
307
+    "Meredith", "Merl", "Merle", "Merlin", "Merritt", "Mertie", "Mervin",
308
+    "Meta", "Mia", "Micaela", "Micah", "Michael", "Michaela", "Michale",
309
+    "Micheal", "Michel", "Michele", "Michelle", "Miguel", "Mikayla", "Mike",
310
+    "Mikel", "Milan", "Miles", "Milford", "Miller", "Millie", "Milo", "Milton",
311
+    "Mina", "Minerva", "Minnie", "Miracle", "Mireille", "Mireya", "Misael",
312
+    "Missouri", "Misty", "Mitchel", "Mitchell", "Mittie", "Modesta", "Modesto",
313
+    "Mohamed", "Mohammad", "Mohammed", "Moises", "Mollie", "Molly", "Mona",
314
+    "Monica", "Monique", "Monroe", "Monserrat", "Monserrate", "Montana",
315
+    "Monte", "Monty", "Morgan", "Moriah", "Morris", "Mortimer", "Morton",
316
+    "Mose", "Moses", "Moshe", "Mossie", "Mozell", "Mozelle", "Muhammad",
317
+    "Muriel", "Murl", "Murphy", "Murray", "Mustafa", "Mya", "Myah", "Mylene",
318
+    "Myles", "Myra", "Myriam", "Myrl", "Myrna", "Myron", "Myrtice", "Myrtie",
319
+    "Myrtis", "Myrtle", "Nadia", "Nakia", "Name", "Nannie", "Naomi", "Naomie",
320
+    "Napoleon", "Narciso", "Nash", "Nasir", "Nat", "Natalia", "Natalie",
321
+    "Natasha", "Nathan", "Nathanael", "Nathanial", "Nathaniel", "Nathen",
322
+    "Nayeli", "Neal", "Ned", "Nedra", "Neha", "Neil", "Nelda", "Nella", "Nelle",
323
+    "Nellie", "Nels", "Nelson", "Neoma", "Nestor", "Nettie", "Neva", "Newell",
324
+    "Newton", "Nia", "Nicholas", "Nicholaus", "Nichole", "Nick", "Nicklaus",
325
+    "Nickolas", "Nico", "Nicola", "Nicolas", "Nicole", "Nicolette", "Nigel",
326
+    "Nikita", "Nikki", "Nikko", "Niko", "Nikolas", "Nils", "Nina", "Noah",
327
+    "Noble", "Noe", "Noel", "Noelia", "Noemi", "Noemie", "Noemy", "Nola",
328
+    "Nolan", "Nona", "Nora", "Norbert", "Norberto", "Norene", "Norma", "Norris",
329
+    "Norval", "Norwood", "Nova", "Novella", "Nya", "Nyah", "Nyasia", "Obie",
330
+    "Oceane", "Ocie", "Octavia", "Oda", "Odell", "Odessa", "Odie", "Ofelia",
331
+    "Okey", "Ola", "Olaf", "Ole", "Olen", "Oleta", "Olga", "Olin", "Oliver",
332
+    "Ollie", "Oma", "Omari", "Omer", "Ona", "Onie", "Opal", "Ophelia", "Ora",
333
+    "Oral", "Oran", "Oren", "Orie", "Orin", "Orion", "Orland", "Orlando",
334
+    "Orlo", "Orpha", "Orrin", "Orval", "Orville", "Osbaldo", "Osborne", "Oscar",
335
+    "Osvaldo", "Oswald", "Oswaldo", "Otha", "Otho", "Otilia", "Otis", "Ottilie",
336
+    "Ottis", "Otto", "Ova", "Owen", "Ozella", "Pablo", "Paige", "Palma",
337
+    "Pamela", "Pansy", "Paolo", "Paris", "Parker", "Pascale", "Pasquale", "Pat",
338
+    "Patience", "Patricia", "Patrick", "Patsy", "Pattie", "Paul", "Paula",
339
+    "Pauline", "Paxton", "Payton", "Pearl", "Pearlie", "Pearline", "Pedro",
340
+    "Peggie", "Penelope", "Percival", "Percy", "Perry", "Pete", "Peter",
341
+    "Petra", "Peyton", "Philip", "Phoebe", "Phyllis", "Pierce", "Pierre",
342
+    "Pietro", "Pink", "Pinkie", "Piper", "Polly", "Porter", "Precious",
343
+    "Presley", "Preston", "Price", "Prince", "Princess", "Priscilla",
344
+    "Providenci", "Prudence", "Queen", "Queenie", "Quentin", "Quincy", "Quinn",
345
+    "Quinten", "Quinton", "Rachael", "Rachel", "Rachelle", "Rae", "Raegan",
346
+    "Rafael", "Rafaela", "Raheem", "Rahsaan", "Rahul", "Raina", "Raleigh",
347
+    "Ralph", "Ramiro", "Ramon", "Ramona", "Randal", "Randall", "Randi", "Randy",
348
+    "Ransom", "Raoul", "Raphael", "Raphaelle", "Raquel", "Rashad", "Rashawn",
349
+    "Rasheed", "Raul", "Raven", "Ray", "Raymond", "Raymundo", "Reagan",
350
+    "Reanna", "Reba", "Rebeca", "Rebecca", "Rebeka", "Rebekah", "Reece", "Reed",
351
+    "Reese", "Regan", "Reggie", "Reginald", "Reid", "Reilly", "Reina",
352
+    "Reinhold", "Remington", "Rene", "Renee", "Ressie", "Reta", "Retha",
353
+    "Retta", "Reuben", "Reva", "Rex", "Rey", "Reyes", "Reymundo", "Reyna",
354
+    "Reynold", "Rhea", "Rhett", "Rhianna", "Rhiannon", "Rhoda", "Ricardo",
355
+    "Richard", "Richie", "Richmond", "Rick", "Rickey", "Rickie", "Ricky",
356
+    "Rico", "Rigoberto", "Riley", "Rita", "River", "Robb", "Robbie", "Robert",
357
+    "Roberta", "Roberto", "Robin", "Robyn", "Rocio", "Rocky", "Rod", "Roderick",
358
+    "Rodger", "Rodolfo", "Rodrick", "Rodrigo", "Roel", "Rogelio", "Roger",
359
+    "Rogers", "Rolando", "Rollin", "Roma", "Romaine", "Roman", "Ron", "Ronaldo",
360
+    "Ronny", "Roosevelt", "Rory", "Rosa", "Rosalee", "Rosalia", "Rosalind",
361
+    "Rosalinda", "Rosalyn", "Rosamond", "Rosanna", "Rosario", "Roscoe", "Rose",
362
+    "Rosella", "Roselyn", "Rosemarie", "Rosemary", "Rosendo", "Rosetta",
363
+    "Rosie", "Rosina", "Roslyn", "Ross", "Rossie", "Rowan", "Rowena", "Rowland",
364
+    "Roxane", "Roxanne", "Roy", "Royal", "Royce", "Rozella", "Ruben", "Rubie",
365
+    "Ruby", "Rubye", "Rudolph", "Rudy", "Rupert", "Russ", "Russel", "Russell",
366
+    "Rusty", "Ruth", "Ruthe", "Ruthie", "Ryan", "Ryann", "Ryder", "Rylan",
367
+    "Rylee", "Ryleigh", "Ryley", "Sabina", "Sabrina", "Sabryna", "Sadie",
368
+    "Sadye", "Sage", "Saige", "Sallie", "Sally", "Salma", "Salvador",
369
+    "Salvatore", "Sam", "Samanta", "Samantha", "Samara", "Samir", "Sammie",
370
+    "Sammy", "Samson", "Sandra", "Sandrine", "Sandy", "Sanford", "Santa",
371
+    "Santiago", "Santina", "Santino", "Santos", "Sarah", "Sarai", "Sarina",
372
+    "Sasha", "Saul", "Savanah", "Savanna", "Savannah", "Savion", "Scarlett",
373
+    "Schuyler", "Scot", "Scottie", "Scotty", "Seamus", "Sean", "Sebastian",
374
+    "Sedrick", "Selena", "Selina", "Selmer", "Serena", "Serenity", "Seth",
375
+    "Shad", "Shaina", "Shakira", "Shana", "Shane", "Shanel", "Shanelle",
376
+    "Shania", "Shanie", "Shaniya", "Shanna", "Shannon", "Shanny", "Shanon",
377
+    "Shany", "Sharon", "Shaun", "Shawn", "Shawna", "Shaylee", "Shayna",
378
+    "Shayne", "Shea", "Sheila", "Sheldon", "Shemar", "Sheridan", "Sherman",
379
+    "Sherwood", "Shirley", "Shyann", "Shyanne", "Sibyl", "Sid", "Sidney",
380
+    "Sienna", "Sierra", "Sigmund", "Sigrid", "Sigurd", "Silas", "Sim", "Simeon",
381
+    "Simone", "Sincere", "Sister", "Skye", "Skyla", "Skylar", "Sofia",
382
+    "Soledad", "Solon", "Sonia", "Sonny", "Sonya", "Sophia", "Sophie",
383
+    "Spencer", "Stacey", "Stacy", "Stan", "Stanford", "Stanley", "Stanton",
384
+    "Stefan", "Stefanie", "Stella", "Stephan", "Stephania", "Stephanie",
385
+    "Stephany", "Stephen", "Stephon", "Sterling", "Steve", "Stevie", "Stewart",
386
+    "Stone", "Stuart", "Summer", "Sunny", "Susan", "Susana", "Susanna", "Susie",
387
+    "Suzanne", "Sven", "Syble", "Sydnee", "Sydney", "Sydni", "Sydnie", "Sylvan",
388
+    "Sylvester", "Sylvia", "Tabitha", "Tad", "Talia", "Talon", "Tamara",
389
+    "Tamia", "Tania", "Tanner", "Tanya", "Tara", "Taryn", "Tate", "Tatum",
390
+    "Tatyana", "Taurean", "Tavares", "Taya", "Taylor", "Teagan", "Ted", "Telly",
391
+    "Terence", "Teresa", "Terrance", "Terrell", "Terrence", "Terrill", "Terry",
392
+    "Tess", "Tessie", "Tevin", "Thad", "Thaddeus", "Thalia", "Thea", "Thelma",
393
+    "Theo", "Theodora", "Theodore", "Theresa", "Therese", "Theresia", "Theron",
394
+    "Thomas", "Thora", "Thurman", "Tia", "Tiana", "Tianna", "Tiara", "Tierra",
395
+    "Tiffany", "Tillman", "Timmothy", "Timmy", "Timothy", "Tina", "Tito",
396
+    "Titus", "Tobin", "Toby", "Tod", "Tom", "Tomas", "Tomasa", "Tommie",
397
+    "Toney", "Toni", "Tony", "Torey", "Torrance", "Torrey", "Toy", "Trace",
398
+    "Tracey", "Tracy", "Travis", "Travon", "Tre", "Tremaine", "Tremayne",
399
+    "Trent", "Trenton", "Tressa", "Tressie", "Treva", "Trever", "Trevion",
400
+    "Trevor", "Trey", "Trinity", "Trisha", "Tristian", "Tristin", "Triston",
401
+    "Troy", "Trudie", "Trycia", "Trystan", "Turner", "Twila", "Tyler", "Tyra",
402
+    "Tyree", "Tyreek", "Tyrel", "Tyrell", "Tyrese", "Tyrique", "Tyshawn",
403
+    "Tyson", "Ubaldo", "Ulices", "Ulises", "Una", "Unique", "Urban", "Uriah",
404
+    "Uriel", "Ursula", "Vada", "Valentin", "Valentina", "Valentine", "Valerie",
405
+    "Vallie", "Van", "Vance", "Vanessa", "Vaughn", "Veda", "Velda", "Vella",
406
+    "Velma", "Velva", "Vena", "Verda", "Verdie", "Vergie", "Verla", "Verlie",
407
+    "Vern", "Verna", "Verner", "Vernice", "Vernie", "Vernon", "Verona",
408
+    "Veronica", "Vesta", "Vicenta", "Vicente", "Vickie", "Vicky", "Victor",
409
+    "Victoria", "Vida", "Vidal", "Vilma", "Vince", "Vincent", "Vincenza",
410
+    "Vincenzo", "Vinnie", "Viola", "Violet", "Violette", "Virgie", "Virgil",
411
+    "Virginia", "Virginie", "Vita", "Vito", "Viva", "Vivian", "Viviane",
412
+    "Vivianne", "Vivien", "Vivienne", "Vladimir", "Wade", "Waino", "Waldo",
413
+    "Walker", "Wallace", "Walter", "Walton", "Wanda", "Ward", "Warren",
414
+    "Watson", "Wava", "Waylon", "Wayne", "Webster", "Weldon", "Wellington",
415
+    "Wendell", "Wendy", "Werner", "Westley", "Weston", "Whitney", "Wilber",
416
+    "Wilbert", "Wilburn", "Wiley", "Wilford", "Wilfred", "Wilfredo", "Wilfrid",
417
+    "Wilhelm", "Wilhelmine", "Will", "Willa", "Willard", "William", "Willie",
418
+    "Willis", "Willow", "Willy", "Wilma", "Wilmer", "Wilson", "Wilton",
419
+    "Winfield", "Winifred", "Winnifred", "Winona", "Winston", "Woodrow",
420
+    "Wyatt", "Wyman", "Xander", "Xavier", "Xzavier", "Yadira", "Yasmeen",
421
+    "Yasmin", "Yasmine", "Yazmin", "Yesenia", "Yessenia", "Yolanda", "Yoshiko",
422
+    "Yvette", "Yvonne", "Zachariah", "Zachary", "Zachery", "Zack", "Zackary",
423
+    "Zackery", "Zakary", "Zander", "Zane", "Zaria", "Zechariah", "Zelda",
424
+    "Zella", "Zelma", "Zena", "Zetta", "Zion", "Zita", "Zoe", "Zoey", "Zoie",
425
+    "Zoila", "Zola", "Zora", "Zula"
414 426
 ];
415 427
 
416 428
 /**
@@ -418,12 +430,12 @@ var names = [
418 430
  * @returns {string} random username
419 431
  */
420 432
 function generateUsername () {
421
-  var name = RandomUtil.randomElement(names);
422
-  var suffix = RandomUtil.randomAlphanumStr(3);
433
+    var name = RandomUtil.randomElement(names);
434
+    var suffix = RandomUtil.randomAlphanumStr(3);
423 435
 
424
-  return name + '-' +  suffix;
436
+    return name + '-' +  suffix;
425 437
 }
426 438
 
427 439
 module.exports = {
428
-  generateUsername: generateUsername
440
+    generateUsername: generateUsername
429 441
 };

+ 29
- 29
modules/version/ComponentsVersions.js Просмотреть файл

@@ -37,47 +37,47 @@ function ComponentsVersions(conference) {
37 37
 ComponentsVersions.prototype.processPresence =
38 38
     function(node, mucResource, mucJid) {
39 39
 
40
-    if (node.attributes.xmlns !== 'http://jitsi.org/jitmeet') {
41
-        logger.warn("Ignored presence versions node - invalid xmlns", node);
42
-        return;
43
-    }
40
+        if (node.attributes.xmlns !== 'http://jitsi.org/jitmeet') {
41
+            logger.warn("Ignored presence versions node - invalid xmlns", node);
42
+            return;
43
+        }
44 44
 
45
-    if (!this.conference._isFocus(mucJid)) {
46
-        logger.warn(
45
+        if (!this.conference._isFocus(mucJid)) {
46
+            logger.warn(
47 47
             "Received versions not from the focus user: " + node, mucJid);
48
-        return;
49
-    }
48
+            return;
49
+        }
50 50
 
51
-    var log = [];
52
-    node.children.forEach(function(item){
51
+        var log = [];
52
+        node.children.forEach(function(item){
53 53
 
54
-        var componentName = item.attributes.name;
55
-        if (componentName !== ComponentsVersions.FOCUS_COMPONENT &&
54
+            var componentName = item.attributes.name;
55
+            if (componentName !== ComponentsVersions.FOCUS_COMPONENT &&
56 56
             componentName !== ComponentsVersions.XMPP_SERVER_COMPONENT &&
57 57
             componentName !== ComponentsVersions.VIDEOBRIDGE_COMPONENT) {
58
-            logger.warn(
58
+                logger.warn(
59 59
                 "Received version for not supported component name: "
60 60
                     + componentName);
61
-            return;
62
-        }
61
+                return;
62
+            }
63 63
 
64
-        var version = item.value;
65
-        if (this.versions[componentName] !== version) {
66
-            this.versions[componentName] = version;
67
-            logger.info("Got " + componentName + " version: " + version);
64
+            var version = item.value;
65
+            if (this.versions[componentName] !== version) {
66
+                this.versions[componentName] = version;
67
+                logger.info("Got " + componentName + " version: " + version);
68 68
 
69
-            log.push({
70
-                id: "component_version",
71
-                component: componentName,
72
-                version: version});
73
-        }
74
-    }.bind(this));
69
+                log.push({
70
+                    id: "component_version",
71
+                    component: componentName,
72
+                    version: version});
73
+            }
74
+        }.bind(this));
75 75
 
76 76
     // logs versions to stats
77
-    if (log.length > 0)        {
78
-Statistics.sendLog(JSON.stringify(log));
79
-}
80
-};
77
+        if (log.length > 0)        {
78
+            Statistics.sendLog(JSON.stringify(log));
79
+        }
80
+    };
81 81
 
82 82
 /**
83 83
  * Obtains the version of conferencing system component.

+ 7
- 7
modules/xmpp/Caps.js Просмотреть файл

@@ -108,17 +108,17 @@ export default class Caps extends Listenable {
108 108
             const node = user? user.node + "#" + user.version : null;
109 109
             return new Promise ( (resolve, reject) =>
110 110
                 this.disco.info(jid, node, response => {
111
-                        const features = new Set();
112
-                        $(response).find(">query>feature").each((idx, el) =>
111
+                    const features = new Set();
112
+                    $(response).find(">query>feature").each((idx, el) =>
113 113
                             features.add(el.getAttribute("var")));
114
-                        if(user) {
114
+                    if(user) {
115 115
                             // TODO: Maybe use the version + node + hash
116 116
                             // as keys?
117
-                            this.versionToCapabilities[user.version]
117
+                        this.versionToCapabilities[user.version]
118 118
                                 = features;
119
-                        }
120
-                        resolve(features);
121
-                    }, reject , timeout)
119
+                    }
120
+                    resolve(features);
121
+                }, reject , timeout)
122 122
             );
123 123
         }
124 124
         return Promise.resolve(this.versionToCapabilities[user.version]);

+ 77
- 77
modules/xmpp/ChatRoom.js Просмотреть файл

@@ -38,11 +38,11 @@ var parser = {
38 38
             }
39 39
             packet.c(node.tagName, node.attributes);
40 40
             if(node.value)                {
41
-packet.t(node.value);
42
-}
41
+                packet.t(node.value);
42
+            }
43 43
             if(node.children)                {
44
-this.json2packet(node.children, packet);
45
-}
44
+                this.json2packet(node.children, packet);
45
+            }
46 46
             packet.up();
47 47
         }
48 48
         // packet.up();
@@ -57,10 +57,10 @@ this.json2packet(node.children, packet);
57 57
 function filterNodeFromPresenceJSON(pres, nodeName){
58 58
     var res = [];
59 59
     for(let i = 0; i < pres.length; i++)        {
60
-if(pres[i].tagName === nodeName)            {
61
-res.push(pres[i]);
62
-}
63
-}
60
+        if(pres[i].tagName === nodeName)            {
61
+            res.push(pres[i]);
62
+        }
63
+    }
64 64
 
65 65
     return res;
66 66
 }
@@ -194,20 +194,20 @@ export default class ChatRoom extends Listenable {
194 194
     discoRoomInfo () {
195 195
       // https://xmpp.org/extensions/xep-0045.html#disco-roominfo
196 196
 
197
-      var getInfo = $iq({type: 'get', to: this.roomjid})
197
+        var getInfo = $iq({type: 'get', to: this.roomjid})
198 198
         .c('query', {xmlns: Strophe.NS.DISCO_INFO});
199 199
 
200
-      this.connection.sendIQ(getInfo, function (result) {
201
-        var locked = $(result).find('>query>feature[var="muc_passwordprotected"]')
200
+        this.connection.sendIQ(getInfo, function (result) {
201
+            var locked = $(result).find('>query>feature[var="muc_passwordprotected"]')
202 202
             .length === 1;
203
-        if (locked != this.locked) {
204
-          this.eventEmitter.emit(XMPPEvents.MUC_LOCK_CHANGED, locked);
205
-          this.locked = locked;
206
-        }
207
-      }.bind(this), function (error) {
208
-        GlobalOnErrorHandler.callErrorHandler(error);
209
-        logger.error("Error getting room info: ", error);
210
-      }.bind(this));
203
+            if (locked != this.locked) {
204
+                this.eventEmitter.emit(XMPPEvents.MUC_LOCK_CHANGED, locked);
205
+                this.locked = locked;
206
+            }
207
+        }.bind(this), function (error) {
208
+            GlobalOnErrorHandler.callErrorHandler(error);
209
+            logger.error("Error getting room info: ", error);
210
+        }.bind(this));
211 211
     }
212 212
 
213 213
 
@@ -282,12 +282,12 @@ export default class ChatRoom extends Listenable {
282 282
         for(let i = 0; i < nodes.length; i++)        {
283 283
             const node = nodes[i];
284 284
             switch(node.tagName)            {
285
-                case "nick":
286
-                    member.nick = node.value;
287
-                    break;
288
-                case "userId":
289
-                    member.id = node.value;
290
-                    break;
285
+            case "nick":
286
+                member.nick = node.value;
287
+                break;
288
+            case "userId":
289
+                member.id = node.value;
290
+                break;
291 291
             }
292 292
         }
293 293
 
@@ -305,8 +305,8 @@ export default class ChatRoom extends Listenable {
305 305
 
306 306
                 // set correct initial state of locked
307 307
                 if (this.password)                    {
308
-this.locked = true;
309
-}
308
+                    this.locked = true;
309
+                }
310 310
 
311 311
                 this.eventEmitter.emit(XMPPEvents.MUC_JOINED);
312 312
             }
@@ -346,8 +346,8 @@ this.locked = true;
346 346
 
347 347
             // store the new display name
348 348
             if(member.displayName)                {
349
-memberOfThis.displayName = member.displayName;
350
-}
349
+                memberOfThis.displayName = member.displayName;
350
+            }
351 351
         }
352 352
 
353 353
         // after we had fired member or room joined events, lets fire events
@@ -355,37 +355,37 @@ memberOfThis.displayName = member.displayName;
355 355
         for(let i = 0; i < nodes.length; i++)        {
356 356
             const node = nodes[i];
357 357
             switch(node.tagName)            {
358
-                case "nick":
359
-                    if(!member.isFocus) {
360
-                        var displayName = this.xmpp.options.displayJids
358
+            case "nick":
359
+                if(!member.isFocus) {
360
+                    var displayName = this.xmpp.options.displayJids
361 361
                             ? Strophe.getResourceFromJid(from) : member.nick;
362 362
 
363
-                        if (displayName && displayName.length > 0) {
364
-                            this.eventEmitter.emit(
363
+                    if (displayName && displayName.length > 0) {
364
+                        this.eventEmitter.emit(
365 365
                                 XMPPEvents.DISPLAY_NAME_CHANGED, from, displayName);
366
-                        }
367
-                    }
368
-                    break;
369
-                case "bridgeNotAvailable":
370
-                    if (member.isFocus && !this.noBridgeAvailable) {
371
-                        this.noBridgeAvailable = true;
372
-                        this.eventEmitter.emit(XMPPEvents.BRIDGE_DOWN);
373 366
                     }
367
+                }
368
+                break;
369
+            case "bridgeNotAvailable":
370
+                if (member.isFocus && !this.noBridgeAvailable) {
371
+                    this.noBridgeAvailable = true;
372
+                    this.eventEmitter.emit(XMPPEvents.BRIDGE_DOWN);
373
+                }
374
+                break;
375
+            case "jibri-recording-status":
376
+                jibri = node;
377
+                break;
378
+            case "call-control":
379
+                var att = node.attributes;
380
+                if(!att)                        {
374 381
                     break;
375
-                case "jibri-recording-status":
376
-                    jibri = node;
377
-                    break;
378
-                case "call-control":
379
-                    var att = node.attributes;
380
-                    if(!att)                        {
381
-break;
382
-}
383
-                    this.phoneNumber = att.phone || null;
384
-                    this.phonePin = att.pin || null;
385
-                    this.eventEmitter.emit(XMPPEvents.PHONE_NUMBER_CHANGED);
386
-                    break;
387
-                default:
388
-                    this.processNode(node, from);
382
+                }
383
+                this.phoneNumber = att.phone || null;
384
+                this.phonePin = att.pin || null;
385
+                this.eventEmitter.emit(XMPPEvents.PHONE_NUMBER_CHANGED);
386
+                break;
387
+            default:
388
+                this.processNode(node, from);
389 389
             }
390 390
         }
391 391
 
@@ -397,8 +397,8 @@ break;
397 397
         if(jibri)        {
398 398
             this.lastJibri = jibri;
399 399
             if(this.recording)                {
400
-this.recording.handleJibriPresence(jibri);
401
-}
400
+                this.recording.handleJibriPresence(jibri);
401
+            }
402 402
         }
403 403
     }
404 404
 
@@ -414,8 +414,8 @@ this.recording.handleJibriPresence(jibri);
414 414
                 this.eventEmitter, this.connection, this.focusMucJid,
415 415
                 this.options.jirecon, this.roomjid);
416 416
             if(this.lastJibri)                {
417
-this.recording.handleJibriPresence(this.lastJibri);
418
-}
417
+                this.recording.handleJibriPresence(this.lastJibri);
418
+            }
419 419
         }
420 420
         logger.info("Ignore focus: " + from + ", real JID: " + mucJid);
421 421
     }
@@ -473,8 +473,8 @@ this.recording.handleJibriPresence(this.lastJibri);
473 473
         delete this.lastPresences[jid];
474 474
 
475 475
         if(skipEvents)            {
476
-return;
477
-}
476
+            return;
477
+        }
478 478
 
479 479
         this.eventEmitter.emit(XMPPEvents.MUC_MEMBER_LEFT, jid);
480 480
 
@@ -525,8 +525,8 @@ return;
525 525
             // we fire muc_left only if this is not a kick,
526 526
             // kick has both statuses 110 and 307.
527 527
             if (!isKick)                {
528
-this.eventEmitter.emit(XMPPEvents.MUC_LEFT);
529
-}
528
+                this.eventEmitter.emit(XMPPEvents.MUC_LEFT);
529
+            }
530 530
         }
531 531
 
532 532
         if (isKick && this.myroomjid === from) {
@@ -573,7 +573,7 @@ this.eventEmitter.emit(XMPPEvents.MUC_LEFT);
573 573
         }
574 574
 
575 575
         if (from==this.roomjid && $(msg).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length) {
576
-          this.discoRoomInfo();
576
+            this.discoRoomInfo();
577 577
         }
578 578
 
579 579
         if (txt) {
@@ -658,7 +658,7 @@ this.eventEmitter.emit(XMPPEvents.MUC_LEFT);
658 658
     removeFromPresence (key) {
659 659
         var nodes = this.presMap.nodes.filter(function(node) {
660 660
             return key !== node.tagName;
661
-});
661
+        });
662 662
         this.presMap.nodes = nodes;
663 663
     }
664 664
 
@@ -701,8 +701,8 @@ this.eventEmitter.emit(XMPPEvents.MUC_LEFT);
701 701
     setVideoMute (mute, callback) {
702 702
         this.sendVideoInfoPresence(mute);
703 703
         if(callback)            {
704
-callback(mute);
705
-}
704
+            callback(mute);
705
+        }
706 706
     }
707 707
 
708 708
     setAudioMute (mute, callback) {
@@ -723,8 +723,8 @@ callback(mute);
723 723
             this.sendPresence();
724 724
         }
725 725
         if(callback)            {
726
-callback();
727
-}
726
+            callback();
727
+        }
728 728
     }
729 729
 
730 730
     addVideoInfoToPresence (mute) {
@@ -738,8 +738,8 @@ callback();
738 738
     sendVideoInfoPresence (mute) {
739 739
         this.addVideoInfoToPresence(mute);
740 740
         if(!this.connection)            {
741
-return;
742
-}
741
+            return;
742
+        }
743 743
         this.sendPresence();
744 744
     }
745 745
 
@@ -791,8 +791,8 @@ return;
791 791
      */
792 792
     isRecordingSupported () {
793 793
         if(this.recording)            {
794
-return this.recording.isSupported();
795
-}
794
+            return this.recording.isSupported();
795
+        }
796 796
         return false;
797 797
     }
798 798
 
@@ -818,8 +818,8 @@ return this.recording.isSupported();
818 818
      */
819 819
     toggleRecording (options, statusChangeHandler) {
820 820
         if(this.recording)            {
821
-return this.recording.toggleRecording(options, statusChangeHandler);
822
-}
821
+            return this.recording.toggleRecording(options, statusChangeHandler);
822
+        }
823 823
 
824 824
         return statusChangeHandler("error",
825 825
             new Error("The conference is not created yet!"));
@@ -830,8 +830,8 @@ return this.recording.toggleRecording(options, statusChangeHandler);
830 830
      */
831 831
     isSIPCallingSupported () {
832 832
         if(this.moderator)            {
833
-return this.moderator.isSipGatewayEnabled();
834
-}
833
+            return this.moderator.isSipGatewayEnabled();
834
+        }
835 835
         return false;
836 836
     }
837 837
 

+ 71
- 71
modules/xmpp/JingleSessionPC.js Просмотреть файл

@@ -131,12 +131,12 @@ export default class JingleSessionPC extends JingleSession {
131 131
                     protocol = protocol.toLowerCase();
132 132
                     if (protocol === 'tcp' || protocol === 'ssltcp') {
133 133
                         if (this.webrtcIceTcpDisable)                            {
134
-return;
135
-}
134
+                            return;
135
+                        }
136 136
                     } else if (protocol == 'udp') {
137 137
                         if (this.webrtcIceUdpDisable)                            {
138
-return;
139
-}
138
+                            return;
139
+                        }
140 140
                     }
141 141
                 }
142 142
             }
@@ -151,8 +151,8 @@ return;
151 151
         // I suppose at some point this will be moved to onconnectionstatechange
152 152
         this.peerconnection.onsignalingstatechange = () => {
153 153
             if (!this.peerconnection) {
154
-return;
155
-}
154
+                return;
155
+            }
156 156
             if (this.peerconnection.signalingState === 'stable') {
157 157
                 this.wasstable = true;
158 158
             } else if (
@@ -170,8 +170,8 @@ return;
170 170
          */
171 171
         this.peerconnection.oniceconnectionstatechange = () => {
172 172
             if (!this.peerconnection) {
173
-return;
174
-}
173
+                return;
174
+            }
175 175
             const now = window.performance.now();
176 176
             this.room.connectionTimes["ice.state." +
177 177
             this.peerconnection.iceConnectionState] = now;
@@ -183,33 +183,33 @@ return;
183 183
                 XMPPEvents.ICE_CONNECTION_STATE_CHANGED,
184 184
                 this.peerconnection.iceConnectionState);
185 185
             switch (this.peerconnection.iceConnectionState) {
186
-                case 'connected':
186
+            case 'connected':
187 187
                     // Informs interested parties that the connection has been
188 188
                     // restored.
189
-                    if (this.peerconnection.signalingState === 'stable'
189
+                if (this.peerconnection.signalingState === 'stable'
190 190
                             && this.isreconnect) {
191
-                        this.room.eventEmitter.emit(
191
+                    this.room.eventEmitter.emit(
192 192
                             XMPPEvents.CONNECTION_RESTORED);
193
-                    }
194
-                    this.isreconnect = false;
193
+                }
194
+                this.isreconnect = false;
195 195
 
196
+                break;
197
+            case 'disconnected':
198
+                if (this.closed)                        {
196 199
                     break;
197
-                case 'disconnected':
198
-                    if (this.closed)                        {
199
-break;
200
-}
201
-                    this.isreconnect = true;
200
+                }
201
+                this.isreconnect = true;
202 202
                     // Informs interested parties that the connection has been
203 203
                     // interrupted.
204
-                    if (this.wasstable)                        {
205
-this.room.eventEmitter.emit(
206
-                            XMPPEvents.CONNECTION_INTERRUPTED);
207
-}
208
-                    break;
209
-                case 'failed':
204
+                if (this.wasstable)                        {
210 205
                     this.room.eventEmitter.emit(
206
+                            XMPPEvents.CONNECTION_INTERRUPTED);
207
+                }
208
+                break;
209
+            case 'failed':
210
+                this.room.eventEmitter.emit(
211 211
                         XMPPEvents.CONNECTION_ICE_FAILED, this.peerconnection);
212
-                    break;
212
+                break;
213 213
             }
214 214
         };
215 215
         this.peerconnection.onnegotiationneeded = () => {
@@ -237,8 +237,8 @@ this.room.eventEmitter.emit(
237 237
                     // start 20ms callout
238 238
                     setTimeout(() => {
239 239
                         if (this.drip_container.length === 0) {
240
-return;
241
-}
240
+                            return;
241
+                        }
242 242
                         this.sendIceCandidates(this.drip_container);
243 243
                         this.drip_container = [];
244 244
                     }, 20);
@@ -654,7 +654,7 @@ return;
654 654
                         lines += 'a=ssrc-group:' + semantics
655 655
                             + ' ' + ssrcs.join(' ') + '\r\n';
656 656
                     }
657
-            });
657
+                });
658 658
             // handles both >source and >description>source
659 659
             const tmp
660 660
                 = $(content).find(
@@ -669,15 +669,15 @@ return;
669 669
                 $(this).find('>parameter').each(function () {
670 670
                     lines += 'a=ssrc:' + ssrc + ' ' + $(this).attr('name');
671 671
                     if ($(this).attr('value') && $(this).attr('value').length)                        {
672
-lines += ':' + $(this).attr('value');
673
-}
672
+                        lines += ':' + $(this).attr('value');
673
+                    }
674 674
                     lines += '\r\n';
675 675
                 });
676 676
             });
677 677
             currentRemoteSdp.media.forEach(function(media, idx) {
678 678
                 if (!SDPUtil.find_line(media, 'a=mid:' + name))                    {
679
-return;
680
-}
679
+                    return;
680
+                }
681 681
                 if (!addSsrcInfo[idx]) {
682 682
                     addSsrcInfo[idx] = '';
683 683
                 }
@@ -903,8 +903,8 @@ return;
903 903
                             this.peerconnection.setLocalDescription(
904 904
                                 answer,
905 905
                                 () => {
906
- resolve(); 
907
-},
906
+                                    resolve(); 
907
+                                },
908 908
                                 (error) => {
909 909
                                     reject(
910 910
                                         "setLocalDescription failed: " + error);
@@ -912,14 +912,14 @@ return;
912 912
                             );
913 913
                         },
914 914
                         (error) => {
915
- reject("createAnswer failed: " + error); 
916
-},
915
+                            reject("createAnswer failed: " + error); 
916
+                        },
917 917
                         media_constraints
918 918
                     );
919 919
                 },
920 920
                 (error) => {
921
- reject("setRemoteDescription failed: " + error); 
922
-}
921
+                    reject("setRemoteDescription failed: " + error); 
922
+                }
923 923
             );
924 924
         });
925 925
     }
@@ -1029,7 +1029,7 @@ return;
1029 1029
                         lines += 'a=ssrc-group:' + semantics
1030 1030
                             + ' ' + ssrcs.join(' ') + '\r\n';
1031 1031
                     }
1032
-            });
1032
+                });
1033 1033
             const ssrcs = [];
1034 1034
             // handles both >source and >description>source versions
1035 1035
             const tmp
@@ -1041,8 +1041,8 @@ return;
1041 1041
             });
1042 1042
             currentRemoteSdp.media.forEach(function(media, idx) {
1043 1043
                 if (!SDPUtil.find_line(media, 'a=mid:' + name))                    {
1044
-return;
1045
-}
1044
+                    return;
1045
+                }
1046 1046
                 if (!removeSsrcInfo[idx]) {
1047 1047
                     removeSsrcInfo[idx] = '';
1048 1048
                 }
@@ -1261,11 +1261,11 @@ return;
1261 1261
         let sdpDiffer = new SDPDiffer(new_sdp, old_sdp);
1262 1262
         const remove = $iq({to: this.peerjid, type: 'set'})
1263 1263
             .c('jingle', {
1264
-                    xmlns: 'urn:xmpp:jingle:1',
1265
-                    action: 'source-remove',
1266
-                    initiator: this.initiator,
1267
-                    sid: this.sid
1268
-                }
1264
+                xmlns: 'urn:xmpp:jingle:1',
1265
+                action: 'source-remove',
1266
+                initiator: this.initiator,
1267
+                sid: this.sid
1268
+            }
1269 1269
             );
1270 1270
         sdpDiffer.toJingle(remove);
1271 1271
         const removed = this.fixJingle(remove);
@@ -1286,11 +1286,11 @@ return;
1286 1286
         sdpDiffer = new SDPDiffer(old_sdp, new_sdp);
1287 1287
         const add = $iq({to: this.peerjid, type: 'set'})
1288 1288
             .c('jingle', {
1289
-                    xmlns: 'urn:xmpp:jingle:1',
1290
-                    action: 'source-add',
1291
-                    initiator: this.initiator,
1292
-                    sid: this.sid
1293
-                }
1289
+                xmlns: 'urn:xmpp:jingle:1',
1290
+                action: 'source-add',
1291
+                initiator: this.initiator,
1292
+                sid: this.sid
1293
+            }
1294 1294
             );
1295 1295
 
1296 1296
         sdpDiffer.toJingle(add);
@@ -1337,8 +1337,8 @@ return;
1337 1337
                 error.code = errorElSel.attr('code');
1338 1338
                 const errorReasonSel = $(errResponse).find('error :first');
1339 1339
                 if (errorReasonSel.length)                    {
1340
-error.reason = errorReasonSel[0].tagName;
1341
-}
1340
+                    error.reason = errorReasonSel[0].tagName;
1341
+                }
1342 1342
             }
1343 1343
 
1344 1344
             if (!errResponse) {
@@ -1418,18 +1418,18 @@ error.reason = errorReasonSel[0].tagName;
1418 1418
         /* eslint-disable no-case-declarations */
1419 1419
         const action = $(jingle.nodeTree).find("jingle").attr("action");
1420 1420
         switch (action) {
1421
-            case "source-add":
1422
-            case "session-accept":
1423
-                this.fixSourceAddJingle(jingle);
1424
-                break;
1425
-            case "source-remove":
1426
-                this.fixSourceRemoveJingle(jingle);
1427
-                break;
1428
-            default:
1429
-                const errmsg = "Unknown jingle action!";
1430
-                GlobalOnErrorHandler.callErrorHandler(errmsg);
1431
-                logger.error(errmsg);
1432
-                return false;
1421
+        case "source-add":
1422
+        case "session-accept":
1423
+            this.fixSourceAddJingle(jingle);
1424
+            break;
1425
+        case "source-remove":
1426
+            this.fixSourceRemoveJingle(jingle);
1427
+            break;
1428
+        default:
1429
+            const errmsg = "Unknown jingle action!";
1430
+            GlobalOnErrorHandler.callErrorHandler(errmsg);
1431
+            logger.error(errmsg);
1432
+            return false;
1433 1433
         }/* eslint-enable no-case-declarations */
1434 1434
 
1435 1435
         const sources
@@ -1451,8 +1451,8 @@ error.reason = errorReasonSel[0].tagName;
1451 1451
                 const desc = $(jingle.tree()).find(">jingle>content[name=\"" +
1452 1452
                     ssrcObj.mtype + "\"]>description");
1453 1453
                 if (!desc || !desc.length)                    {
1454
-return;
1455
-}
1454
+                    return;
1455
+                }
1456 1456
                 ssrcObj.ssrcs.forEach(function (ssrc) {
1457 1457
                     const sourceNode = desc.find(">source[ssrc=\"" +
1458 1458
                         ssrc + "\"]");
@@ -1517,7 +1517,7 @@ return;
1517 1517
         let ssrcs = this.modifiedSSRCs["mute"];
1518 1518
         this.modifiedSSRCs["mute"] = [];
1519 1519
         if (ssrcs && ssrcs.length)            {
1520
-ssrcs.forEach(function (ssrcObj) {
1520
+            ssrcs.forEach(function (ssrcObj) {
1521 1521
                 ssrcObj.ssrcs.forEach(function (ssrc) {
1522 1522
                     const sourceNode
1523 1523
                         = $(jingle.tree()).find(">jingle>content[name=\"" +
@@ -1535,12 +1535,12 @@ ssrcs.forEach(function (ssrcObj) {
1535 1535
                     groupNode.remove();
1536 1536
                 });
1537 1537
             });
1538
-}
1538
+        }
1539 1539
 
1540 1540
         ssrcs = this.modifiedSSRCs["remove"];
1541 1541
         this.modifiedSSRCs["remove"] = [];
1542 1542
         if (ssrcs && ssrcs.length)            {
1543
-ssrcs.forEach(function (ssrcObj) {
1543
+            ssrcs.forEach(function (ssrcObj) {
1544 1544
                 const desc
1545 1545
                     = JingleSessionPC.createDescriptionNode(
1546 1546
                         jingle, ssrcObj.mtype);
@@ -1571,7 +1571,7 @@ ssrcs.forEach(function (ssrcObj) {
1571 1571
                     }
1572 1572
                 });
1573 1573
             });
1574
-}
1574
+        }
1575 1575
     }
1576 1576
 
1577 1577
     /**

+ 6
- 6
modules/xmpp/RtxModifier.js Просмотреть файл

@@ -122,8 +122,8 @@ export default class RtxModifier {
122 122
             return sdpStr;
123 123
         }
124 124
         if (videoMLine.getSSRCCount() < 1) {
125
-          logger.debug("RtxModifier doing nothing, no video ssrcs present");
126
-          return sdpStr;
125
+            logger.debug("RtxModifier doing nothing, no video ssrcs present");
126
+            return sdpStr;
127 127
         }
128 128
         logger.debug("Current ssrc mapping: ", this.correspondingRtxSsrcs);
129 129
         const primaryVideoSsrcs = videoMLine.getPrimaryVideoSSRCs();
@@ -189,13 +189,13 @@ export default class RtxModifier {
189 189
             return sdpStr;
190 190
         }
191 191
         if (videoMLine.getSSRCCount() < 1) {
192
-          logger.debug("RtxModifier doing nothing, no video ssrcs present");
193
-          return sdpStr;
192
+            logger.debug("RtxModifier doing nothing, no video ssrcs present");
193
+            return sdpStr;
194 194
         }
195 195
         if (!videoMLine.containsAnySSRCGroups()) {
196
-          logger.debug("RtxModifier doing nothing, " +
196
+            logger.debug("RtxModifier doing nothing, " +
197 197
               "no video ssrcGroups present");
198
-          return sdpStr;
198
+            return sdpStr;
199 199
         }
200 200
         const fidGroups = videoMLine.findGroups("FID");
201 201
         // Remove the fid groups from the mline

+ 173
- 173
modules/xmpp/RtxModifier.spec.js Просмотреть файл

@@ -11,8 +11,8 @@ import * as SDPUtil from "./SDPUtil";
11 11
  * @returns {number} the number of video ssrcs in the given sdp
12 12
  */
13 13
 function numVideoSsrcs (parsedSdp) {
14
-  const videoMLine = parsedSdp.media.find(m => m.type === "video");
15
-  return videoMLine.ssrcs
14
+    const videoMLine = parsedSdp.media.find(m => m.type === "video");
15
+    return videoMLine.ssrcs
16 16
     .map(ssrcInfo => ssrcInfo.id)
17 17
     .filter((ssrc, index, array) => array.indexOf(ssrc) === index)
18 18
     .length;
@@ -24,8 +24,8 @@ function numVideoSsrcs (parsedSdp) {
24 24
  * @returns {number} the primary video ssrc in the given sdp
25 25
  */
26 26
 function getPrimaryVideoSsrc (parsedSdp) {
27
-  const videoMLine = parsedSdp.media.find(m => m.type === "video");
28
-  return parseInt(SDPUtil.parsePrimaryVideoSsrc(videoMLine));
27
+    const videoMLine = parsedSdp.media.find(m => m.type === "video");
28
+    return parseInt(SDPUtil.parsePrimaryVideoSsrc(videoMLine));
29 29
 }
30 30
 
31 31
 /**
@@ -37,17 +37,17 @@ function getPrimaryVideoSsrc (parsedSdp) {
37 37
  * @returns {list<number>} the primary video ssrcs in the given sdp
38 38
  */
39 39
 function getPrimaryVideoSsrcs (parsedSdp) {
40
-  const videoMLine = parsedSdp.media.find(m => m.type === "video");
41
-  if (numVideoSsrcs(parsedSdp) === 1) {
42
-    return [videoMLine.ssrcs[0].id];
43
-  } else {
44
-    const simGroups = getVideoGroups(parsedSdp, "SIM");
45
-    if (simGroups.length > 1) {
46
-      return;
40
+    const videoMLine = parsedSdp.media.find(m => m.type === "video");
41
+    if (numVideoSsrcs(parsedSdp) === 1) {
42
+        return [videoMLine.ssrcs[0].id];
43
+    } else {
44
+        const simGroups = getVideoGroups(parsedSdp, "SIM");
45
+        if (simGroups.length > 1) {
46
+            return;
47
+        }
48
+        const simGroup = simGroups[0];
49
+        return SDPUtil.parseGroupSsrcs(simGroup);
47 50
     }
48
-    const simGroup = simGroups[0];
49
-    return SDPUtil.parseGroupSsrcs(simGroup);
50
-  }
51 51
 }
52 52
 
53 53
 /**
@@ -60,232 +60,232 @@ function getPrimaryVideoSsrcs (parsedSdp) {
60 60
  *  that matched the passed semantics
61 61
  */
62 62
 function getVideoGroups (parsedSdp, groupSemantics) {
63
-  const videoMLine = parsedSdp.media.find(m => m.type === "video");
64
-  videoMLine.ssrcGroups = videoMLine.ssrcGroups || [];
65
-  return videoMLine.ssrcGroups
63
+    const videoMLine = parsedSdp.media.find(m => m.type === "video");
64
+    videoMLine.ssrcGroups = videoMLine.ssrcGroups || [];
65
+    return videoMLine.ssrcGroups
66 66
     .filter(g => g.semantics === groupSemantics);
67 67
 }
68 68
 
69 69
 describe ("RtxModifier", function() {
70 70
     beforeEach(function() {
71
-      this.rtxModifier = new RtxModifier();
72
-      this.transform = transform;
73
-      this.SDPUtil = SDPUtil;
71
+        this.rtxModifier = new RtxModifier();
72
+        this.transform = transform;
73
+        this.SDPUtil = SDPUtil;
74 74
     });
75 75
 
76 76
     describe ("modifyRtxSsrcs", function() {
77
-      describe ("when given an sdp with a single video ssrc", function() {
78
-        beforeEach(function() {
79
-          this.singleVideoSdp = SampleSdpStrings.plainVideoSdp;
80
-          this.primaryVideoSsrc = getPrimaryVideoSsrc(this.singleVideoSdp);
81
-        });
82
-        it ("should add a single rtx ssrc", function() {
77
+        describe ("when given an sdp with a single video ssrc", function() {
78
+            beforeEach(function() {
79
+                this.singleVideoSdp = SampleSdpStrings.plainVideoSdp;
80
+                this.primaryVideoSsrc = getPrimaryVideoSsrc(this.singleVideoSdp);
81
+            });
82
+            it ("should add a single rtx ssrc", function() {
83 83
           // Call rtxModifier.modifyRtxSsrcs with an sdp that contains a single video
84 84
           //  ssrc.  The returned sdp should have an rtx ssrc and an fid group.
85
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
86
-          const newSdp = transform.parse(newSdpStr);
87
-          const newPrimaryVideoSsrc = getPrimaryVideoSsrc(newSdp);
88
-          expect(newPrimaryVideoSsrc).toEqual(this.primaryVideoSsrc);
85
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
86
+                const newSdp = transform.parse(newSdpStr);
87
+                const newPrimaryVideoSsrc = getPrimaryVideoSsrc(newSdp);
88
+                expect(newPrimaryVideoSsrc).toEqual(this.primaryVideoSsrc);
89 89
           // Should now have an rtx ssrc as well
90
-          expect(numVideoSsrcs(newSdp)).toEqual(2);
90
+                expect(numVideoSsrcs(newSdp)).toEqual(2);
91 91
           // Should now have an FID group
92
-          const fidGroups = getVideoGroups(newSdp, "FID");
93
-          expect(fidGroups.length).toEqual(1);
92
+                const fidGroups = getVideoGroups(newSdp, "FID");
93
+                expect(fidGroups.length).toEqual(1);
94 94
 
95
-          const fidGroup = fidGroups[0];
96
-          const fidGroupPrimarySsrc = SDPUtil.parseGroupSsrcs(fidGroup)[0];
97
-          expect(fidGroupPrimarySsrc).toEqual(this.primaryVideoSsrc);
98
-        });
95
+                const fidGroup = fidGroups[0];
96
+                const fidGroupPrimarySsrc = SDPUtil.parseGroupSsrcs(fidGroup)[0];
97
+                expect(fidGroupPrimarySsrc).toEqual(this.primaryVideoSsrc);
98
+            });
99 99
 
100
-        it ("should re-use the same rtx ssrc for a primary ssrc it's seen before", function() {
100
+            it ("should re-use the same rtx ssrc for a primary ssrc it's seen before", function() {
101 101
           // Have rtxModifier generate an rtx ssrc via modifyRtxSsrcs.  Then call it again
102 102
           //  with the same primary ssrc in the sdp (but no rtx ssrc).  It should use
103 103
           //  the same rtx ssrc as before.
104
-          let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
105
-          let newSdp = transform.parse(newSdpStr);
104
+                let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
105
+                let newSdp = transform.parse(newSdpStr);
106 106
 
107
-          let fidGroup = getVideoGroups(newSdp, "FID")[0];
108
-          const fidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
107
+                let fidGroup = getVideoGroups(newSdp, "FID")[0];
108
+                const fidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
109 109
 
110 110
           // Now pass the original sdp through again 
111
-          newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
112
-          newSdp = transform.parse(newSdpStr);
113
-          fidGroup = getVideoGroups(newSdp, "FID")[0];
114
-          const newFidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
115
-          expect(newFidGroupRtxSsrc).toEqual(fidGroupRtxSsrc);
116
-        });
111
+                newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
112
+                newSdp = transform.parse(newSdpStr);
113
+                fidGroup = getVideoGroups(newSdp, "FID")[0];
114
+                const newFidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
115
+                expect(newFidGroupRtxSsrc).toEqual(fidGroupRtxSsrc);
116
+            });
117 117
 
118
-        it ("should NOT re-use the same rtx ssrc for a primary ssrc it's seen before if the cache has been cleared", function() {
118
+            it ("should NOT re-use the same rtx ssrc for a primary ssrc it's seen before if the cache has been cleared", function() {
119 119
           // Call modifyRtxSsrcs to generate an rtx ssrc
120 120
           // Clear the rtxModifier cache
121 121
           // Call modifyRtxSsrcs to generate an rtx ssrc again with the same primary ssrc
122 122
           // --> We should get a different rtx ssrc
123
-          let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
124
-          let newSdp = transform.parse(newSdpStr);
123
+                let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
124
+                let newSdp = transform.parse(newSdpStr);
125 125
 
126
-          let fidGroup = getVideoGroups(newSdp, "FID")[0];
127
-          const fidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
128
-          this.rtxModifier.clearSsrcCache();
126
+                let fidGroup = getVideoGroups(newSdp, "FID")[0];
127
+                const fidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
128
+                this.rtxModifier.clearSsrcCache();
129 129
 
130 130
           // Now pass the original sdp through again
131
-          newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
132
-          newSdp = transform.parse(newSdpStr);
133
-          fidGroup = getVideoGroups(newSdp, "FID")[0];
134
-          const newFidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
135
-          expect(newFidGroupRtxSsrc).not.toEqual(fidGroupRtxSsrc);
136
-        });
131
+                newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
132
+                newSdp = transform.parse(newSdpStr);
133
+                fidGroup = getVideoGroups(newSdp, "FID")[0];
134
+                const newFidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
135
+                expect(newFidGroupRtxSsrc).not.toEqual(fidGroupRtxSsrc);
136
+            });
137 137
 
138
-        it ("should use the rtx ssrc from the cache when the cache has been manually set", function() {
138
+            it ("should use the rtx ssrc from the cache when the cache has been manually set", function() {
139 139
           // Manually set an rtx ssrc mapping in the cache
140 140
           // Call modifyRtxSsrcs
141 141
           // -->The rtx ssrc used should be the one we set
142
-          const forcedRtxSsrc = 123456;
143
-          const ssrcCache = new Map();
144
-          ssrcCache.set(this.primaryVideoSsrc, forcedRtxSsrc);
145
-          this.rtxModifier.setSsrcCache(ssrcCache);
146
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
147
-          const newSdp = transform.parse(newSdpStr);
142
+                const forcedRtxSsrc = 123456;
143
+                const ssrcCache = new Map();
144
+                ssrcCache.set(this.primaryVideoSsrc, forcedRtxSsrc);
145
+                this.rtxModifier.setSsrcCache(ssrcCache);
146
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.singleVideoSdp));
147
+                const newSdp = transform.parse(newSdpStr);
148 148
 
149
-          const fidGroup = getVideoGroups(newSdp, "FID")[0];
150
-          const fidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
151
-          expect(fidGroupRtxSsrc).toEqual(forcedRtxSsrc);
149
+                const fidGroup = getVideoGroups(newSdp, "FID")[0];
150
+                const fidGroupRtxSsrc = SDPUtil.parseGroupSsrcs(fidGroup)[1];
151
+                expect(fidGroupRtxSsrc).toEqual(forcedRtxSsrc);
152
+            });
152 153
         });
153
-      });
154 154
 
155
-      describe ("when given an sdp with multiple video ssrcs", function() {
156
-        beforeEach(function() {
157
-          this.multipleVideoSdp = SampleSdpStrings.simulcastSdp;
158
-          this.primaryVideoSsrcs = getPrimaryVideoSsrcs(this.multipleVideoSdp);
159
-        });
155
+        describe ("when given an sdp with multiple video ssrcs", function() {
156
+            beforeEach(function() {
157
+                this.multipleVideoSdp = SampleSdpStrings.simulcastSdp;
158
+                this.primaryVideoSsrcs = getPrimaryVideoSsrcs(this.multipleVideoSdp);
159
+            });
160 160
 
161
-        it ("should add rtx ssrcs for all of them", function() {
161
+            it ("should add rtx ssrcs for all of them", function() {
162 162
           // Call rtxModifier.modifyRtxSsrcs with an sdp that contains multiple video
163 163
           //  ssrcs.  The returned sdp should have an rtx ssrc and an fid group for all of them.
164
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
165
-          const newSdp = transform.parse(newSdpStr);
166
-          const newPrimaryVideoSsrcs = getPrimaryVideoSsrcs(newSdp);
167
-          expect(newPrimaryVideoSsrcs).toEqual(this.primaryVideoSsrcs);
164
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
165
+                const newSdp = transform.parse(newSdpStr);
166
+                const newPrimaryVideoSsrcs = getPrimaryVideoSsrcs(newSdp);
167
+                expect(newPrimaryVideoSsrcs).toEqual(this.primaryVideoSsrcs);
168 168
           // Should now have rtx ssrcs as well
169
-          expect(numVideoSsrcs(newSdp)).toEqual(this.primaryVideoSsrcs.length * 2);
169
+                expect(numVideoSsrcs(newSdp)).toEqual(this.primaryVideoSsrcs.length * 2);
170 170
           // Should now have FID groups
171
-          const fidGroups = getVideoGroups(newSdp, "FID");
172
-          expect(fidGroups.length).toEqual(this.primaryVideoSsrcs.length);
173
-          fidGroups.forEach(fidGroup => {
174
-            const fidGroupPrimarySsrc = SDPUtil.parseGroupSsrcs(fidGroup)[0];
175
-            expect(this.primaryVideoSsrcs.indexOf(fidGroupPrimarySsrc)).not.toEqual(-1);
176
-          });
177
-        });
171
+                const fidGroups = getVideoGroups(newSdp, "FID");
172
+                expect(fidGroups.length).toEqual(this.primaryVideoSsrcs.length);
173
+                fidGroups.forEach(fidGroup => {
174
+                    const fidGroupPrimarySsrc = SDPUtil.parseGroupSsrcs(fidGroup)[0];
175
+                    expect(this.primaryVideoSsrcs.indexOf(fidGroupPrimarySsrc)).not.toEqual(-1);
176
+                });
177
+            });
178 178
 
179
-        it ("should re-use the same rtx ssrcs for any primary ssrc it's seen before", function() {
179
+            it ("should re-use the same rtx ssrcs for any primary ssrc it's seen before", function() {
180 180
           // Have rtxModifier generate an rtx ssrc via modifyRtxSsrcs.  Then call it again
181 181
           //  with the same primary ssrc in the sdp (but no rtx ssrc).  It should use
182 182
           //  the same rtx ssrc as before.
183
-          let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
184
-          let newSdp = transform.parse(newSdpStr);
183
+                let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
184
+                let newSdp = transform.parse(newSdpStr);
185 185
 
186
-          const rtxMapping = new Map();
187
-          let fidGroups = getVideoGroups(newSdp, "FID");
186
+                const rtxMapping = new Map();
187
+                let fidGroups = getVideoGroups(newSdp, "FID");
188 188
           // Save the first mapping that is made
189
-          fidGroups.forEach(fidGroup => {
190
-            const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
191
-            const fidGroupPrimarySsrc = fidSsrcs[0];
192
-            const fidGroupRtxSsrc = fidSsrcs[1];
193
-            rtxMapping.set(fidGroupPrimarySsrc, fidGroupRtxSsrc);
194
-          });
189
+                fidGroups.forEach(fidGroup => {
190
+                    const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
191
+                    const fidGroupPrimarySsrc = fidSsrcs[0];
192
+                    const fidGroupRtxSsrc = fidSsrcs[1];
193
+                    rtxMapping.set(fidGroupPrimarySsrc, fidGroupRtxSsrc);
194
+                });
195 195
           // Now pass the original sdp through again and make sure we get the same mapping
196
-          newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
197
-          newSdp = transform.parse(newSdpStr);
198
-          fidGroups = getVideoGroups(newSdp, "FID");
199
-          fidGroups.forEach(fidGroup => {
200
-            const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
201
-            const fidGroupPrimarySsrc = fidSsrcs[0];
202
-            const fidGroupRtxSsrc = fidSsrcs[1];
203
-            expect(rtxMapping.has(fidGroupPrimarySsrc)).toBe(true);
204
-            expect(rtxMapping.get(fidGroupPrimarySsrc)).toEqual(fidGroupRtxSsrc);
205
-          });
206
-        });
196
+                newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
197
+                newSdp = transform.parse(newSdpStr);
198
+                fidGroups = getVideoGroups(newSdp, "FID");
199
+                fidGroups.forEach(fidGroup => {
200
+                    const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
201
+                    const fidGroupPrimarySsrc = fidSsrcs[0];
202
+                    const fidGroupRtxSsrc = fidSsrcs[1];
203
+                    expect(rtxMapping.has(fidGroupPrimarySsrc)).toBe(true);
204
+                    expect(rtxMapping.get(fidGroupPrimarySsrc)).toEqual(fidGroupRtxSsrc);
205
+                });
206
+            });
207 207
 
208
-        it ("should NOT re-use the same rtx ssrcs for any primary ssrc it's seen before if the cache has been cleared", function() {
208
+            it ("should NOT re-use the same rtx ssrcs for any primary ssrc it's seen before if the cache has been cleared", function() {
209 209
           // Call modifyRtxSsrcs to generate an rtx ssrc
210 210
           // Clear the rtxModifier cache
211 211
           // Call modifyRtxSsrcs to generate rtx ssrcs again with the same primary ssrcs
212 212
           // --> We should get different rtx ssrcs
213
-          let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
214
-          let newSdp = transform.parse(newSdpStr);
213
+                let newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
214
+                let newSdp = transform.parse(newSdpStr);
215 215
 
216
-          const rtxMapping = new Map();
217
-          let fidGroups = getVideoGroups(newSdp, "FID");
216
+                const rtxMapping = new Map();
217
+                let fidGroups = getVideoGroups(newSdp, "FID");
218 218
           // Save the first mapping that is made
219
-          fidGroups.forEach(fidGroup => {
220
-            const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
221
-            const fidGroupPrimarySsrc = fidSsrcs[0];
222
-            const fidGroupRtxSsrc = fidSsrcs[1];
223
-            rtxMapping.set(fidGroupPrimarySsrc, fidGroupRtxSsrc);
224
-          });
219
+                fidGroups.forEach(fidGroup => {
220
+                    const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
221
+                    const fidGroupPrimarySsrc = fidSsrcs[0];
222
+                    const fidGroupRtxSsrc = fidSsrcs[1];
223
+                    rtxMapping.set(fidGroupPrimarySsrc, fidGroupRtxSsrc);
224
+                });
225 225
 
226
-          this.rtxModifier.clearSsrcCache();
226
+                this.rtxModifier.clearSsrcCache();
227 227
           // Now pass the original sdp through again and make sure we get the same mapping
228
-          newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
229
-          newSdp = transform.parse(newSdpStr);
230
-          fidGroups = getVideoGroups(newSdp, "FID");
231
-          fidGroups.forEach(fidGroup => {
232
-            const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
233
-            const fidGroupPrimarySsrc = fidSsrcs[0];
234
-            const fidGroupRtxSsrc = fidSsrcs[1];
235
-            expect(rtxMapping.has(fidGroupPrimarySsrc)).toBe(true);
236
-            expect(rtxMapping.get(fidGroupPrimarySsrc)).not.toEqual(fidGroupRtxSsrc);
237
-          });
238
-        });
228
+                newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
229
+                newSdp = transform.parse(newSdpStr);
230
+                fidGroups = getVideoGroups(newSdp, "FID");
231
+                fidGroups.forEach(fidGroup => {
232
+                    const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
233
+                    const fidGroupPrimarySsrc = fidSsrcs[0];
234
+                    const fidGroupRtxSsrc = fidSsrcs[1];
235
+                    expect(rtxMapping.has(fidGroupPrimarySsrc)).toBe(true);
236
+                    expect(rtxMapping.get(fidGroupPrimarySsrc)).not.toEqual(fidGroupRtxSsrc);
237
+                });
238
+            });
239 239
 
240
-        it ("should use the rtx ssrcs from the cache when the cache has been manually set", function() {
240
+            it ("should use the rtx ssrcs from the cache when the cache has been manually set", function() {
241 241
           // Manually set an rtx ssrc mapping in the cache
242 242
           // Call modifyRtxSsrcs
243 243
           // -->The rtx ssrc used should be the one we set
244
-          const rtxMapping = new Map();
245
-          this.primaryVideoSsrcs.forEach(ssrc => {
246
-            rtxMapping.set(ssrc, SDPUtil.generateSsrc());
247
-          });
248
-          this.rtxModifier.setSsrcCache(rtxMapping);
244
+                const rtxMapping = new Map();
245
+                this.primaryVideoSsrcs.forEach(ssrc => {
246
+                    rtxMapping.set(ssrc, SDPUtil.generateSsrc());
247
+                });
248
+                this.rtxModifier.setSsrcCache(rtxMapping);
249 249
 
250
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
251
-          const newSdp = transform.parse(newSdpStr);
250
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(this.multipleVideoSdp));
251
+                const newSdp = transform.parse(newSdpStr);
252 252
 
253
-          const fidGroups = getVideoGroups(newSdp, "FID");
254
-          fidGroups.forEach(fidGroup => {
255
-            const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
256
-            const fidGroupPrimarySsrc = fidSsrcs[0];
257
-            const fidGroupRtxSsrc = fidSsrcs[1];
258
-            expect(rtxMapping.has(fidGroupPrimarySsrc)).toBe(true);
259
-            expect(rtxMapping.get(fidGroupPrimarySsrc)).toEqual(fidGroupRtxSsrc);
260
-          });
253
+                const fidGroups = getVideoGroups(newSdp, "FID");
254
+                fidGroups.forEach(fidGroup => {
255
+                    const fidSsrcs = SDPUtil.parseGroupSsrcs(fidGroup);
256
+                    const fidGroupPrimarySsrc = fidSsrcs[0];
257
+                    const fidGroupRtxSsrc = fidSsrcs[1];
258
+                    expect(rtxMapping.has(fidGroupPrimarySsrc)).toBe(true);
259
+                    expect(rtxMapping.get(fidGroupPrimarySsrc)).toEqual(fidGroupRtxSsrc);
260
+                });
261
+            });
261 262
         });
262
-      });
263 263
 
264
-      describe ("(corner cases)", function() {
265
-        it ("should handle a recvonly video mline", function() {
266
-          const sdp = SampleSdpStrings.plainVideoSdp;
267
-          const videoMLine = sdp.media.find(m => m.type === "video");
268
-          videoMLine.direction = "recvonly";
269
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(sdp));
270
-          expect(newSdpStr).toEqual(this.transform.write(sdp));
271
-        });
264
+        describe ("(corner cases)", function() {
265
+            it ("should handle a recvonly video mline", function() {
266
+                const sdp = SampleSdpStrings.plainVideoSdp;
267
+                const videoMLine = sdp.media.find(m => m.type === "video");
268
+                videoMLine.direction = "recvonly";
269
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(sdp));
270
+                expect(newSdpStr).toEqual(this.transform.write(sdp));
271
+            });
272 272
 
273
-        it ("should handle an inactive video mline", function() {
274
-          const sdp = SampleSdpStrings.plainVideoSdp;
275
-          const videoMLine = sdp.media.find(m => m.type === "video");
276
-          videoMLine.direction = "inactive";
277
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(sdp));
278
-          expect(newSdpStr).toEqual(this.transform.write(sdp));
279
-        });
273
+            it ("should handle an inactive video mline", function() {
274
+                const sdp = SampleSdpStrings.plainVideoSdp;
275
+                const videoMLine = sdp.media.find(m => m.type === "video");
276
+                videoMLine.direction = "inactive";
277
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(sdp));
278
+                expect(newSdpStr).toEqual(this.transform.write(sdp));
279
+            });
280 280
 
281
-        it ("should handle a video mline with no video ssrcs", function() {
282
-          const sdp = SampleSdpStrings.plainVideoSdp;
283
-          const videoMLine = sdp.media.find(m => m.type === "video");
284
-          videoMLine.ssrcs = [];
285
-          const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(sdp));
286
-          expect(newSdpStr).toEqual(this.transform.write(sdp));
281
+            it ("should handle a video mline with no video ssrcs", function() {
282
+                const sdp = SampleSdpStrings.plainVideoSdp;
283
+                const videoMLine = sdp.media.find(m => m.type === "video");
284
+                videoMLine.ssrcs = [];
285
+                const newSdpStr = this.rtxModifier.modifyRtxSsrcs(this.transform.write(sdp));
286
+                expect(newSdpStr).toEqual(this.transform.write(sdp));
287
+            });
287 288
         });
288
-      });
289 289
     });
290 290
 
291 291
     describe("stripRtx", function() {

+ 46
- 46
modules/xmpp/SDP.js Просмотреть файл

@@ -93,8 +93,8 @@ SDP.prototype.containsSSRC = function (ssrc) {
93 93
     var result = false;
94 94
     Object.keys(medias).forEach(function (mediaindex) {
95 95
         if (result)            {
96
-return;
97
-}
96
+            return;
97
+        }
98 98
         if (medias[mediaindex].ssrcs[ssrc]) {
99 99
             result = true;
100 100
         }
@@ -110,16 +110,16 @@ SDP.prototype.mangle = function () {
110 110
         lines.pop(); // remove empty last element
111 111
         mline = SDPUtil.parse_mline(lines.shift());
112 112
         if (mline.media != 'audio')            {
113
-continue;
114
-}
113
+            continue;
114
+        }
115 115
         newdesc = '';
116 116
         mline.fmt.length = 0;
117 117
         for (j = 0; j < lines.length; j++) {
118 118
             if (lines[j].substr(0, 9) == 'a=rtpmap:') {
119 119
                 rtpmap = SDPUtil.parse_rtpmap(lines[j]);
120 120
                 if (rtpmap.name == 'CN' || rtpmap.name == 'ISAC')                    {
121
-continue;
122
-}
121
+                    continue;
122
+                }
123 123
                 mline.fmt.push(rtpmap.id);
124 124
             }
125 125
             newdesc += lines[j] + '\r\n';
@@ -312,18 +312,18 @@ SDP.prototype.toJingle = function (elem, thecreator) {
312 312
                         id: tmp.value });
313 313
                     if (tmp.hasOwnProperty('direction')) {
314 314
                         switch (tmp.direction) {
315
-                            case 'sendonly':
316
-                                elem.attrs({senders: 'responder'});
317
-                                break;
318
-                            case 'recvonly':
319
-                                elem.attrs({senders: 'initiator'});
320
-                                break;
321
-                            case 'sendrecv':
322
-                                elem.attrs({senders: 'both'});
323
-                                break;
324
-                            case 'inactive':
325
-                                elem.attrs({senders: 'none'});
326
-                                break;
315
+                        case 'sendonly':
316
+                            elem.attrs({senders: 'responder'});
317
+                            break;
318
+                        case 'recvonly':
319
+                            elem.attrs({senders: 'initiator'});
320
+                            break;
321
+                        case 'sendrecv':
322
+                            elem.attrs({senders: 'both'});
323
+                            break;
324
+                        case 'inactive':
325
+                            elem.attrs({senders: 'none'});
326
+                            break;
327 327
                         }
328 328
                     }
329 329
                     // TODO: handle params
@@ -366,14 +366,14 @@ SDP.prototype.transportToJingle = function (mediaindex, elem) {
366 366
     if (sctpmap) {
367 367
         sctpAttrs = SDPUtil.parse_sctpmap(sctpmap);
368 368
         elem.c('sctpmap', {
369
-                xmlns: 'urn:xmpp:jingle:transports:dtls-sctp:1',
370
-                number: sctpAttrs[0], /* SCTP port */
371
-                protocol: sctpAttrs[1] /* protocol */
372
-            });
369
+            xmlns: 'urn:xmpp:jingle:transports:dtls-sctp:1',
370
+            number: sctpAttrs[0], /* SCTP port */
371
+            protocol: sctpAttrs[1] /* protocol */
372
+        });
373 373
         // Optional stream count attribute
374 374
         if (sctpAttrs.length > 2)            {
375
-elem.attrs({ streams: sctpAttrs[2]});
376
-}
375
+            elem.attrs({ streams: sctpAttrs[2]});
376
+        }
377 377
         elem.up();
378 378
     }
379 379
     // XEP-0320
@@ -517,8 +517,8 @@ SDP.prototype.jingle2media = function (content) {
517 517
     if (!sctp.length) {
518 518
         tmp.fmt = desc.find('payload-type').map(
519 519
             function () {
520
- return this.getAttribute('id');
521
-}).get();
520
+                return this.getAttribute('id');
521
+            }).get();
522 522
         media += SDPUtil.build_mline(tmp) + '\r\n';
523 523
     } else {
524 524
         media += 'm=application 1 DTLS/SCTP ' + sctp.attr('number') + '\r\n';
@@ -527,16 +527,16 @@ SDP.prototype.jingle2media = function (content) {
527 527
 
528 528
         var streamCount = sctp.attr('streams');
529 529
         if (streamCount)            {
530
-media += ' ' + streamCount + '\r\n';
531
-}        else            {
532
-media += '\r\n';
533
-}
530
+            media += ' ' + streamCount + '\r\n';
531
+        }        else            {
532
+            media += '\r\n';
533
+        }
534 534
     }
535 535
 
536 536
     media += 'c=IN IP4 0.0.0.0\r\n';
537 537
     if (!sctp.length)        {
538
-media += 'a=rtcp:1 IN IP4 0.0.0.0\r\n';
539
-}
538
+        media += 'a=rtcp:1 IN IP4 0.0.0.0\r\n';
539
+    }
540 540
     tmp = content.find('>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]');
541 541
     if (tmp.length) {
542 542
         if (tmp.attr('ufrag')) {
@@ -556,18 +556,18 @@ media += 'a=rtcp:1 IN IP4 0.0.0.0\r\n';
556 556
         });
557 557
     }
558 558
     switch (content.attr('senders')) {
559
-        case 'initiator':
560
-            media += 'a=sendonly\r\n';
561
-            break;
562
-        case 'responder':
563
-            media += 'a=recvonly\r\n';
564
-            break;
565
-        case 'none':
566
-            media += 'a=inactive\r\n';
567
-            break;
568
-        case 'both':
569
-            media += 'a=sendrecv\r\n';
570
-            break;
559
+    case 'initiator':
560
+        media += 'a=sendonly\r\n';
561
+        break;
562
+    case 'responder':
563
+        media += 'a=recvonly\r\n';
564
+        break;
565
+    case 'none':
566
+        media += 'a=inactive\r\n';
567
+        break;
568
+    case 'both':
569
+        media += 'a=sendrecv\r\n';
570
+        break;
571 571
     }
572 572
     media += 'a=mid:' + content.attr('name') + '\r\n';
573 573
 
@@ -649,8 +649,8 @@ media += 'a=rtcp:1 IN IP4 0.0.0.0\r\n';
649 649
             value = SDPUtil.filter_special_chars(value);
650 650
             media += 'a=ssrc:' + ssrc + ' ' + name;
651 651
             if (value && value.length)                {
652
-media += ':' + value;
653
-}
652
+                media += ':' + value;
653
+            }
654 654
             media += '\r\n';
655 655
         });
656 656
     });

+ 6
- 6
modules/xmpp/SDPDiffer.js Просмотреть файл

@@ -15,21 +15,21 @@ SDPDiffer.prototype.getNewMedia = function() {
15 15
     function arrayEquals(array) {
16 16
         // if the other array is a falsy value, return
17 17
         if (!array)            {
18
-return false;
19
-}
18
+            return false;
19
+        }
20 20
 
21 21
         // compare lengths - can save a lot of time
22 22
         if (this.length != array.length)            {
23
-return false;
24
-}
23
+            return false;
24
+        }
25 25
 
26 26
         for (var i = 0, l=this.length; i < l; i++) {
27 27
             // Check if we have nested arrays
28 28
             if (this[i] instanceof Array && array[i] instanceof Array) {
29 29
                 // recurse into the nested arrays
30 30
                 if (!this[i].equals(array[i]))                    {
31
-return false;
32
-}
31
+                    return false;
32
+                }
33 33
             }            else if (this[i] != array[i]) {
34 34
                 // Warning - two different object instances will never be
35 35
                 // equal: {x:20} != {x:20}

+ 63
- 63
modules/xmpp/SDPUtil.js Просмотреть файл

@@ -135,20 +135,20 @@ var SDPUtil = {
135 135
         candidate.generation = 0; // default value, may be overwritten below
136 136
         for (var i = 8; i < elems.length; i += 2) {
137 137
             switch (elems[i]) {
138
-                case 'raddr':
139
-                    candidate['rel-addr'] = elems[i + 1];
140
-                    break;
141
-                case 'rport':
142
-                    candidate['rel-port'] = elems[i + 1];
143
-                    break;
144
-                case 'generation':
145
-                    candidate.generation = elems[i + 1];
146
-                    break;
147
-                case 'tcptype':
148
-                    candidate.tcptype = elems[i + 1];
149
-                    break;
150
-                default: // TODO
151
-                    logger.log('parse_icecandidate not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
138
+            case 'raddr':
139
+                candidate['rel-addr'] = elems[i + 1];
140
+                break;
141
+            case 'rport':
142
+                candidate['rel-port'] = elems[i + 1];
143
+                break;
144
+            case 'generation':
145
+                candidate.generation = elems[i + 1];
146
+                break;
147
+            case 'tcptype':
148
+                candidate.tcptype = elems[i + 1];
149
+                break;
150
+            default: // TODO
151
+                logger.log('parse_icecandidate not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
152 152
             }
153 153
         }
154 154
         candidate.network = '1';
@@ -159,20 +159,20 @@ var SDPUtil = {
159 159
         var line = ['a=candidate:' + cand.foundation, cand.component, cand.protocol, cand.priority, cand.ip, cand.port, 'typ', cand.type].join(' ');
160 160
         line += ' ';
161 161
         switch (cand.type) {
162
-            case 'srflx':
163
-            case 'prflx':
164
-            case 'relay':
165
-                if (cand.hasOwnAttribute('rel-addr') && cand.hasOwnAttribute('rel-port')) {
166
-                    line += 'raddr';
167
-                    line += ' ';
168
-                    line += cand['rel-addr'];
169
-                    line += ' ';
170
-                    line += 'rport';
171
-                    line += ' ';
172
-                    line += cand['rel-port'];
173
-                    line += ' ';
174
-                }
175
-                break;
162
+        case 'srflx':
163
+        case 'prflx':
164
+        case 'relay':
165
+            if (cand.hasOwnAttribute('rel-addr') && cand.hasOwnAttribute('rel-port')) {
166
+                line += 'raddr';
167
+                line += ' ';
168
+                line += cand['rel-addr'];
169
+                line += ' ';
170
+                line += 'rport';
171
+                line += ' ';
172
+                line += cand['rel-port'];
173
+                line += ' ';
174
+            }
175
+            break;
176 176
         }
177 177
         if (cand.hasOwnAttribute('tcptype')) {
178 178
             line += 'tcptype';
@@ -245,8 +245,8 @@ var SDPUtil = {
245 245
             needles = [];
246 246
         for (var i = 0; i < lines.length; i++) {
247 247
             if (lines[i].substring(0, needle.length) == needle)                {
248
-needles.push(lines[i]);
249
-}
248
+                needles.push(lines[i]);
249
+            }
250 250
         }
251 251
         if (needles.length || !sessionpart) {
252 252
             return needles;
@@ -293,20 +293,20 @@ needles.push(lines[i]);
293 293
         candidate.generation = '0'; // default, may be overwritten below
294 294
         for (i = 8; i < elems.length; i += 2) {
295 295
             switch (elems[i]) {
296
-                case 'raddr':
297
-                    candidate['rel-addr'] = elems[i + 1];
298
-                    break;
299
-                case 'rport':
300
-                    candidate['rel-port'] = elems[i + 1];
301
-                    break;
302
-                case 'generation':
303
-                    candidate.generation = elems[i + 1];
304
-                    break;
305
-                case 'tcptype':
306
-                    candidate.tcptype = elems[i + 1];
307
-                    break;
308
-                default: // TODO
309
-                    logger.log('not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
296
+            case 'raddr':
297
+                candidate['rel-addr'] = elems[i + 1];
298
+                break;
299
+            case 'rport':
300
+                candidate['rel-port'] = elems[i + 1];
301
+                break;
302
+            case 'generation':
303
+                candidate.generation = elems[i + 1];
304
+                break;
305
+            case 'tcptype':
306
+                candidate.tcptype = elems[i + 1];
307
+                break;
308
+            default: // TODO
309
+                logger.log('not translating "' + elems[i] + '" = "' + elems[i + 1] + '"');
310 310
             }
311 311
         }
312 312
         candidate.network = '1';
@@ -338,20 +338,20 @@ needles.push(lines[i]);
338 338
         line += ' ' + cand.getAttribute('type');
339 339
         line += ' ';
340 340
         switch (cand.getAttribute('type')) {
341
-            case 'srflx':
342
-            case 'prflx':
343
-            case 'relay':
344
-                if (cand.getAttribute('rel-addr') && cand.getAttribute('rel-port')) {
345
-                    line += 'raddr';
346
-                    line += ' ';
347
-                    line += cand.getAttribute('rel-addr');
348
-                    line += ' ';
349
-                    line += 'rport';
350
-                    line += ' ';
351
-                    line += cand.getAttribute('rel-port');
352
-                    line += ' ';
353
-                }
354
-                break;
341
+        case 'srflx':
342
+        case 'prflx':
343
+        case 'relay':
344
+            if (cand.getAttribute('rel-addr') && cand.getAttribute('rel-port')) {
345
+                line += 'raddr';
346
+                line += ' ';
347
+                line += cand.getAttribute('rel-addr');
348
+                line += ' ';
349
+                line += 'rport';
350
+                line += ' ';
351
+                line += cand.getAttribute('rel-port');
352
+                line += ' ';
353
+            }
354
+            break;
355 355
         }
356 356
         if (protocol.toLowerCase() == 'tcp') {
357 357
             line += 'tcptype';
@@ -468,11 +468,11 @@ needles.push(lines[i]);
468 468
     preferVideoCodec: function(videoMLine, codecName) {
469 469
         let payloadType = null;
470 470
         for (let i = 0; i < videoMLine.rtp.length; ++i) {
471
-          const rtp = videoMLine.rtp[i];
472
-          if (rtp.codec === codecName) {
473
-              payloadType = rtp.payload;
474
-              break;
475
-          }
471
+            const rtp = videoMLine.rtp[i];
472
+            if (rtp.codec === codecName) {
473
+                payloadType = rtp.payload;
474
+                break;
475
+            }
476 476
         }
477 477
         if (payloadType) {
478 478
             const payloadTypes = videoMLine.payloads.split(" ").map(p => parseInt(p));

+ 2
- 2
modules/xmpp/SdpTransformUtil.js Просмотреть файл

@@ -158,8 +158,8 @@ class MLineWrap {
158 158
     containsSSRC(ssrcNumber) {
159 159
         return !!this._ssrcs.find(
160 160
             ssrcObj => {
161
- return ssrcObj.id == ssrcNumber; 
162
-});
161
+                return ssrcObj.id == ssrcNumber; 
162
+            });
163 163
     }
164 164
 
165 165
     /**

+ 2
- 2
modules/xmpp/moderator.js Просмотреть файл

@@ -418,8 +418,8 @@ Moderator.prototype._getLoginUrl = function (popup, urlCb, failureCb) {
418 418
     };
419 419
     var str = 'auth url'; // for logger
420 420
     if (popup) {
421
-       attrs.popup = true;
422
-       str = 'POPUP ' + str;
421
+        attrs.popup = true;
422
+        str = 'POPUP ' + str;
423 423
     }
424 424
     iq.c('login-url', attrs);
425 425
     /**

+ 49
- 49
modules/xmpp/recording.js Просмотреть файл

@@ -56,15 +56,15 @@ Recording.action = {
56 56
 Recording.prototype.handleJibriPresence = function (jibri) {
57 57
     var attributes = jibri.attributes;
58 58
     if(!attributes)        {
59
-return;
60
-}
59
+        return;
60
+    }
61 61
 
62 62
     var newState = attributes.status;
63 63
     logger.log("Handle jibri presence : ", newState);
64 64
 
65 65
     if (newState === this.state)        {
66
-return;
67
-}
66
+        return;
67
+    }
68 68
 
69 69
     if (newState === "undefined") {
70 70
         this.state = Recording.status.UNAVAILABLE;
@@ -72,10 +72,10 @@ return;
72 72
         if (!this.state
73 73
             || this.state === "undefined"
74 74
             || this.state === Recording.status.UNAVAILABLE)            {
75
-this.state = Recording.status.AVAILABLE;
76
-}        else            {
77
-this.state = Recording.status.OFF;
78
-}
75
+            this.state = Recording.status.AVAILABLE;
76
+        }        else            {
77
+            this.state = Recording.status.OFF;
78
+        }
79 79
     }    else {
80 80
         this.state = newState;
81 81
     }
@@ -86,24 +86,24 @@ this.state = Recording.status.OFF;
86 86
 Recording.prototype.setRecordingJibri
87 87
     = function (state, callback, errCallback, options) {
88 88
 
89
-    if (state == this.state){
90
-        errCallback(JitsiRecorderErrors.INVALID_STATE);
91
-    }
92
-    options = options || {};
89
+        if (state == this.state){
90
+            errCallback(JitsiRecorderErrors.INVALID_STATE);
91
+        }
92
+        options = options || {};
93 93
 
94 94
     // FIXME jibri does not accept IQ without 'url' attribute set ?
95
-    var iq = $iq({to: this.focusMucJid, type: 'set'})
95
+        var iq = $iq({to: this.focusMucJid, type: 'set'})
96 96
         .c('jibri', {
97
-        "xmlns": 'http://jitsi.org/protocol/jibri',
98
-        "action": state === Recording.status.ON
97
+            "xmlns": 'http://jitsi.org/protocol/jibri',
98
+            "action": state === Recording.status.ON
99 99
                     ? Recording.action.START
100 100
                     : Recording.action.STOP,
101
-        "streamid": options.streamId,
101
+            "streamid": options.streamId,
102 102
         }).up();
103 103
 
104
-    logger.log('Set jibri recording: ' + state, iq.nodeTree);
105
-    logger.log(iq.nodeTree);
106
-    this.connection.sendIQ(
104
+        logger.log('Set jibri recording: ' + state, iq.nodeTree);
105
+        logger.log(iq.nodeTree);
106
+        this.connection.sendIQ(
107 107
         iq,
108 108
         function (result) {
109 109
             logger.log("Result", result);
@@ -114,28 +114,28 @@ Recording.prototype.setRecordingJibri
114 114
             logger.log('Failed to start recording, error: ', error);
115 115
             errCallback(error);
116 116
         });
117
-};
117
+    };
118 118
 
119 119
 Recording.prototype.setRecordingJirecon =
120 120
     function (state, callback, errCallback) {
121 121
 
122
-    if (state == this.state){
123
-        errCallback(new Error("Invalid state!"));
124
-    }
122
+        if (state == this.state){
123
+            errCallback(new Error("Invalid state!"));
124
+        }
125 125
 
126
-    var iq = $iq({to: this.jirecon, type: 'set'})
126
+        var iq = $iq({to: this.jirecon, type: 'set'})
127 127
         .c('recording', {xmlns: 'http://jitsi.org/protocol/jirecon',
128 128
             action: state === Recording.status.ON
129 129
                 ? Recording.action.START
130 130
                 : Recording.action.STOP,
131 131
             mucjid: this.roomjid});
132
-    if (state === 'off'){
133
-        iq.attrs({rid: this.jireconRid});
134
-    }
132
+        if (state === 'off'){
133
+            iq.attrs({rid: this.jireconRid});
134
+        }
135 135
 
136
-    logger.log('Start recording');
137
-    var self = this;
138
-    this.connection.sendIQ(
136
+        logger.log('Start recording');
137
+        var self = this;
138
+        this.connection.sendIQ(
139 139
         iq,
140 140
         function (result) {
141 141
             // TODO wait for an IQ with the real status, since this is
@@ -155,7 +155,7 @@ Recording.prototype.setRecordingJirecon =
155 155
             logger.log('Failed to start recording, error: ', error);
156 156
             errCallback(error);
157 157
         });
158
-};
158
+    };
159 159
 
160 160
 // Sends a COLIBRI message which enables or disables (according to 'state')
161 161
 // the recording on the bridge. Waits for the result IQ and calls 'callback'
@@ -198,20 +198,20 @@ function (state, callback, errCallback, options) {
198 198
 Recording.prototype.setRecording =
199 199
 function (state, callback, errCallback, options) {
200 200
     switch(this.type){
201
-        case Recording.types.JIRECON:
202
-            this.setRecordingJirecon(state, callback, errCallback, options);
203
-            break;
204
-        case Recording.types.COLIBRI:
205
-            this.setRecordingColibri(state, callback, errCallback, options);
206
-            break;
207
-        case Recording.types.JIBRI:
208
-            this.setRecordingJibri(state, callback, errCallback, options);
209
-            break;
210
-        default:
211
-            var errmsg = "Unknown recording type!";
212
-            GlobalOnErrorHandler.callErrorHandler(new Error(errmsg));
213
-            logger.error(errmsg);
214
-            return;
201
+    case Recording.types.JIRECON:
202
+        this.setRecordingJirecon(state, callback, errCallback, options);
203
+        break;
204
+    case Recording.types.COLIBRI:
205
+        this.setRecordingColibri(state, callback, errCallback, options);
206
+        break;
207
+    case Recording.types.JIBRI:
208
+        this.setRecordingJibri(state, callback, errCallback, options);
209
+        break;
210
+    default:
211
+        var errmsg = "Unknown recording type!";
212
+        GlobalOnErrorHandler.callErrorHandler(new Error(errmsg));
213
+        logger.error(errmsg);
214
+        return;
215 215
     }
216 216
 };
217 217
 
@@ -226,12 +226,12 @@ Recording.prototype.toggleRecording = function (options, statusChangeHandler) {
226 226
     // If the recorder is currently unavailable we throw an error.
227 227
     if (oldState === Recording.status.UNAVAILABLE
228 228
         || oldState === Recording.status.FAILED)        {
229
-statusChangeHandler(Recording.status.FAILED,
229
+        statusChangeHandler(Recording.status.FAILED,
230 230
                             JitsiRecorderErrors.RECORDER_UNAVAILABLE);
231
-}    else if (oldState === Recording.status.BUSY)        {
232
-statusChangeHandler(Recording.status.BUSY,
231
+    }    else if (oldState === Recording.status.BUSY)        {
232
+        statusChangeHandler(Recording.status.BUSY,
233 233
                             JitsiRecorderErrors.RECORDER_BUSY);
234
-}
234
+    }
235 235
 
236 236
     // If we're about to turn ON the recording we need either a streamId or
237 237
     // an authentication token depending on the recording type. If we don't

+ 10
- 10
modules/xmpp/strophe.emuc.js Просмотреть файл

@@ -62,8 +62,8 @@ class MucConnectionPlugin extends ConnectionPluginListenable {
62 62
 
63 63
         const room = this.rooms[Strophe.getBareJidFromJid(from)];
64 64
         if(!room)            {
65
-return;
66
-}
65
+            return;
66
+        }
67 67
 
68 68
         // Parse status.
69 69
         if ($(pres).find('>x[xmlns="http://jabber.org/protocol/muc#user"]' +
@@ -80,8 +80,8 @@ return;
80 80
         const from = pres.getAttribute('from');
81 81
         const room = this.rooms[Strophe.getBareJidFromJid(from)];
82 82
         if(!room)            {
83
-return;
84
-}
83
+            return;
84
+        }
85 85
 
86 86
         room.onPresenceUnavailable(pres, from);
87 87
         return true;
@@ -91,8 +91,8 @@ return;
91 91
         const from = pres.getAttribute('from');
92 92
         const room = this.rooms[Strophe.getBareJidFromJid(from)];
93 93
         if(!room)            {
94
-return;
95
-}
94
+            return;
95
+        }
96 96
 
97 97
         room.onPresenceError(pres, from);
98 98
         return true;
@@ -103,8 +103,8 @@ return;
103 103
         const from = msg.getAttribute('from');
104 104
         const room = this.rooms[Strophe.getBareJidFromJid(from)];
105 105
         if(!room)            {
106
-return;
107
-}
106
+            return;
107
+        }
108 108
 
109 109
         room.onMessage(msg, from);
110 110
         return true;
@@ -114,8 +114,8 @@ return;
114 114
         const from = iq.getAttribute('from');
115 115
         const room = this.rooms[Strophe.getBareJidFromJid(from)];
116 116
         if(!room)            {
117
-return;
118
-}
117
+            return;
118
+        }
119 119
 
120 120
         room.onMute(iq);
121 121
         return true;

+ 82
- 82
modules/xmpp/strophe.jingle.js Просмотреть файл

@@ -76,16 +76,16 @@ class JingleConnectionPlugin extends ConnectionPlugin {
76 76
         const now = window.performance.now();
77 77
         // see http://xmpp.org/extensions/xep-0166.html#concepts-session
78 78
         switch (action) {
79
-            case 'session-initiate': {
80
-                logger.log("(TIME) received session-initiate:\t", now);
81
-                const startMuted = $(iq).find('jingle>startmuted');
82
-                if (startMuted && startMuted.length > 0) {
83
-                    const audioMuted = startMuted.attr("audio");
84
-                    const videoMuted = startMuted.attr("video");
85
-                    this.eventEmitter.emit(XMPPEvents.START_MUTED_FROM_FOCUS,
79
+        case 'session-initiate': {
80
+            logger.log("(TIME) received session-initiate:\t", now);
81
+            const startMuted = $(iq).find('jingle>startmuted');
82
+            if (startMuted && startMuted.length > 0) {
83
+                const audioMuted = startMuted.attr("audio");
84
+                const videoMuted = startMuted.attr("video");
85
+                this.eventEmitter.emit(XMPPEvents.START_MUTED_FROM_FOCUS,
86 86
                             audioMuted === "true", videoMuted === "true");
87
-                }
88
-                sess = new JingleSessionPC(
87
+            }
88
+            sess = new JingleSessionPC(
89 89
                         $(iq).find('jingle').attr('sid'),
90 90
                         $(iq).attr('to'),
91 91
                         fromJid,
@@ -93,62 +93,62 @@ class JingleConnectionPlugin extends ConnectionPlugin {
93 93
                         this.media_constraints,
94 94
                         this.ice_config, this.xmpp.options);
95 95
 
96
-                this.sessions[sess.sid] = sess;
96
+            this.sessions[sess.sid] = sess;
97 97
 
98
-                this.eventEmitter.emit(XMPPEvents.CALL_INCOMING,
98
+            this.eventEmitter.emit(XMPPEvents.CALL_INCOMING,
99 99
                     sess, $(iq).find('>jingle'), now);
100
-                Statistics.analytics.sendEvent(
100
+            Statistics.analytics.sendEvent(
101 101
                     'xmpp.session-initiate', {value: now});
102
-                break;
103
-            }
104
-            case 'session-terminate': {
105
-                logger.log('terminating...', sess.sid);
106
-                let reasonCondition = null;
107
-                let reasonText = null;
108
-                if ($(iq).find('>jingle>reason').length) {
109
-                    reasonCondition
102
+            break;
103
+        }
104
+        case 'session-terminate': {
105
+            logger.log('terminating...', sess.sid);
106
+            let reasonCondition = null;
107
+            let reasonText = null;
108
+            if ($(iq).find('>jingle>reason').length) {
109
+                reasonCondition
110 110
                         = $(iq).find('>jingle>reason>:first')[0].tagName;
111
-                    reasonText = $(iq).find('>jingle>reason>text').text();
112
-                }
113
-                this.terminate(sess.sid, reasonCondition, reasonText);
114
-                this.eventEmitter.emit(XMPPEvents.CALL_ENDED,
115
-                    sess, reasonCondition, reasonText);
116
-                break;
111
+                reasonText = $(iq).find('>jingle>reason>text').text();
117 112
             }
118
-            case 'transport-replace':
119
-                logger.info("(TIME) Start transport replace", now);
120
-                Statistics.analytics.sendEvent(
113
+            this.terminate(sess.sid, reasonCondition, reasonText);
114
+            this.eventEmitter.emit(XMPPEvents.CALL_ENDED,
115
+                    sess, reasonCondition, reasonText);
116
+            break;
117
+        }
118
+        case 'transport-replace':
119
+            logger.info("(TIME) Start transport replace", now);
120
+            Statistics.analytics.sendEvent(
121 121
                     'xmpp.transport-replace.start', {value: now});
122 122
 
123
-                sess.replaceTransport($(iq).find('>jingle'), () => {
124
-                    const successTime = window.performance.now();
125
-                    logger.info(
123
+            sess.replaceTransport($(iq).find('>jingle'), () => {
124
+                const successTime = window.performance.now();
125
+                logger.info(
126 126
                         "(TIME) Transport replace success!", successTime);
127
-                    Statistics.analytics.sendEvent(
127
+                Statistics.analytics.sendEvent(
128 128
                         'xmpp.transport-replace.success',
129 129
                         {value: successTime});
130
-                }, error => {
131
-                    GlobalOnErrorHandler.callErrorHandler(error);
132
-                    logger.error('Transport replace failed', error);
133
-                    sess.sendTransportReject();
134
-                });
135
-                break;
136
-            case 'addsource': // FIXME: proprietary, un-jingleish
137
-            case 'source-add': // FIXME: proprietary
138
-                sess.addRemoteStream($(iq).find('>jingle>content'));
139
-                break;
140
-            case 'removesource': // FIXME: proprietary, un-jingleish
141
-            case 'source-remove': // FIXME: proprietary
142
-                sess.removeRemoteStream($(iq).find('>jingle>content'));
143
-                break;
144
-            default:
145
-                logger.warn('jingle action not implemented', action);
146
-                ack.attrs({ type: 'error' });
147
-                ack.c('error', {type: 'cancel'})
130
+            }, error => {
131
+                GlobalOnErrorHandler.callErrorHandler(error);
132
+                logger.error('Transport replace failed', error);
133
+                sess.sendTransportReject();
134
+            });
135
+            break;
136
+        case 'addsource': // FIXME: proprietary, un-jingleish
137
+        case 'source-add': // FIXME: proprietary
138
+            sess.addRemoteStream($(iq).find('>jingle>content'));
139
+            break;
140
+        case 'removesource': // FIXME: proprietary, un-jingleish
141
+        case 'source-remove': // FIXME: proprietary
142
+            sess.removeRemoteStream($(iq).find('>jingle>content'));
143
+            break;
144
+        default:
145
+            logger.warn('jingle action not implemented', action);
146
+            ack.attrs({ type: 'error' });
147
+            ack.c('error', {type: 'cancel'})
148 148
                     .c('bad-request',
149 149
                         { xmlns: 'urn:ietf:params:xml:ns:xmpp-stanzas' })
150 150
                     .up();
151
-                break;
151
+            break;
152 152
         }
153 153
         this.connection.send(ack);
154 154
         return true;
@@ -186,46 +186,46 @@ class JingleConnectionPlugin extends ConnectionPlugin {
186 186
                     const dict = {};
187 187
                     const type = el.attr('type');
188 188
                     switch (type) {
189
-                        case 'stun':
190
-                            dict.url = 'stun:' + el.attr('host');
191
-                            if (el.attr('port')) {
192
-                                dict.url += ':' + el.attr('port');
193
-                            }
194
-                            iceservers.push(dict);
195
-                            break;
196
-                        case 'turn':
197
-                        case 'turns': {
198
-                            dict.url = type + ':';
199
-                            const username = el.attr('username');
189
+                    case 'stun':
190
+                        dict.url = 'stun:' + el.attr('host');
191
+                        if (el.attr('port')) {
192
+                            dict.url += ':' + el.attr('port');
193
+                        }
194
+                        iceservers.push(dict);
195
+                        break;
196
+                    case 'turn':
197
+                    case 'turns': {
198
+                        dict.url = type + ':';
199
+                        const username = el.attr('username');
200 200
                             // https://code.google.com/p/webrtc/issues/detail?id=1508
201
-                            if (username) {
202
-                                if (navigator.userAgent.match(
201
+                        if (username) {
202
+                            if (navigator.userAgent.match(
203 203
                                     /Chrom(e|ium)\/([0-9]+)\./)
204 204
                                     && parseInt(
205 205
                                         navigator.userAgent.match(
206 206
                                             /Chrom(e|ium)\/([0-9]+)\./)[2],
207 207
                                             10) < 28) {
208
-                                    dict.url += username + '@';
209
-                                } else {
208
+                                dict.url += username + '@';
209
+                            } else {
210 210
                                     // only works in M28
211
-                                    dict.username = username;
212
-                                }
213
-                            }
214
-                            dict.url += el.attr('host');
215
-                            const port = el.attr('port');
216
-                            if (port && port != '3478') {
217
-                                dict.url += ':' + el.attr('port');
218
-                            }
219
-                            const transport = el.attr('transport');
220
-                            if (transport && transport != 'udp') {
221
-                                dict.url += '?transport=' + transport;
211
+                                dict.username = username;
222 212
                             }
213
+                        }
214
+                        dict.url += el.attr('host');
215
+                        const port = el.attr('port');
216
+                        if (port && port != '3478') {
217
+                            dict.url += ':' + el.attr('port');
218
+                        }
219
+                        const transport = el.attr('transport');
220
+                        if (transport && transport != 'udp') {
221
+                            dict.url += '?transport=' + transport;
222
+                        }
223 223
 
224
-                            dict.credential = el.attr('password')
224
+                        dict.credential = el.attr('password')
225 225
                                 || dict.credential;
226
-                            iceservers.push(dict);
227
-                            break;
228
-                        }
226
+                        iceservers.push(dict);
227
+                        break;
228
+                    }
229 229
                     }
230 230
                 });
231 231
                 this.ice_config.iceServers = iceservers;

+ 40
- 40
modules/xmpp/strophe.util.js Просмотреть файл

@@ -56,30 +56,30 @@ export default function () {
56 56
         }
57 57
         /* eslint-disable no-case-declarations */
58 58
         switch (level) {
59
-            case Strophe.LogLevel.DEBUG:
59
+        case Strophe.LogLevel.DEBUG:
60 60
                 // The log message which reports successful status is logged
61 61
                 // on Strophe's DEBUG level
62
-                if (lastErrorStatus !== -1 &&
62
+            if (lastErrorStatus !== -1 &&
63 63
                         resetLastErrorStatusRegExpr.test(msg)) {
64
-                    logger.debug("Reset lastErrorStatus");
65
-                    lastErrorStatus = -1;
66
-                }
67
-                break;
68
-            case Strophe.LogLevel.WARN:
69
-                logger.warn("Strophe: " + msg);
70
-                const errStatusCapture = lastErrorStatusRegExpr.exec(msg);
71
-                if (errStatusCapture && errStatusCapture.length === 2) {
72
-                    lastErrorStatus = parseInt(errStatusCapture[1]);
73
-                    logger.debug(
64
+                logger.debug("Reset lastErrorStatus");
65
+                lastErrorStatus = -1;
66
+            }
67
+            break;
68
+        case Strophe.LogLevel.WARN:
69
+            logger.warn("Strophe: " + msg);
70
+            const errStatusCapture = lastErrorStatusRegExpr.exec(msg);
71
+            if (errStatusCapture && errStatusCapture.length === 2) {
72
+                lastErrorStatus = parseInt(errStatusCapture[1]);
73
+                logger.debug(
74 74
                         "lastErrorStatus set to: " + lastErrorStatus);
75
-                }
76
-                break;
77
-            case Strophe.LogLevel.ERROR:
78
-            case Strophe.LogLevel.FATAL:
79
-                msg = "Strophe: " + msg;
80
-                GlobalOnErrorHandler.callErrorHandler(new Error(msg));
81
-                logger.error(msg);
82
-                break;
75
+            }
76
+            break;
77
+        case Strophe.LogLevel.ERROR:
78
+        case Strophe.LogLevel.FATAL:
79
+            msg = "Strophe: " + msg;
80
+            GlobalOnErrorHandler.callErrorHandler(new Error(msg));
81
+            logger.error(msg);
82
+            break;
83 83
         }
84 84
         /* eslint-enable no-case-declarations */
85 85
     };
@@ -96,26 +96,26 @@ export default function () {
96 96
 
97 97
     Strophe.getStatusString = function (status) {
98 98
         switch (status) {
99
-            case Strophe.Status.ERROR:
100
-                return "ERROR";
101
-            case Strophe.Status.CONNECTING:
102
-                return "CONNECTING";
103
-            case Strophe.Status.CONNFAIL:
104
-                return "CONNFAIL";
105
-            case Strophe.Status.AUTHENTICATING:
106
-                return "AUTHENTICATING";
107
-            case Strophe.Status.AUTHFAIL:
108
-                return "AUTHFAIL";
109
-            case Strophe.Status.CONNECTED:
110
-                return "CONNECTED";
111
-            case Strophe.Status.DISCONNECTED:
112
-                return "DISCONNECTED";
113
-            case Strophe.Status.DISCONNECTING:
114
-                return "DISCONNECTING";
115
-            case Strophe.Status.ATTACHED:
116
-                return "ATTACHED";
117
-            default:
118
-                return "unknown";
99
+        case Strophe.Status.ERROR:
100
+            return "ERROR";
101
+        case Strophe.Status.CONNECTING:
102
+            return "CONNECTING";
103
+        case Strophe.Status.CONNFAIL:
104
+            return "CONNFAIL";
105
+        case Strophe.Status.AUTHENTICATING:
106
+            return "AUTHENTICATING";
107
+        case Strophe.Status.AUTHFAIL:
108
+            return "AUTHFAIL";
109
+        case Strophe.Status.CONNECTED:
110
+            return "CONNECTED";
111
+        case Strophe.Status.DISCONNECTED:
112
+            return "DISCONNECTED";
113
+        case Strophe.Status.DISCONNECTING:
114
+            return "DISCONNECTING";
115
+        case Strophe.Status.ATTACHED:
116
+            return "ATTACHED";
117
+        default:
118
+            return "unknown";
119 119
         }
120 120
     };
121 121
 }

+ 8
- 8
modules/xmpp/xmpp.js Просмотреть файл

@@ -93,8 +93,8 @@ export default class XMPP extends Listenable {
93 93
     }
94 94
 
95 95
     getConnection () {
96
- return this.connection; 
97
-}
96
+        return this.connection; 
97
+    }
98 98
 
99 99
     /**
100 100
      * Receive connection status changes and handles them.
@@ -122,15 +122,15 @@ export default class XMPP extends Listenable {
122 122
                 pingJid,
123 123
                 function (hasPing) {
124 124
                     if (hasPing)                        {
125
-this.connection.ping.startInterval(pingJid);
126
-}                    else                        {
127
-logger.warn("Ping NOT supported by " + pingJid);
128
-}
125
+                        this.connection.ping.startInterval(pingJid);
126
+                    }                    else                        {
127
+                        logger.warn("Ping NOT supported by " + pingJid);
128
+                    }
129 129
                 }.bind(this));
130 130
 
131 131
             if (password)                {
132
-this.authenticatedUser = true;
133
-}
132
+                this.authenticatedUser = true;
133
+            }
134 134
             if (this.connection && this.connection.connected &&
135 135
                 Strophe.getResourceFromJid(this.connection.jid)) {
136 136
                 // .connected is true while connecting?

Загрузка…
Отмена
Сохранить