浏览代码

[eslint] object-property-newline

master
Lyubo Marinov 8 年前
父节点
当前提交
9a8b5563c6

+ 1
- 0
.eslintrc.js 查看文件

@@ -201,6 +201,7 @@ module.exports = {
201 201
         'no-whitespace-before-property': 2,
202 202
         'object-curly-newline': 0,
203 203
         'object-curly-spacing': [ 'error', 'always' ],
204
+        'object-property-newline': 2,
204 205
         'one-var': 0,
205 206
         'one-var-declaration-per-line': 0,
206 207
         'operator-assignment': 0,

+ 8
- 2
JitsiConference.js 查看文件

@@ -61,7 +61,10 @@ function JitsiConference(options) {
61 61
     this.authEnabled = false;
62 62
     this.startAudioMuted = false;
63 63
     this.startVideoMuted = false;
64
-    this.startMutedPolicy = { audio: false, video: false };
64
+    this.startMutedPolicy = {
65
+        audio: false,
66
+        video: false
67
+    };
65 68
     this.availableDevices = {
66 69
         audio: undefined,
67 70
         video: undefined
@@ -399,7 +402,10 @@ JitsiConference.prototype.setDisplayName = function(name) {
399 402
         // remove previously set nickname
400 403
         this.room.removeFromPresence('nick');
401 404
 
402
-        this.room.addToPresence('nick', { attributes: { xmlns: 'http://jabber.org/protocol/nick' }, value: name });
405
+        this.room.addToPresence('nick', {
406
+            attributes: { xmlns: 'http://jabber.org/protocol/nick' },
407
+            value: name
408
+        });
403 409
         this.room.sendPresence();
404 410
     }
405 411
 };

+ 4
- 2
JitsiConferenceEventManager.js 查看文件

@@ -279,12 +279,14 @@ JitsiConferenceEventManager.prototype.setupChatRoomListeners = function() {
279 279
     conference.room.addListener(XMPPEvents.LOCAL_UFRAG_CHANGED,
280 280
         ufrag => {
281 281
             Statistics.sendLog(
282
-                JSON.stringify({ id: 'local_ufrag', value: ufrag }));
282
+                JSON.stringify({ id: 'local_ufrag',
283
+                    value: ufrag }));
283 284
         });
284 285
     conference.room.addListener(XMPPEvents.REMOTE_UFRAG_CHANGED,
285 286
         ufrag => {
286 287
             Statistics.sendLog(
287
-                JSON.stringify({ id: 'remote_ufrag', value: ufrag }));
288
+                JSON.stringify({ id: 'remote_ufrag',
289
+                    value: ufrag }));
288 290
         });
289 291
 
290 292
     chatRoom.addPresenceListener('startmuted', (data, from) => {

+ 5
- 2
JitsiConnection.js 查看文件

@@ -35,7 +35,8 @@ function JitsiConnection(appID, token, options) {
35 35
                     `connection.disconnected.${msg}`);
36 36
             }
37 37
             Statistics.sendLog(
38
-                JSON.stringify({ id: 'connection.disconnected', msg }));
38
+                JSON.stringify({ id: 'connection.disconnected',
39
+                    msg }));
39 40
         });
40 41
 }
41 42
 
@@ -91,7 +92,9 @@ JitsiConnection.prototype.setToken = function(token) {
91 92
  * @returns {JitsiConference} returns the new conference object.
92 93
  */
93 94
 JitsiConnection.prototype.initJitsiConference = function(name, options) {
94
-    return new JitsiConference({ name, config: options, connection: this });
95
+    return new JitsiConference({ name,
96
+        config: options,
97
+        connection: this });
95 98
 };
96 99
 
97 100
 /**

+ 10
- 5
modules/RTC/RTCUtils.js 查看文件

@@ -139,7 +139,8 @@ function setResolutionConstraints(constraints, resolution) {
139 139
  * @param {bool} firefox_fake_device
140 140
  */
141 141
 function getConstraints(um, options) {
142
-    const constraints = { audio: false, video: false };
142
+    const constraints = { audio: false,
143
+        video: false };
143 144
 
144 145
     // Don't mix new and old style settings for Chromium as this leads
145 146
     // to TypeError in new Chromium versions. @see
@@ -155,7 +156,8 @@ function getConstraints(um, options) {
155 156
 
156 157
     if (um.indexOf('video') >= 0) {
157 158
         // same behaviour as true
158
-        constraints.video = { mandatory: {}, optional: [] };
159
+        constraints.video = { mandatory: {},
160
+            optional: [] };
159 161
 
160 162
         if (options.cameraDeviceId) {
161 163
             if (isNewStyleConstraintsSupported) {
@@ -214,7 +216,8 @@ function getConstraints(um, options) {
214 216
             }
215 217
         } else {
216 218
             // same behaviour as true
217
-            constraints.audio = { mandatory: {}, optional: [] };
219
+            constraints.audio = { mandatory: {},
220
+                optional: [] };
218 221
             if (options.micDeviceId) {
219 222
                 if (isNewStyleConstraintsSupported) {
220 223
                     // New style of setting device id.
@@ -287,7 +290,8 @@ function getConstraints(um, options) {
287 290
     if (options.bandwidth) {
288 291
         if (!constraints.video) {
289 292
             // same behaviour as true
290
-            constraints.video = { mandatory: {}, optional: [] };
293
+            constraints.video = { mandatory: {},
294
+                optional: [] };
291 295
         }
292 296
         constraints.video.optional.push({ bandwidth: options.bandwidth });
293 297
     }
@@ -671,7 +675,8 @@ function wrapAttachMediaStream(origAttachMediaStream) {
671 675
                     const err = new JitsiTrackError(ex, null, [ 'audiooutput' ]);
672 676
 
673 677
                     GlobalOnErrorHandler.callUnhandledRejectionHandler(
674
-                        { promise: this, reason: err });
678
+                        { promise: this,
679
+                            reason: err });
675 680
 
676 681
                     logger.warn('Failed to set audio output device for the '
677 682
                         + 'element. Default audio output device will be used '

+ 2
- 1
modules/RTC/TraceablePeerConnection.js 查看文件

@@ -975,7 +975,8 @@ TraceablePeerConnection.prototype.getStats = function(callback, errback) {
975 975
  * - groups - Array of the groups associated with the stream.
976 976
  */
977 977
 TraceablePeerConnection.prototype.generateNewStreamSSRCInfo = function() {
978
-    let ssrcInfo = { ssrcs: [], groups: [] };
978
+    let ssrcInfo = { ssrcs: [],
979
+        groups: [] };
979 980
 
980 981
     if (!this.options.disableSimulcast
981 982
         && this.simulcast.isSupported()) {

+ 36
- 6
modules/connectivity/ConnectionQuality.js 查看文件

@@ -20,12 +20,42 @@ const STATS_MESSAGE_TYPE = 'stats';
20 20
  * See media/engine/simulcast.ss from webrtc.org
21 21
  */
22 22
 const kSimulcastFormats = [
23
-    { width: 1920, height: 1080, layers: 3, max: 5000, target: 4000, min: 800 },
24
-    { width: 1280, height: 720, layers: 3, max: 2500, target: 2500, min: 600 },
25
-    { width: 960, height: 540, layers: 3, max: 900, target: 900, min: 450 },
26
-    { width: 640, height: 360, layers: 2, max: 700, target: 500, min: 150 },
27
-    { width: 480, height: 270, layers: 2, max: 450, target: 350, min: 150 },
28
-    { width: 320, height: 180, layers: 1, max: 200, target: 150, min: 30 }
23
+    { width: 1920,
24
+        height: 1080,
25
+        layers: 3,
26
+        max: 5000,
27
+        target: 4000,
28
+        min: 800 },
29
+    { width: 1280,
30
+        height: 720,
31
+        layers: 3,
32
+        max: 2500,
33
+        target: 2500,
34
+        min: 600 },
35
+    { width: 960,
36
+        height: 540,
37
+        layers: 3,
38
+        max: 900,
39
+        target: 900,
40
+        min: 450 },
41
+    { width: 640,
42
+        height: 360,
43
+        layers: 2,
44
+        max: 700,
45
+        target: 500,
46
+        min: 150 },
47
+    { width: 480,
48
+        height: 270,
49
+        layers: 2,
50
+        max: 450,
51
+        target: 350,
52
+        min: 150 },
53
+    { width: 320,
54
+        height: 180,
55
+        layers: 1,
56
+        max: 200,
57
+        target: 150,
58
+        min: 30 }
29 59
 ];
30 60
 
31 61
 /**

+ 5
- 2
modules/statistics/CallStats.js 查看文件

@@ -363,7 +363,8 @@ CallStats._reportEvent = function(event, eventData) {
363 363
     } else {
364 364
         CallStats.reportsQueue.push({
365 365
             type: reportType.EVENT,
366
-            data: { event, eventData }
366
+            data: { event,
367
+                eventData }
367 368
         });
368 369
         CallStats._checkInitialize();
369 370
     }
@@ -428,7 +429,9 @@ CallStats._reportError = function(type, e, pc) {
428 429
     } else {
429 430
         CallStats.reportsQueue.push({
430 431
             type: reportType.ERROR,
431
-            data: { type, error: e, pc }
432
+            data: { type,
433
+                error: e,
434
+                pc }
432 435
         });
433 436
         CallStats._checkInitialize();
434 437
     }

+ 7
- 3
modules/statistics/RTPStatsCollector.js 查看文件

@@ -444,7 +444,9 @@ StatsCollector.prototype.processStatsReport = function() {
444 444
             if (!conferenceStatsTransport.some(
445 445
                     t =>
446 446
                         t.ip == ip && t.type == type && t.localip == localip)) {
447
-                conferenceStatsTransport.push({ ip, type, localip });
447
+                conferenceStatsTransport.push({ ip,
448
+                    type,
449
+                    localip });
448 450
             }
449 451
             continue;
450 452
         }
@@ -546,7 +548,8 @@ StatsCollector.prototype.processStatsReport = function() {
546 548
             'upload': bitrateSentKbps
547 549
         });
548 550
 
549
-        const resolution = { height: null, width: null };
551
+        const resolution = { height: null,
552
+            width: null };
550 553
 
551 554
         try {
552 555
             let height, width;
@@ -607,7 +610,8 @@ StatsCollector.prototype.processStatsReport = function() {
607 610
     this.eventEmitter.emit(StatisticsEvents.BYTE_SENT_STATS, byteSentStats);
608 611
 
609 612
     this.conferenceStats.bitrate
610
-      = { 'upload': bitrateUpload, 'download': bitrateDownload };
613
+      = { 'upload': bitrateUpload,
614
+          'download': bitrateDownload };
611 615
 
612 616
     this.conferenceStats.packetLoss = {
613 617
         total:

+ 4
- 2
modules/statistics/statistics.js 查看文件

@@ -443,7 +443,8 @@ Statistics.prototype.sendFeedback = function(overall, detailed) {
443 443
         this.callstats.sendFeedback(overall, detailed);
444 444
     }
445 445
     Statistics.analytics.sendEvent('feedback.rating',
446
-        { value: overall, detailed });
446
+        { value: overall,
447
+            detailed });
447 448
 };
448 449
 
449 450
 Statistics.LOCAL_JID = require('../../service/statistics/constants').LOCAL_JID;
@@ -468,7 +469,8 @@ Statistics.reportGlobalError = function(error) {
468 469
  */
469 470
 Statistics.sendEventToAll = function(eventName, data) {
470 471
     this.analytics.sendEvent(eventName, data);
471
-    Statistics.sendLog(JSON.stringify({ name: eventName, data }));
472
+    Statistics.sendLog(JSON.stringify({ name: eventName,
473
+        data }));
472 474
 };
473 475
 
474 476
 module.exports = Statistics;

+ 2
- 1
modules/xmpp/Caps.js 查看文件

@@ -212,7 +212,8 @@ export default class Caps extends Listenable {
212 212
         const node = caps.getAttribute('node');
213 213
         const oldVersion = this.jidToVersion[from];
214 214
 
215
-        this.jidToVersion[from] = { version, node };
215
+        this.jidToVersion[from] = { version,
216
+            node };
216 217
         if (oldVersion && oldVersion.version !== version) {
217 218
             this.eventEmitter.emit(XMPPEvents.PARTCIPANT_FEATURES_CHANGED,
218 219
                 from);

+ 30
- 15
modules/xmpp/ChatRoom.js 查看文件

@@ -93,7 +93,8 @@ export default class ChatRoom extends Listenable {
93 93
         this.noBridgeAvailable = false;
94 94
         this.options = options || {};
95 95
         this.moderator = new Moderator(this.roomjid, this.xmpp, this.eventEmitter,
96
-            { connection: this.xmpp.options, conference: this.options });
96
+            { connection: this.xmpp.options,
97
+                conference: this.options });
97 98
         this.initPresenceMap();
98 99
         this.lastPresences = {};
99 100
         this.phoneNumber = null;
@@ -180,7 +181,8 @@ export default class ChatRoom extends Listenable {
180 181
      */
181 182
     doLeave() {
182 183
         logger.log('do leave', this.myroomjid);
183
-        const pres = $pres({ to: this.myroomjid, type: 'unavailable' });
184
+        const pres = $pres({ to: this.myroomjid,
185
+            type: 'unavailable' });
184 186
 
185 187
         this.presMap.length = 0;
186 188
 
@@ -203,7 +205,8 @@ export default class ChatRoom extends Listenable {
203 205
     discoRoomInfo() {
204 206
       // https://xmpp.org/extensions/xep-0045.html#disco-roominfo
205 207
 
206
-        const getInfo = $iq({ type: 'get', to: this.roomjid })
208
+        const getInfo = $iq({ type: 'get',
209
+            to: this.roomjid })
207 210
         .c('query', { xmlns: Strophe.NS.DISCO_INFO });
208 211
 
209 212
         this.connection.sendIQ(getInfo, result => {
@@ -226,9 +229,11 @@ export default class ChatRoom extends Listenable {
226 229
     createNonAnonymousRoom() {
227 230
         // http://xmpp.org/extensions/xep-0045.html#createroom-reserved
228 231
 
229
-        const getForm = $iq({ type: 'get', to: this.roomjid })
232
+        const getForm = $iq({ type: 'get',
233
+            to: this.roomjid })
230 234
             .c('query', { xmlns: 'http://jabber.org/protocol/muc#owner' })
231
-            .c('x', { xmlns: 'jabber:x:data', type: 'submit' });
235
+            .c('x', { xmlns: 'jabber:x:data',
236
+                type: 'submit' });
232 237
 
233 238
         const self = this;
234 239
 
@@ -244,10 +249,12 @@ export default class ChatRoom extends Listenable {
244 249
                 return;
245 250
             }
246 251
 
247
-            const formSubmit = $iq({ to: self.roomjid, type: 'set' })
252
+            const formSubmit = $iq({ to: self.roomjid,
253
+                type: 'set' })
248 254
                 .c('query', { xmlns: 'http://jabber.org/protocol/muc#owner' });
249 255
 
250
-            formSubmit.c('x', { xmlns: 'jabber:x:data', type: 'submit' });
256
+            formSubmit.c('x', { xmlns: 'jabber:x:data',
257
+                type: 'submit' });
251 258
 
252 259
             formSubmit.c('field', { 'var': 'FORM_TYPE' })
253 260
                 .c('value')
@@ -477,7 +484,8 @@ export default class ChatRoom extends Listenable {
477 484
     }
478 485
 
479 486
     sendMessage(body, nickname) {
480
-        const msg = $msg({ to: this.roomjid, type: 'groupchat' });
487
+        const msg = $msg({ to: this.roomjid,
488
+            type: 'groupchat' });
481 489
 
482 490
         msg.c('body', body).up();
483 491
         if (nickname) {
@@ -488,7 +496,8 @@ export default class ChatRoom extends Listenable {
488 496
     }
489 497
 
490 498
     setSubject(subject) {
491
-        const msg = $msg({ to: this.roomjid, type: 'groupchat' });
499
+        const msg = $msg({ to: this.roomjid,
500
+            type: 'groupchat' });
492 501
 
493 502
         msg.c('subject', subject);
494 503
         this.connection.send(msg);
@@ -654,9 +663,11 @@ export default class ChatRoom extends Listenable {
654 663
     }
655 664
 
656 665
     kick(jid) {
657
-        const kickIQ = $iq({ to: this.roomjid, type: 'set' })
666
+        const kickIQ = $iq({ to: this.roomjid,
667
+            type: 'set' })
658 668
             .c('query', { xmlns: 'http://jabber.org/protocol/muc#admin' })
659
-            .c('item', { nick: Strophe.getResourceFromJid(jid), role: 'none' })
669
+            .c('item', { nick: Strophe.getResourceFromJid(jid),
670
+                role: 'none' })
660 671
             .c('reason').t('You have been kicked.').up().up().up();
661 672
 
662 673
         this.connection.sendIQ(
@@ -668,14 +679,17 @@ export default class ChatRoom extends Listenable {
668 679
     lockRoom(key, onSuccess, onError, onNotSupported) {
669 680
         // http://xmpp.org/extensions/xep-0045.html#roomconfig
670 681
         this.connection.sendIQ(
671
-            $iq({ to: this.roomjid, type: 'get' }).c('query', { xmlns: 'http://jabber.org/protocol/muc#owner' }),
682
+            $iq({ to: this.roomjid,
683
+                type: 'get' }).c('query', { xmlns: 'http://jabber.org/protocol/muc#owner' }),
672 684
             res => {
673 685
                 if ($(res).find('>query>x[xmlns="jabber:x:data"]>field[var="muc#roomconfig_roomsecret"]').length) {
674 686
                     const formsubmit
675
-                        = $iq({ to: this.roomjid, type: 'set' })
687
+                        = $iq({ to: this.roomjid,
688
+                            type: 'set' })
676 689
                             .c('query', { xmlns: 'http://jabber.org/protocol/muc#owner' });
677 690
 
678
-                    formsubmit.c('x', { xmlns: 'jabber:x:data', type: 'submit' });
691
+                    formsubmit.c('x', { xmlns: 'jabber:x:data',
692
+                        type: 'submit' });
679 693
                     formsubmit.c('field', { 'var': 'FORM_TYPE' }).c('value').t('http://jabber.org/protocol/muc#roomconfig').up().up();
680 694
                     formsubmit.c('field', { 'var': 'muc#roomconfig_roomsecret' }).c('value').t(key).up().up();
681 695
                     // Fixes a bug in prosody 0.9.+ https://code.google.com/p/lxmppd/issues/detail?id=373
@@ -919,7 +933,8 @@ export default class ChatRoom extends Listenable {
919 933
     muteParticipant(jid, mute) {
920 934
         logger.info('set mute', mute);
921 935
         const iqToFocus = $iq(
922
-            { to: this.focusMucJid, type: 'set' })
936
+            { to: this.focusMucJid,
937
+                type: 'set' })
923 938
             .c('mute', {
924 939
                 xmlns: 'http://jitsi.org/jitmeet/audio',
925 940
                 jid

+ 12
- 6
modules/xmpp/JingleSessionPC.js 查看文件

@@ -267,7 +267,8 @@ export default class JingleSessionPC extends JingleSession {
267 267
 
268 268
     sendIceCandidates(candidates) {
269 269
         logger.log('sendIceCandidates', candidates);
270
-        const cand = $iq({ to: this.peerjid, type: 'set' })
270
+        const cand = $iq({ to: this.peerjid,
271
+            type: 'set' })
271 272
             .c('jingle', { xmlns: 'urn:xmpp:jingle:1',
272 273
                 action: 'transport-info',
273 274
                 initiator: this.initiator,
@@ -542,7 +543,8 @@ export default class JingleSessionPC extends JingleSession {
542 543
      *        or when the request has timed out.
543 544
      */
544 545
     sendTransportAccept(localSDP, success, failure) {
545
-        let transportAccept = $iq({ to: this.peerjid, type: 'set' })
546
+        let transportAccept = $iq({ to: this.peerjid,
547
+            type: 'set' })
546 548
             .c('jingle', {
547 549
                 xmlns: 'urn:xmpp:jingle:1',
548 550
                 action: 'transport-accept',
@@ -587,7 +589,8 @@ export default class JingleSessionPC extends JingleSession {
587 589
     sendTransportReject(success, failure) {
588 590
         // Send 'transport-reject', so that the focus will
589 591
         // know that we've failed
590
-        let transportReject = $iq({ to: this.peerjid, type: 'set' })
592
+        let transportReject = $iq({ to: this.peerjid,
593
+            type: 'set' })
591 594
             .c('jingle', {
592 595
                 xmlns: 'urn:xmpp:jingle:1',
593 596
                 action: 'transport-reject',
@@ -610,7 +613,8 @@ export default class JingleSessionPC extends JingleSession {
610 613
     terminate(reason, text, success, failure) {
611 614
         this.state = JingleSessionState.ENDED;
612 615
 
613
-        let sessionTerminate = $iq({ to: this.peerjid, type: 'set' })
616
+        let sessionTerminate = $iq({ to: this.peerjid,
617
+            type: 'set' })
614 618
             .c('jingle', {
615 619
                 xmlns: 'urn:xmpp:jingle:1',
616 620
                 action: 'session-terminate',
@@ -1322,7 +1326,8 @@ export default class JingleSessionPC extends JingleSession {
1322 1326
 
1323 1327
         // send source-remove IQ.
1324 1328
         let sdpDiffer = new SDPDiffer(new_sdp, old_sdp);
1325
-        const remove = $iq({ to: this.peerjid, type: 'set' })
1329
+        const remove = $iq({ to: this.peerjid,
1330
+            type: 'set' })
1326 1331
             .c('jingle', {
1327 1332
                 xmlns: 'urn:xmpp:jingle:1',
1328 1333
                 action: 'source-remove',
@@ -1348,7 +1353,8 @@ export default class JingleSessionPC extends JingleSession {
1348 1353
 
1349 1354
         // send source-add IQ.
1350 1355
         sdpDiffer = new SDPDiffer(old_sdp, new_sdp);
1351
-        const add = $iq({ to: this.peerjid, type: 'set' })
1356
+        const add = $iq({ to: this.peerjid,
1357
+            type: 'set' })
1352 1358
             .c('jingle', {
1353 1359
                 xmlns: 'urn:xmpp:jingle:1',
1354 1360
                 action: 'source-add',

+ 22
- 11
modules/xmpp/SDP.js 查看文件

@@ -177,7 +177,8 @@ SDP.prototype.toJingle = function(elem, thecreator) {
177 177
             tmp = lines[i].split(' ');
178 178
             const semantics = tmp.shift().substr(8);
179 179
 
180
-            elem.c('group', { xmlns: 'urn:xmpp:jingle:apps:grouping:0', semantics });
180
+            elem.c('group', { xmlns: 'urn:xmpp:jingle:apps:grouping:0',
181
+                semantics });
181 182
             for (j = 0; j < tmp.length; j++) {
182 183
                 elem.c('content', { name: tmp[j] }).up();
183 184
             }
@@ -199,7 +200,8 @@ SDP.prototype.toJingle = function(elem, thecreator) {
199 200
             ssrc = false;
200 201
         }
201 202
 
202
-        elem.c('content', { creator: thecreator, name: mline.media });
203
+        elem.c('content', { creator: thecreator,
204
+            name: mline.media });
203 205
         const amidline = SDPUtil.find_line(this.media[i], 'a=mid:');
204 206
 
205 207
         if (amidline) {
@@ -243,7 +245,8 @@ SDP.prototype.toJingle = function(elem, thecreator) {
243 245
 
244 246
             if (ssrc) {
245 247
                 // new style mapping
246
-                elem.c('source', { ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
248
+                elem.c('source', { ssrc,
249
+                    xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
247 250
                 // FIXME: group by ssrc and support multiple different ssrcs
248 251
                 const ssrclines = SDPUtil.find_lines(this.media[i], 'a=ssrc:');
249 252
 
@@ -255,7 +258,8 @@ SDP.prototype.toJingle = function(elem, thecreator) {
255 258
                         if (linessrc != ssrc) {
256 259
                             elem.up();
257 260
                             ssrc = linessrc;
258
-                            elem.c('source', { ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
261
+                            elem.c('source', { ssrc,
262
+                                xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
259 263
                         }
260 264
                         const kv = line.substr(idx + 1);
261 265
 
@@ -276,7 +280,8 @@ SDP.prototype.toJingle = function(elem, thecreator) {
276 280
                     });
277 281
                 } else {
278 282
                     elem.up();
279
-                    elem.c('source', { ssrc, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
283
+                    elem.c('source', { ssrc,
284
+                        xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
280 285
                     elem.c('parameter');
281 286
                     elem.attrs({
282 287
                         name: 'cname',
@@ -298,13 +303,16 @@ SDP.prototype.toJingle = function(elem, thecreator) {
298 303
                     if (msid !== null) {
299 304
                         msid = SDPUtil.filter_special_chars(msid);
300 305
                         elem.c('parameter');
301
-                        elem.attrs({ name: 'msid', value: msid });
306
+                        elem.attrs({ name: 'msid',
307
+                            value: msid });
302 308
                         elem.up();
303 309
                         elem.c('parameter');
304
-                        elem.attrs({ name: 'mslabel', value: msid });
310
+                        elem.attrs({ name: 'mslabel',
311
+                            value: msid });
305 312
                         elem.up();
306 313
                         elem.c('parameter');
307
-                        elem.attrs({ name: 'label', value: msid });
314
+                        elem.attrs({ name: 'label',
315
+                            value: msid });
308 316
                         elem.up();
309 317
                     }
310 318
                 }
@@ -319,7 +327,8 @@ SDP.prototype.toJingle = function(elem, thecreator) {
319 327
                     const ssrcs = line.substr(14 + semantics.length).split(' ');
320 328
 
321 329
                     if (ssrcs.length) {
322
-                        elem.c('ssrc-group', { semantics, xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
330
+                        elem.c('ssrc-group', { semantics,
331
+                            xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
323 332
                         ssrcs.forEach(ssrc => elem.c('source', { ssrc }).up());
324 333
                         elem.up();
325 334
                     }
@@ -464,10 +473,12 @@ SDP.prototype.rtcpFbToJingle = function(mediaindex, elem, payloadtype) { // XEP-
464 473
         const tmp = SDPUtil.parse_rtcpfb(line);
465 474
 
466 475
         if (tmp.type == 'trr-int') {
467
-            elem.c('rtcp-fb-trr-int', { xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0', value: tmp.params[0] });
476
+            elem.c('rtcp-fb-trr-int', { xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0',
477
+                value: tmp.params[0] });
468 478
             elem.up();
469 479
         } else {
470
-            elem.c('rtcp-fb', { xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0', type: tmp.type });
480
+            elem.c('rtcp-fb', { xmlns: 'urn:xmpp:jingle:apps:rtp:rtcp-fb:0',
481
+                type: tmp.type });
471 482
             if (tmp.params.length > 0) {
472 483
                 elem.attrs({ 'subtype': tmp.params[0] });
473 484
             }

+ 2
- 1
modules/xmpp/SDPDiffer.js 查看文件

@@ -124,7 +124,8 @@ SDPDiffer.prototype.toJingle = function(modify) {
124 124
         modify.c('content', { name: media.mid });
125 125
 
126 126
         modify.c('description',
127
-                 { xmlns: 'urn:xmpp:jingle:apps:rtp:1', media: media.mid });
127
+            { xmlns: 'urn:xmpp:jingle:apps:rtp:1',
128
+                media: media.mid });
128 129
         // FIXME: not completely sure this operates on blocks and / or handles
129 130
         // different ssrcs correctly
130 131
         // generate sources from lines

+ 4
- 2
modules/xmpp/SDPUtil.js 查看文件

@@ -131,10 +131,12 @@ const SDPUtil = {
131 131
             const value = parts[i].split('=')[1];
132 132
 
133 133
             if (key && value) {
134
-                data.push({ name: key, value });
134
+                data.push({ name: key,
135
+                    value });
135 136
             } else if (key) {
136 137
                 // rfc 4733 (DTMF) style stuff
137
-                data.push({ name: '', value: key });
138
+                data.push({ name: '',
139
+                    value: key });
138 140
             }
139 141
         }
140 142
 

+ 6
- 3
modules/xmpp/moderator.js 查看文件

@@ -113,7 +113,8 @@ Moderator.prototype.getFocusComponent = function() {
113 113
 
114 114
 Moderator.prototype.createConferenceIq = function() {
115 115
     // Generate create conference IQ
116
-    const elem = $iq({ to: this.getFocusComponent(), type: 'set' });
116
+    const elem = $iq({ to: this.getFocusComponent(),
117
+        type: 'set' });
117 118
 
118 119
     // Session Id used for authentication
119 120
     const sessionId = Settings.getSessionId();
@@ -433,7 +434,8 @@ Moderator.prototype.getLoginUrl = function(urlCallback, failureCallback) {
433 434
  * @param failureCb
434 435
  */
435 436
 Moderator.prototype._getLoginUrl = function(popup, urlCb, failureCb) {
436
-    const iq = $iq({ to: this.getFocusComponent(), type: 'get' });
437
+    const iq = $iq({ to: this.getFocusComponent(),
438
+        type: 'get' });
437 439
     const attrs = {
438 440
         xmlns: 'http://jitsi.org/protocol/focus',
439 441
         room: this.roomName,
@@ -481,7 +483,8 @@ Moderator.prototype.getPopupLoginUrl = function(urlCallback, failureCallback) {
481 483
 };
482 484
 
483 485
 Moderator.prototype.logout = function(callback) {
484
-    const iq = $iq({ to: this.getFocusComponent(), type: 'set' });
486
+    const iq = $iq({ to: this.getFocusComponent(),
487
+        type: 'set' });
485 488
     const sessionId = Settings.getSessionId();
486 489
 
487 490
     if (!sessionId) {

+ 8
- 4
modules/xmpp/recording.js 查看文件

@@ -94,7 +94,8 @@ Recording.prototype.setRecordingJibri
94 94
 
95 95
     // FIXME jibri does not accept IQ without 'url' attribute set ?
96 96
         const iq
97
-            = $iq({ to: this.focusMucJid, type: 'set' })
97
+            = $iq({ to: this.focusMucJid,
98
+                type: 'set' })
98 99
                 .c('jibri', {
99 100
                     'xmlns': 'http://jitsi.org/protocol/jibri',
100 101
                     'action': state === Recording.status.ON
@@ -128,7 +129,8 @@ Recording.prototype.setRecordingJirecon
128 129
             errCallback(new Error('Invalid state!'));
129 130
         }
130 131
 
131
-        const iq = $iq({ to: this.jirecon, type: 'set' })
132
+        const iq = $iq({ to: this.jirecon,
133
+            type: 'set' })
132 134
         .c('recording', { xmlns: 'http://jitsi.org/protocol/jirecon',
133 135
             action: state === Recording.status.ON
134 136
                 ? Recording.action.START
@@ -171,12 +173,14 @@ Recording.prototype.setRecordingJirecon
171 173
 // with the new recording state, according to the IQ.
172 174
 Recording.prototype.setRecordingColibri
173 175
 = function(state, callback, errCallback, options) {
174
-    const elem = $iq({ to: this.focusMucJid, type: 'set' });
176
+    const elem = $iq({ to: this.focusMucJid,
177
+        type: 'set' });
175 178
 
176 179
     elem.c('conference', {
177 180
         xmlns: 'http://jitsi.org/protocol/colibri'
178 181
     });
179
-    elem.c('recording', { state, token: options.token });
182
+    elem.c('recording', { state,
183
+        token: options.token });
180 184
 
181 185
     const self = this;
182 186
 

+ 2
- 1
modules/xmpp/strophe.jingle.js 查看文件

@@ -192,7 +192,8 @@ class JingleConnectionPlugin extends ConnectionPlugin {
192 192
         // TODO: implement refresh via updateIce as described in
193 193
         //      https://code.google.com/p/webrtc/issues/detail?id=1650
194 194
         this.connection.sendIQ(
195
-            $iq({ type: 'get', to: this.connection.domain })
195
+            $iq({ type: 'get',
196
+                to: this.connection.domain })
196 197
                 .c('services', { xmlns: 'urn:xmpp:extdisco:1' })
197 198
                 .c('service', { host: `turn.${this.connection.domain}` }),
198 199
             res => {

+ 2
- 1
modules/xmpp/strophe.ping.js 查看文件

@@ -57,7 +57,8 @@ class PingConnectionPlugin extends ConnectionPlugin {
57 57
      *        argument.
58 58
      */
59 59
     ping(jid, success, error, timeout) {
60
-        const iq = $iq({ type: 'get', to: jid });
60
+        const iq = $iq({ type: 'get',
61
+            to: jid });
61 62
 
62 63
         iq.c('ping', { xmlns: Strophe.NS.PING });
63 64
         this.connection.sendIQ(iq, success, error, timeout);

正在加载...
取消
保存