Sfoglia il codice sorgente

[eslint] camelcase

dev1
Lyubo Marinov 8 anni fa
parent
commit
c88c4f9124

+ 1
- 0
.eslintrc.js Vedi File

160
         ],
160
         ],
161
         'block-spacing': [ 'error', 'always' ],
161
         'block-spacing': [ 'error', 'always' ],
162
         'brace-style': 2,
162
         'brace-style': 2,
163
+        'camelcase': 2,
163
         'comma-dangle': 2,
164
         'comma-dangle': 2,
164
         'comma-spacing': 2,
165
         'comma-spacing': 2,
165
         'comma-style': 2,
166
         'comma-style': 2,

+ 3
- 3
connection_optimization/external_connect.js Vedi File

11
  *
11
  *
12
  * @param webserviceUrl the url for the web service that is going to create the
12
  * @param webserviceUrl the url for the web service that is going to create the
13
  * connection.
13
  * connection.
14
- * @param success_callback callback function called with the result of the AJAX
14
+ * @param successCallback callback function called with the result of the AJAX
15
  * request if the request was successfull. The callback will receive one
15
  * request if the request was successfull. The callback will receive one
16
  * parameter which will be JS Object with properties - rid, sid and jid. This
16
  * parameter which will be JS Object with properties - rid, sid and jid. This
17
  * result should be passed to JitsiConnection.attach method in order to use that
17
  * result should be passed to JitsiConnection.attach method in order to use that
22
  */
22
  */
23
 function createConnectionExternally( // eslint-disable-line no-unused-vars
23
 function createConnectionExternally( // eslint-disable-line no-unused-vars
24
         webserviceUrl,
24
         webserviceUrl,
25
-        success_callback,
25
+        successCallback,
26
         error_callback) {
26
         error_callback) {
27
     if (!window.XMLHttpRequest) {
27
     if (!window.XMLHttpRequest) {
28
         error_callback(new Error('XMLHttpRequest is not supported!'));
28
         error_callback(new Error('XMLHttpRequest is not supported!'));
51
                         'CrossRegion': proxyRegion !== jitsiRegion ? 1 : 0
51
                         'CrossRegion': proxyRegion !== jitsiRegion ? 1 : 0
52
                     };
52
                     };
53
 
53
 
54
-                    success_callback(data);
54
+                    successCallback(data);
55
                 } catch (e) {
55
                 } catch (e) {
56
                     error_callback(e);
56
                     error_callback(e);
57
                 }
57
                 }

+ 1
- 1
modules/RTC/RTC.js Vedi File

528
     }
528
     }
529
 
529
 
530
     static getPCConstraints() {
530
     static getPCConstraints() {
531
-        return RTCUtils.pc_constraints;
531
+        return RTCUtils.pcConstraints;
532
     }
532
     }
533
 
533
 
534
     static attachMediaStream(elSelector, stream) {
534
     static attachMediaStream(elSelector, stream) {

+ 16
- 16
modules/RTC/RTCUtils.js Vedi File

794
                     = wrapEnumerateDevices(
794
                     = wrapEnumerateDevices(
795
                         navigator.mediaDevices.enumerateDevices.bind(
795
                         navigator.mediaDevices.enumerateDevices.bind(
796
                             navigator.mediaDevices));
796
                             navigator.mediaDevices));
797
-                this.pc_constraints = {};
797
+                this.pcConstraints = {};
798
                 this.attachMediaStream
798
                 this.attachMediaStream
799
                     = wrapAttachMediaStream((element, stream) => {
799
                     = wrapAttachMediaStream((element, stream) => {
800
                         // srcObject is being standardized and FF will
800
                         // srcObject is being standardized and FF will
826
                         id = tracks[0].id;
826
                         id = tracks[0].id;
827
                     }
827
                     }
828
 
828
 
829
-                    return SDPUtil.filter_special_chars(id);
829
+                    return SDPUtil.filterSpecialChars(id);
830
                 };
830
                 };
831
 
831
 
832
                 /* eslint-disable no-global-assign, no-native-reassign */
832
                 /* eslint-disable no-global-assign, no-native-reassign */
878
                     return (
878
                     return (
879
                         typeof id === 'number'
879
                         typeof id === 'number'
880
                             ? id
880
                             ? id
881
-                            : SDPUtil.filter_special_chars(id));
881
+                            : SDPUtil.filterSpecialChars(id));
882
                 };
882
                 };
883
 
883
 
884
-                this.pc_constraints = { optional: [] };
884
+                this.pcConstraints = { optional: [] };
885
 
885
 
886
                 // Allows sending of video to be suspended if the bandwidth
886
                 // Allows sending of video to be suspended if the bandwidth
887
                 // estimation is too low.
887
                 // estimation is too low.
888
                 if (!options.disableSuspendVideo) {
888
                 if (!options.disableSuspendVideo) {
889
-                    this.pc_constraints.optional.push(
889
+                    this.pcConstraints.optional.push(
890
                         { googSuspendBelowMinBitrate: true });
890
                         { googSuspendBelowMinBitrate: true });
891
                 }
891
                 }
892
 
892
 
893
                 if (options.useIPv6) {
893
                 if (options.useIPv6) {
894
                     // https://code.google.com/p/webrtc/issues/detail?id=2828
894
                     // https://code.google.com/p/webrtc/issues/detail?id=2828
895
-                    this.pc_constraints.optional.push({ googIPv6: true });
895
+                    this.pcConstraints.optional.push({ googIPv6: true });
896
                 }
896
                 }
897
 
897
 
898
                 if (!webkitMediaStream.prototype.getVideoTracks) {
898
                 if (!webkitMediaStream.prototype.getVideoTracks) {
942
                             return attachMediaStream(element, stream);
942
                             return attachMediaStream(element, stream);
943
                         });
943
                         });
944
                     this.getStreamID
944
                     this.getStreamID
945
-                        = stream => SDPUtil.filter_special_chars(stream.label);
945
+                        = stream => SDPUtil.filterSpecialChars(stream.label);
946
 
946
 
947
                     onReady(
947
                     onReady(
948
                         options,
948
                         options,
990
 
990
 
991
     /**
991
     /**
992
     * @param {string[]} um required user media types
992
     * @param {string[]} um required user media types
993
-    * @param {function} success_callback
994
-    * @param {Function} failure_callback
993
+    * @param {function} successCallback
994
+    * @param {Function} failureCallback
995
     * @param {Object} [options] optional parameters
995
     * @param {Object} [options] optional parameters
996
     * @param {string} options.resolution
996
     * @param {string} options.resolution
997
     * @param {number} options.bandwidth
997
     * @param {number} options.bandwidth
1002
     **/
1002
     **/
1003
     getUserMediaWithConstraints(
1003
     getUserMediaWithConstraints(
1004
             um,
1004
             um,
1005
-            success_callback,
1006
-            failure_callback,
1005
+            successCallback,
1006
+            failureCallback,
1007
             options = {}) {
1007
             options = {}) {
1008
         const constraints = getConstraints(um, options);
1008
         const constraints = getConstraints(um, options);
1009
 
1009
 
1015
                 stream => {
1015
                 stream => {
1016
                     logger.log('onUserMediaSuccess');
1016
                     logger.log('onUserMediaSuccess');
1017
                     setAvailableDevices(um, stream);
1017
                     setAvailableDevices(um, stream);
1018
-                    success_callback(stream);
1018
+                    successCallback(stream);
1019
                 },
1019
                 },
1020
                 error => {
1020
                 error => {
1021
                     setAvailableDevices(um, undefined);
1021
                     setAvailableDevices(um, undefined);
1022
                     logger.warn('Failed to get access to local media. Error ',
1022
                     logger.warn('Failed to get access to local media. Error ',
1023
                         error, constraints);
1023
                         error, constraints);
1024
 
1024
 
1025
-                    if (failure_callback) {
1026
-                        failure_callback(
1025
+                    if (failureCallback) {
1026
+                        failureCallback(
1027
                             new JitsiTrackError(error, constraints, um));
1027
                             new JitsiTrackError(error, constraints, um));
1028
                     }
1028
                     }
1029
                 });
1029
                 });
1030
         } catch (e) {
1030
         } catch (e) {
1031
             logger.error('GUM failed: ', e);
1031
             logger.error('GUM failed: ', e);
1032
 
1032
 
1033
-            if (failure_callback) {
1034
-                failure_callback(new JitsiTrackError(e, constraints, um));
1033
+            if (failureCallback) {
1034
+                failureCallback(new JitsiTrackError(e, constraints, um));
1035
             }
1035
             }
1036
         }
1036
         }
1037
     }
1037
     }

+ 5
- 5
modules/RTC/TraceablePeerConnection.js Vedi File

23
  * @param {RTC} rtc the instance of <tt>RTC</tt> service
23
  * @param {RTC} rtc the instance of <tt>RTC</tt> service
24
  * @param {number} id the peer connection id assigned by the parent RTC module.
24
  * @param {number} id the peer connection id assigned by the parent RTC module.
25
  * @param {SignalingLayer} signalingLayer the signaling layer instance
25
  * @param {SignalingLayer} signalingLayer the signaling layer instance
26
- * @param {object} ice_config WebRTC 'PeerConnection' ICE config
26
+ * @param {object} iceConfig WebRTC 'PeerConnection' ICE config
27
  * @param {object} constraints WebRTC 'PeerConnection' constraints
27
  * @param {object} constraints WebRTC 'PeerConnection' constraints
28
  * @param {object} options <tt>TracablePeerConnection</tt> config options.
28
  * @param {object} options <tt>TracablePeerConnection</tt> config options.
29
  * @param {boolean} options.disableSimulcast if set to 'true' will disable
29
  * @param {boolean} options.disableSimulcast if set to 'true' will disable
39
  *
39
  *
40
  * @constructor
40
  * @constructor
41
  */
41
  */
42
-function TraceablePeerConnection(rtc, id, signalingLayer, ice_config,
42
+function TraceablePeerConnection(rtc, id, signalingLayer, iceConfig,
43
                                  constraints, options) {
43
                                  constraints, options) {
44
     const self = this;
44
     const self = this;
45
 
45
 
72
     } else {
72
     } else {
73
         RTCPeerConnectionType = webkitRTCPeerConnection;
73
         RTCPeerConnectionType = webkitRTCPeerConnection;
74
     }
74
     }
75
-    this.peerconnection = new RTCPeerConnectionType(ice_config, constraints);
75
+    this.peerconnection = new RTCPeerConnectionType(iceConfig, constraints);
76
     this.updateLog = [];
76
     this.updateLog = [];
77
     this.stats = {};
77
     this.stats = {};
78
     this.statsinterval = null;
78
     this.statsinterval = null;
300
         return;
300
         return;
301
     }
301
     }
302
 
302
 
303
-    let ssrcLines = SDPUtil.find_lines(mediaLines[0], 'a=ssrc:');
303
+    let ssrcLines = SDPUtil.findLines(mediaLines[0], 'a=ssrc:');
304
 
304
 
305
     ssrcLines = ssrcLines.filter(
305
     ssrcLines = ssrcLines.filter(
306
         line => {
306
         line => {
864
             && offer.media && answer.media
864
             && offer.media && answer.media
865
             && offer.media.length === answer.media.length) {
865
             && offer.media.length === answer.media.length) {
866
         answer.media.forEach((a, i) => {
866
         answer.media.forEach((a, i) => {
867
-            if (SDPUtil.find_line(
867
+            if (SDPUtil.findLine(
868
                     offer.media[i],
868
                     offer.media[i],
869
                     'a=setup:actpass',
869
                     'a=setup:actpass',
870
                     offer.session)) {
870
                     offer.session)) {

+ 18
- 18
modules/statistics/CallStats.js Vedi File

130
  * @return a function which invokes f in a try/catch block, logs any exception
130
  * @return a function which invokes f in a try/catch block, logs any exception
131
  * to the console, and then swallows it
131
  * to the console, and then swallows it
132
  */
132
  */
133
-function _try_catch(f) {
133
+function tryCatch(f) {
134
     return function() {
134
     return function() {
135
         try {
135
         try {
136
             f.apply(this, arguments); // eslint-disable-line prefer-rest-params
136
             f.apply(this, arguments); // eslint-disable-line prefer-rest-params
146
  * @param peerConnection {JingleSessionPC} the session object
146
  * @param peerConnection {JingleSessionPC} the session object
147
  * @param options {object} credentials for callstats.
147
  * @param options {object} credentials for callstats.
148
  */
148
  */
149
-const CallStats = _try_catch(function(jingleSession, options) {
149
+const CallStats = tryCatch(function(jingleSession, options) {
150
     try {
150
     try {
151
         CallStats.feedbackEnabled = false;
151
         CallStats.feedbackEnabled = false;
152
         callStats = new callstats($, io, jsSHA); // eslint-disable-line new-cap
152
         callStats = new callstats($, io, jsSHA); // eslint-disable-line new-cap
242
     MST_WITH_USERID: 'mstWithUserID'
242
     MST_WITH_USERID: 'mstWithUserID'
243
 };
243
 };
244
 
244
 
245
-CallStats.prototype.pcCallback = _try_catch((err, msg) => {
245
+CallStats.prototype.pcCallback = tryCatch((err, msg) => {
246
     if (callStats && err !== 'success') {
246
     if (callStats && err !== 'success') {
247
         logger.error(`Monitoring status: ${err} msg: ${msg}`);
247
         logger.error(`Monitoring status: ${err} msg: ${msg}`);
248
     }
248
     }
269
     // 'jitsi' is default remote user ID for now
269
     // 'jitsi' is default remote user ID for now
270
     const callStatsId = isLocal ? this.userID : DEFAULT_REMOTE_USER;
270
     const callStatsId = isLocal ? this.userID : DEFAULT_REMOTE_USER;
271
 
271
 
272
-    _try_catch(function() {
272
+    tryCatch(function() {
273
         logger.debug(
273
         logger.debug(
274
             'Calling callStats.associateMstWithUserID with:',
274
             'Calling callStats.associateMstWithUserID with:',
275
             this.peerconnection,
275
             this.peerconnection,
307
  * @param type {String} "audio"/"video"
307
  * @param type {String} "audio"/"video"
308
  * @param {CallStats} cs callstats instance related to the event
308
  * @param {CallStats} cs callstats instance related to the event
309
  */
309
  */
310
-CallStats.sendMuteEvent = _try_catch((mute, type, cs) => {
310
+CallStats.sendMuteEvent = tryCatch((mute, type, cs) => {
311
     let event;
311
     let event;
312
 
312
 
313
     if (type === 'video') {
313
     if (type === 'video') {
325
  * false for not stopping
325
  * false for not stopping
326
  * @param {CallStats} cs callstats instance related to the event
326
  * @param {CallStats} cs callstats instance related to the event
327
  */
327
  */
328
-CallStats.sendScreenSharingEvent = _try_catch((start, cs) => {
328
+CallStats.sendScreenSharingEvent = tryCatch((start, cs) => {
329
     CallStats._reportEvent.call(
329
     CallStats._reportEvent.call(
330
         cs,
330
         cs,
331
         start ? fabricEvent.screenShareStart : fabricEvent.screenShareStop);
331
         start ? fabricEvent.screenShareStart : fabricEvent.screenShareStop);
335
  * Notifies CallStats that we are the new dominant speaker in the conference.
335
  * Notifies CallStats that we are the new dominant speaker in the conference.
336
  * @param {CallStats} cs callstats instance related to the event
336
  * @param {CallStats} cs callstats instance related to the event
337
  */
337
  */
338
-CallStats.sendDominantSpeakerEvent = _try_catch(cs => {
338
+CallStats.sendDominantSpeakerEvent = tryCatch(cs => {
339
     CallStats._reportEvent.call(cs, fabricEvent.dominantSpeaker);
339
     CallStats._reportEvent.call(cs, fabricEvent.dominantSpeaker);
340
 });
340
 });
341
 
341
 
344
  * @param {{deviceList: {String:String}}} list of devices with their data
344
  * @param {{deviceList: {String:String}}} list of devices with their data
345
  * @param {CallStats} cs callstats instance related to the event
345
  * @param {CallStats} cs callstats instance related to the event
346
  */
346
  */
347
-CallStats.sendActiveDeviceListEvent = _try_catch((devicesData, cs) => {
347
+CallStats.sendActiveDeviceListEvent = tryCatch((devicesData, cs) => {
348
     CallStats._reportEvent.call(cs, fabricEvent.activeDeviceList, devicesData);
348
     CallStats._reportEvent.call(cs, fabricEvent.activeDeviceList, devicesData);
349
 });
349
 });
350
 
350
 
374
 /**
374
 /**
375
  * Notifies CallStats for connection setup errors
375
  * Notifies CallStats for connection setup errors
376
  */
376
  */
377
-CallStats.prototype.sendTerminateEvent = _try_catch(function() {
377
+CallStats.prototype.sendTerminateEvent = tryCatch(function() {
378
     if (!CallStats.initialized) {
378
     if (!CallStats.initialized) {
379
         return;
379
         return;
380
     }
380
     }
387
  * @param {RTCPeerConnection} pc connection on which failure occured.
387
  * @param {RTCPeerConnection} pc connection on which failure occured.
388
  * @param {CallStats} cs callstats instance related to the error (optional)
388
  * @param {CallStats} cs callstats instance related to the error (optional)
389
  */
389
  */
390
-CallStats.prototype.sendIceConnectionFailedEvent = _try_catch((pc, cs) => {
390
+CallStats.prototype.sendIceConnectionFailedEvent = tryCatch((pc, cs) => {
391
     CallStats._reportError.call(
391
     CallStats._reportError.call(
392
         cs, wrtcFuncNames.iceConnectionFailure, null, pc);
392
         cs, wrtcFuncNames.iceConnectionFailure, null, pc);
393
 });
393
 });
399
  * user feedback
399
  * user feedback
400
  * @param detailedFeedback detailed feedback from the user. Not yet used
400
  * @param detailedFeedback detailed feedback from the user. Not yet used
401
  */
401
  */
402
-CallStats.prototype.sendFeedback = _try_catch(
402
+CallStats.prototype.sendFeedback = tryCatch(
403
 function(overallFeedback, detailedFeedback) {
403
 function(overallFeedback, detailedFeedback) {
404
     if (!CallStats.feedbackEnabled) {
404
     if (!CallStats.feedbackEnabled) {
405
         return;
405
         return;
450
  * @param {Error} e error to send
450
  * @param {Error} e error to send
451
  * @param {CallStats} cs callstats instance related to the error (optional)
451
  * @param {CallStats} cs callstats instance related to the error (optional)
452
  */
452
  */
453
-CallStats.sendGetUserMediaFailed = _try_catch((e, cs) => {
453
+CallStats.sendGetUserMediaFailed = tryCatch((e, cs) => {
454
     CallStats._reportError.call(cs, wrtcFuncNames.getUserMedia, e, null);
454
     CallStats._reportError.call(cs, wrtcFuncNames.getUserMedia, e, null);
455
 });
455
 });
456
 
456
 
461
  * @param {RTCPeerConnection} pc connection on which failure occured.
461
  * @param {RTCPeerConnection} pc connection on which failure occured.
462
  * @param {CallStats} cs callstats instance related to the error (optional)
462
  * @param {CallStats} cs callstats instance related to the error (optional)
463
  */
463
  */
464
-CallStats.sendCreateOfferFailed = _try_catch((e, pc, cs) => {
464
+CallStats.sendCreateOfferFailed = tryCatch((e, pc, cs) => {
465
     CallStats._reportError.call(cs, wrtcFuncNames.createOffer, e, pc);
465
     CallStats._reportError.call(cs, wrtcFuncNames.createOffer, e, pc);
466
 });
466
 });
467
 
467
 
472
  * @param {RTCPeerConnection} pc connection on which failure occured.
472
  * @param {RTCPeerConnection} pc connection on which failure occured.
473
  * @param {CallStats} cs callstats instance related to the error (optional)
473
  * @param {CallStats} cs callstats instance related to the error (optional)
474
  */
474
  */
475
-CallStats.sendCreateAnswerFailed = _try_catch((e, pc, cs) => {
475
+CallStats.sendCreateAnswerFailed = tryCatch((e, pc, cs) => {
476
     CallStats._reportError.call(cs, wrtcFuncNames.createAnswer, e, pc);
476
     CallStats._reportError.call(cs, wrtcFuncNames.createAnswer, e, pc);
477
 });
477
 });
478
 
478
 
483
  * @param {RTCPeerConnection} pc connection on which failure occured.
483
  * @param {RTCPeerConnection} pc connection on which failure occured.
484
  * @param {CallStats} cs callstats instance related to the error (optional)
484
  * @param {CallStats} cs callstats instance related to the error (optional)
485
  */
485
  */
486
-CallStats.sendSetLocalDescFailed = _try_catch((e, pc, cs) => {
486
+CallStats.sendSetLocalDescFailed = tryCatch((e, pc, cs) => {
487
     CallStats._reportError.call(cs, wrtcFuncNames.setLocalDescription, e, pc);
487
     CallStats._reportError.call(cs, wrtcFuncNames.setLocalDescription, e, pc);
488
 });
488
 });
489
 
489
 
494
  * @param {RTCPeerConnection} pc connection on which failure occured.
494
  * @param {RTCPeerConnection} pc connection on which failure occured.
495
  * @param {CallStats} cs callstats instance related to the error (optional)
495
  * @param {CallStats} cs callstats instance related to the error (optional)
496
  */
496
  */
497
-CallStats.sendSetRemoteDescFailed = _try_catch((e, pc, cs) => {
497
+CallStats.sendSetRemoteDescFailed = tryCatch((e, pc, cs) => {
498
     CallStats._reportError.call(cs, wrtcFuncNames.setRemoteDescription, e, pc);
498
     CallStats._reportError.call(cs, wrtcFuncNames.setRemoteDescription, e, pc);
499
 });
499
 });
500
 
500
 
505
  * @param {RTCPeerConnection} pc connection on which failure occured.
505
  * @param {RTCPeerConnection} pc connection on which failure occured.
506
  * @param {CallStats} cs callstats instance related to the error (optional)
506
  * @param {CallStats} cs callstats instance related to the error (optional)
507
  */
507
  */
508
-CallStats.sendAddIceCandidateFailed = _try_catch((e, pc, cs) => {
508
+CallStats.sendAddIceCandidateFailed = tryCatch((e, pc, cs) => {
509
     CallStats._reportError.call(cs, wrtcFuncNames.addIceCandidate, e, pc);
509
     CallStats._reportError.call(cs, wrtcFuncNames.addIceCandidate, e, pc);
510
 });
510
 });
511
 
511
 
515
  * @param {Error} e error to send or {String} message
515
  * @param {Error} e error to send or {String} message
516
  * @param {CallStats} cs callstats instance related to the error (optional)
516
  * @param {CallStats} cs callstats instance related to the error (optional)
517
  */
517
  */
518
-CallStats.sendApplicationLog = _try_catch((e, cs) => {
518
+CallStats.sendApplicationLog = tryCatch((e, cs) => {
519
     CallStats._reportError.call(cs, wrtcFuncNames.applicationLog, e, null);
519
     CallStats._reportError.call(cs, wrtcFuncNames.applicationLog, e, null);
520
 });
520
 });
521
 
521
 

+ 6
- 6
modules/xmpp/JingleSession.js Vedi File

17
      * @param {string} localJid our JID
17
      * @param {string} localJid our JID
18
      * @param {string} peerjid the JID of the remote peer
18
      * @param {string} peerjid the JID of the remote peer
19
      * @param {Strophe.Connection} connection the XMPP connection
19
      * @param {Strophe.Connection} connection the XMPP connection
20
-     * @param {Object} media_constraints the media constraints object passed to
20
+     * @param {Object} mediaConstraints the media constraints object passed to
21
      * the PeerConnection onCreateAnswer/Offer as defined by the WebRTC.
21
      * the PeerConnection onCreateAnswer/Offer as defined by the WebRTC.
22
-     * @param {Object} ice_config the ICE servers config object as defined by
22
+     * @param {Object} iceConfig the ICE servers config object as defined by
23
      * the WebRTC. Passed to the PeerConnection's constructor.
23
      * the WebRTC. Passed to the PeerConnection's constructor.
24
      */
24
      */
25
     constructor(sid,
25
     constructor(sid,
26
-                localJid, peerjid, connection, media_constraints, ice_config) {
26
+                localJid, peerjid, connection, mediaConstraints, iceConfig) {
27
         this.sid = sid;
27
         this.sid = sid;
28
         this.localJid = localJid;
28
         this.localJid = localJid;
29
         this.peerjid = peerjid;
29
         this.peerjid = peerjid;
30
         this.connection = connection;
30
         this.connection = connection;
31
-        this.media_constraints = media_constraints;
32
-        this.ice_config = ice_config;
31
+        this.mediaConstraints = mediaConstraints;
32
+        this.iceConfig = iceConfig;
33
 
33
 
34
         /**
34
         /**
35
          * Whether to use dripping or not. Dripping is sending trickle
35
          * Whether to use dripping or not. Dripping is sending trickle
40
         /**
40
         /**
41
          *  When dripping is used, stores ICE candidates which are to be sent.
41
          *  When dripping is used, stores ICE candidates which are to be sent.
42
          */
42
          */
43
-        this.drip_container = [];
43
+        this.dripContainer = [];
44
 
44
 
45
         /**
45
         /**
46
          * The chat room instance associated with the session.
46
          * The chat room instance associated with the session.

+ 26
- 26
modules/xmpp/JingleSessionPC.js Vedi File

32
      * @param {string} peerjid remote peer JID
32
      * @param {string} peerjid remote peer JID
33
      * @param {Strophe.Connection} connection Strophe XMPP connection instance
33
      * @param {Strophe.Connection} connection Strophe XMPP connection instance
34
      * used to send packets.
34
      * used to send packets.
35
-     * @param media_constraints the media constraints object passed to
35
+     * @param mediaConstraints the media constraints object passed to
36
      * createOffer/Answer, as defined by the WebRTC standard
36
      * createOffer/Answer, as defined by the WebRTC standard
37
-     * @param ice_config the ICE servers config object as defined by the WebRTC
37
+     * @param iceConfig the ICE servers config object as defined by the WebRTC
38
      * standard.
38
      * standard.
39
      * @param {object} options a set of config options
39
      * @param {object} options a set of config options
40
      * @param {boolean} options.webrtcIceUdpDisable <tt>true</tt> to block UDP
40
      * @param {boolean} options.webrtcIceUdpDisable <tt>true</tt> to block UDP
49
      * @implements {SignalingLayer}
49
      * @implements {SignalingLayer}
50
      */
50
      */
51
     constructor(sid, me, peerjid, connection,
51
     constructor(sid, me, peerjid, connection,
52
-                media_constraints, ice_config, options) {
53
-        super(sid, me, peerjid, connection, media_constraints, ice_config);
52
+                mediaConstraints, iceConfig, options) {
53
+        super(sid, me, peerjid, connection, mediaConstraints, iceConfig);
54
 
54
 
55
         this.lasticecandidate = false;
55
         this.lasticecandidate = false;
56
         this.closed = false;
56
         this.closed = false;
111
         this.peerconnection
111
         this.peerconnection
112
             = this.rtc.createPeerConnection(
112
             = this.rtc.createPeerConnection(
113
                 this,
113
                 this,
114
-                this.connection.jingle.ice_config,
114
+                this.connection.jingle.iceConfig,
115
 
115
 
116
                 /* Options */
116
                 /* Options */
117
                 {
117
                 {
254
             ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
254
             ice.xmlns = 'urn:xmpp:jingle:transports:ice-udp:1';
255
 
255
 
256
             if (this.usedrip) {
256
             if (this.usedrip) {
257
-                if (this.drip_container.length === 0) {
257
+                if (this.dripContainer.length === 0) {
258
                     // start 20ms callout
258
                     // start 20ms callout
259
                     setTimeout(() => {
259
                     setTimeout(() => {
260
-                        if (this.drip_container.length === 0) {
260
+                        if (this.dripContainer.length === 0) {
261
                             return;
261
                             return;
262
                         }
262
                         }
263
-                        this.sendIceCandidates(this.drip_container);
264
-                        this.drip_container = [];
263
+                        this.sendIceCandidates(this.dripContainer);
264
+                        this.dripContainer = [];
265
                     }, 20);
265
                     }, 20);
266
                 }
266
                 }
267
-                this.drip_container.push(candidate);
267
+                this.dripContainer.push(candidate);
268
             } else {
268
             } else {
269
                 this.sendIceCandidates([ candidate ]);
269
                 this.sendIceCandidates([ candidate ]);
270
             }
270
             }
290
         for (let mid = 0; mid < localSDP.media.length; mid++) {
290
         for (let mid = 0; mid < localSDP.media.length; mid++) {
291
             const cands = candidates.filter(el => el.sdpMLineIndex === mid);
291
             const cands = candidates.filter(el => el.sdpMLineIndex === mid);
292
             const mline
292
             const mline
293
-                = SDPUtil.parse_mline(localSDP.media[mid].split('\r\n')[0]);
293
+                = SDPUtil.parseMLine(localSDP.media[mid].split('\r\n')[0]);
294
 
294
 
295
             if (cands.length > 0) {
295
             if (cands.length > 0) {
296
                 const ice
296
                 const ice
315
                 }
315
                 }
316
 
316
 
317
                 // add fingerprint
317
                 // add fingerprint
318
-                const fingerprint_line
319
-                    = SDPUtil.find_line(
318
+                const fingerprintLine
319
+                    = SDPUtil.findLine(
320
                         localSDP.media[mid],
320
                         localSDP.media[mid],
321
                         'a=fingerprint:', localSDP.session);
321
                         'a=fingerprint:', localSDP.session);
322
 
322
 
323
-                if (fingerprint_line) {
324
-                    const tmp = SDPUtil.parse_fingerprint(fingerprint_line);
323
+                if (fingerprintLine) {
324
+                    const tmp = SDPUtil.parseFingerprint(fingerprintLine);
325
 
325
 
326
                     tmp.required = true;
326
                     tmp.required = true;
327
                     cand.c(
327
                     cand.c(
569
             });
569
             });
570
 
570
 
571
         localSDP.media.forEach((medialines, idx) => {
571
         localSDP.media.forEach((medialines, idx) => {
572
-            const mline = SDPUtil.parse_mline(medialines.split('\r\n')[0]);
572
+            const mline = SDPUtil.parseMLine(medialines.split('\r\n')[0]);
573
 
573
 
574
             transportAccept.c('content',
574
             transportAccept.c('content',
575
                 {
575
                 {
730
                 });
730
                 });
731
             });
731
             });
732
             currentRemoteSdp.media.forEach((media, idx) => {
732
             currentRemoteSdp.media.forEach((media, idx) => {
733
-                if (!SDPUtil.find_line(media, `a=mid:${name}`)) {
733
+                if (!SDPUtil.findLine(media, `a=mid:${name}`)) {
734
                     return;
734
                     return;
735
                 }
735
                 }
736
                 if (!addSsrcInfo[idx]) {
736
                 if (!addSsrcInfo[idx]) {
927
      *  rejects with an error {string}
927
      *  rejects with an error {string}
928
      */
928
      */
929
     _renegotiate(optionalRemoteSdp) {
929
     _renegotiate(optionalRemoteSdp) {
930
-        const media_constraints = this.media_constraints;
930
+        const mediaConstraints = this.mediaConstraints;
931
         const remoteSdp
931
         const remoteSdp
932
             = optionalRemoteSdp
932
             = optionalRemoteSdp
933
                 || new SDP(this.peerconnection.remoteDescription.sdp);
933
                 || new SDP(this.peerconnection.remoteDescription.sdp);
989
                             );
989
                             );
990
                         },
990
                         },
991
                         error => reject(`createAnswer failed: ${error}`),
991
                         error => reject(`createAnswer failed: ${error}`),
992
-                        media_constraints
992
+                        mediaConstraints
993
                     );
993
                     );
994
                 },
994
                 },
995
                 error => {
995
                 error => {
1126
                 ssrcs.push(ssrc);
1126
                 ssrcs.push(ssrc);
1127
             });
1127
             });
1128
             currentRemoteSdp.media.forEach((media, idx) => {
1128
             currentRemoteSdp.media.forEach((media, idx) => {
1129
-                if (!SDPUtil.find_line(media, `a=mid:${name}`)) {
1129
+                if (!SDPUtil.findLine(media, `a=mid:${name}`)) {
1130
                     return;
1130
                     return;
1131
                 }
1131
                 }
1132
                 if (!removeSsrcInfo[idx]) {
1132
                 if (!removeSsrcInfo[idx]) {
1134
                 }
1134
                 }
1135
                 ssrcs.forEach(ssrc => {
1135
                 ssrcs.forEach(ssrc => {
1136
                     const ssrcLines
1136
                     const ssrcLines
1137
-                        = SDPUtil.find_lines(media, `a=ssrc:${ssrc}`);
1137
+                        = SDPUtil.findLines(media, `a=ssrc:${ssrc}`);
1138
 
1138
 
1139
                     if (ssrcLines.length) {
1139
                     if (ssrcLines.length) {
1140
                         removeSsrcInfo[idx] += `${ssrcLines.join('\r\n')}\r\n`;
1140
                         removeSsrcInfo[idx] += `${ssrcLines.join('\r\n')}\r\n`;
1341
 
1341
 
1342
     /**
1342
     /**
1343
      * Figures out added/removed ssrcs and send update IQs.
1343
      * Figures out added/removed ssrcs and send update IQs.
1344
-     * @param old_sdp SDP object for old description.
1345
-     * @param new_sdp SDP object for new description.
1344
+     * @param oldSDP SDP object for old description.
1345
+     * @param newSDP SDP object for new description.
1346
      */
1346
      */
1347
-    notifyMySSRCUpdate(old_sdp, new_sdp) {
1347
+    notifyMySSRCUpdate(oldSDP, newSDP) {
1348
 
1348
 
1349
         if (this.state !== JingleSessionState.ACTIVE) {
1349
         if (this.state !== JingleSessionState.ACTIVE) {
1350
             logger.warn(`Skipping SSRC update in '${this.state} ' state.`);
1350
             logger.warn(`Skipping SSRC update in '${this.state} ' state.`);
1353
         }
1353
         }
1354
 
1354
 
1355
         // send source-remove IQ.
1355
         // send source-remove IQ.
1356
-        let sdpDiffer = new SDPDiffer(new_sdp, old_sdp);
1356
+        let sdpDiffer = new SDPDiffer(newSDP, oldSDP);
1357
         const remove = $iq({ to: this.peerjid,
1357
         const remove = $iq({ to: this.peerjid,
1358
             type: 'set' })
1358
             type: 'set' })
1359
             .c('jingle', {
1359
             .c('jingle', {
1380
         }
1380
         }
1381
 
1381
 
1382
         // send source-add IQ.
1382
         // send source-add IQ.
1383
-        sdpDiffer = new SDPDiffer(old_sdp, new_sdp);
1383
+        sdpDiffer = new SDPDiffer(oldSDP, newSDP);
1384
         const add = $iq({ to: this.peerjid,
1384
         const add = $iq({ to: this.peerjid,
1385
             type: 'set' })
1385
             type: 'set' })
1386
             .c('jingle', {
1386
             .c('jingle', {

+ 54
- 54
modules/xmpp/SDP.js Vedi File

7
     const media = sdp.split('\r\nm=');
7
     const media = sdp.split('\r\nm=');
8
 
8
 
9
     for (let i = 1, length = media.length; i < length; i++) {
9
     for (let i = 1, length = media.length; i < length; i++) {
10
-        let media_i = `m=${media[i]}`;
10
+        let mediaI = `m=${media[i]}`;
11
 
11
 
12
         if (i !== length - 1) {
12
         if (i !== length - 1) {
13
-            media_i += '\r\n';
13
+            mediaI += '\r\n';
14
         }
14
         }
15
-        media[i] = media_i;
15
+        media[i] = mediaI;
16
     }
16
     }
17
     const session = `${media.shift()}\r\n`;
17
     const session = `${media.shift()}\r\n`;
18
 
18
 
46
  */
46
  */
47
 SDP.prototype.getMediaSsrcMap = function() {
47
 SDP.prototype.getMediaSsrcMap = function() {
48
     const self = this;
48
     const self = this;
49
-    const media_ssrcs = {};
49
+    const mediaSSRCs = {};
50
     let tmp;
50
     let tmp;
51
 
51
 
52
     for (let mediaindex = 0; mediaindex < self.media.length; mediaindex++) {
52
     for (let mediaindex = 0; mediaindex < self.media.length; mediaindex++) {
53
-        tmp = SDPUtil.find_lines(self.media[mediaindex], 'a=ssrc:');
53
+        tmp = SDPUtil.findLines(self.media[mediaindex], 'a=ssrc:');
54
         const mid
54
         const mid
55
-            = SDPUtil.parse_mid(
56
-                SDPUtil.find_line(self.media[mediaindex],
55
+            = SDPUtil.parseMID(
56
+                SDPUtil.findLine(self.media[mediaindex],
57
                 'a=mid:'));
57
                 'a=mid:'));
58
         const media = {
58
         const media = {
59
             mediaindex,
59
             mediaindex,
62
             ssrcGroups: []
62
             ssrcGroups: []
63
         };
63
         };
64
 
64
 
65
-        media_ssrcs[mediaindex] = media;
65
+        mediaSSRCs[mediaindex] = media;
66
         tmp.forEach(line => {
66
         tmp.forEach(line => {
67
             const linessrc = line.substring(7).split(' ')[0];
67
             const linessrc = line.substring(7).split(' ')[0];
68
 
68
 
76
             }
76
             }
77
             media.ssrcs[linessrc].lines.push(line);
77
             media.ssrcs[linessrc].lines.push(line);
78
         });
78
         });
79
-        tmp = SDPUtil.find_lines(self.media[mediaindex], 'a=ssrc-group:');
79
+        tmp = SDPUtil.findLines(self.media[mediaindex], 'a=ssrc-group:');
80
         tmp.forEach(line => {
80
         tmp.forEach(line => {
81
             const idx = line.indexOf(' ');
81
             const idx = line.indexOf(' ');
82
             const semantics = line.substr(0, idx).substr(13);
82
             const semantics = line.substr(0, idx).substr(13);
91
         });
91
         });
92
     }
92
     }
93
 
93
 
94
-    return media_ssrcs;
94
+    return mediaSSRCs;
95
 };
95
 };
96
 
96
 
97
 /**
97
 /**
123
     for (i = 0; i < this.media.length; i++) {
123
     for (i = 0; i < this.media.length; i++) {
124
         lines = this.media[i].split('\r\n');
124
         lines = this.media[i].split('\r\n');
125
         lines.pop(); // remove empty last element
125
         lines.pop(); // remove empty last element
126
-        mline = SDPUtil.parse_mline(lines.shift());
126
+        mline = SDPUtil.parseMLine(lines.shift());
127
         if (mline.media !== 'audio') {
127
         if (mline.media !== 'audio') {
128
             continue; // eslint-disable-line no-continue
128
             continue; // eslint-disable-line no-continue
129
         }
129
         }
131
         mline.fmt.length = 0;
131
         mline.fmt.length = 0;
132
         for (j = 0; j < lines.length; j++) {
132
         for (j = 0; j < lines.length; j++) {
133
             if (lines[j].substr(0, 9) === 'a=rtpmap:') {
133
             if (lines[j].substr(0, 9) === 'a=rtpmap:') {
134
-                rtpmap = SDPUtil.parse_rtpmap(lines[j]);
134
+                rtpmap = SDPUtil.parseRTPMap(lines[j]);
135
                 if (rtpmap.name === 'CN' || rtpmap.name === 'ISAC') {
135
                 if (rtpmap.name === 'CN' || rtpmap.name === 'ISAC') {
136
                     continue; // eslint-disable-line no-continue
136
                     continue; // eslint-disable-line no-continue
137
                 }
137
                 }
139
             }
139
             }
140
             newdesc += `${lines[j]}\r\n`;
140
             newdesc += `${lines[j]}\r\n`;
141
         }
141
         }
142
-        this.media[i] = `${SDPUtil.build_mline(mline)}\r\n${newdesc}`;
142
+        this.media[i] = `${SDPUtil.buildMLine(mline)}\r\n${newdesc}`;
143
     }
143
     }
144
     this.raw = this.session + this.media.join('');
144
     this.raw = this.session + this.media.join('');
145
 };
145
 };
147
 // remove lines matching prefix from session section
147
 // remove lines matching prefix from session section
148
 SDP.prototype.removeSessionLines = function(prefix) {
148
 SDP.prototype.removeSessionLines = function(prefix) {
149
     const self = this;
149
     const self = this;
150
-    const lines = SDPUtil.find_lines(this.session, prefix);
150
+    const lines = SDPUtil.findLines(this.session, prefix);
151
 
151
 
152
     lines.forEach(line => {
152
     lines.forEach(line => {
153
         self.session = self.session.replace(`${line}\r\n`, '');
153
         self.session = self.session.replace(`${line}\r\n`, '');
161
 // TODO: non-numeric mediaindex could match mid
161
 // TODO: non-numeric mediaindex could match mid
162
 SDP.prototype.removeMediaLines = function(mediaindex, prefix) {
162
 SDP.prototype.removeMediaLines = function(mediaindex, prefix) {
163
     const self = this;
163
     const self = this;
164
-    const lines = SDPUtil.find_lines(this.media[mediaindex], prefix);
164
+    const lines = SDPUtil.findLines(this.media[mediaindex], prefix);
165
 
165
 
166
     lines.forEach(line => {
166
     lines.forEach(line => {
167
         self.media[mediaindex]
167
         self.media[mediaindex]
178
 
178
 
179
     // new bundle plan
179
     // new bundle plan
180
 
180
 
181
-    lines = SDPUtil.find_lines(this.session, 'a=group:');
181
+    lines = SDPUtil.findLines(this.session, 'a=group:');
182
     if (lines.length) {
182
     if (lines.length) {
183
         for (i = 0; i < lines.length; i++) {
183
         for (i = 0; i < lines.length; i++) {
184
             tmp = lines[i].split(' ');
184
             tmp = lines[i].split(' ');
193
         }
193
         }
194
     }
194
     }
195
     for (i = 0; i < this.media.length; i++) {
195
     for (i = 0; i < this.media.length; i++) {
196
-        mline = SDPUtil.parse_mline(this.media[i].split('\r\n')[0]);
196
+        mline = SDPUtil.parseMLine(this.media[i].split('\r\n')[0]);
197
         if (!(mline.media === 'audio'
197
         if (!(mline.media === 'audio'
198
               || mline.media === 'video'
198
               || mline.media === 'video'
199
               || mline.media === 'application')) {
199
               || mline.media === 'application')) {
200
             continue; // eslint-disable-line no-continue
200
             continue; // eslint-disable-line no-continue
201
         }
201
         }
202
-        const assrcline = SDPUtil.find_line(this.media[i], 'a=ssrc:');
202
+        const assrcline = SDPUtil.findLine(this.media[i], 'a=ssrc:');
203
 
203
 
204
         if (assrcline) {
204
         if (assrcline) {
205
             ssrc = assrcline.substring(7).split(' ')[0]; // take the first
205
             ssrc = assrcline.substring(7).split(' ')[0]; // take the first
209
 
209
 
210
         elem.c('content', { creator: thecreator,
210
         elem.c('content', { creator: thecreator,
211
             name: mline.media });
211
             name: mline.media });
212
-        const amidline = SDPUtil.find_line(this.media[i], 'a=mid:');
212
+        const amidline = SDPUtil.findLine(this.media[i], 'a=mid:');
213
 
213
 
214
         if (amidline) {
214
         if (amidline) {
215
             // prefer identifier from a=mid if present
215
             // prefer identifier from a=mid if present
216
-            const mid = SDPUtil.parse_mid(amidline);
216
+            const mid = SDPUtil.parseMID(amidline);
217
 
217
 
218
             elem.attrs({ name: mid });
218
             elem.attrs({ name: mid });
219
         }
219
         }
220
 
220
 
221
-        if (SDPUtil.find_line(this.media[i], 'a=rtpmap:').length) {
221
+        if (SDPUtil.findLine(this.media[i], 'a=rtpmap:').length) {
222
             elem.c('description',
222
             elem.c('description',
223
                 { xmlns: 'urn:xmpp:jingle:apps:rtp:1',
223
                 { xmlns: 'urn:xmpp:jingle:apps:rtp:1',
224
                     media: mline.media });
224
                     media: mline.media });
227
             }
227
             }
228
             for (j = 0; j < mline.fmt.length; j++) {
228
             for (j = 0; j < mline.fmt.length; j++) {
229
                 rtpmap
229
                 rtpmap
230
-                    = SDPUtil.find_line(
230
+                    = SDPUtil.findLine(
231
                         this.media[i],
231
                         this.media[i],
232
                         `a=rtpmap:${mline.fmt[j]}`);
232
                         `a=rtpmap:${mline.fmt[j]}`);
233
-                elem.c('payload-type', SDPUtil.parse_rtpmap(rtpmap));
233
+                elem.c('payload-type', SDPUtil.parseRTPMap(rtpmap));
234
 
234
 
235
                 // put any 'a=fmtp:' + mline.fmt[j] lines into <param name=foo
235
                 // put any 'a=fmtp:' + mline.fmt[j] lines into <param name=foo
236
                 // value=bar/>
236
                 // value=bar/>
237
                 const afmtpline
237
                 const afmtpline
238
-                    = SDPUtil.find_line(
238
+                    = SDPUtil.findLine(
239
                         this.media[i],
239
                         this.media[i],
240
                         `a=fmtp:${mline.fmt[j]}`);
240
                         `a=fmtp:${mline.fmt[j]}`);
241
 
241
 
242
                 if (afmtpline) {
242
                 if (afmtpline) {
243
-                    tmp = SDPUtil.parse_fmtp(afmtpline);
243
+                    tmp = SDPUtil.parseFmtp(afmtpline);
244
                     for (k = 0; k < tmp.length; k++) {
244
                     for (k = 0; k < tmp.length; k++) {
245
                         elem.c('parameter', tmp[k]).up();
245
                         elem.c('parameter', tmp[k]).up();
246
                     }
246
                     }
252
                 elem.up();
252
                 elem.up();
253
             }
253
             }
254
             const crypto
254
             const crypto
255
-                = SDPUtil.find_lines(this.media[i], 'a=crypto:', this.session);
255
+                = SDPUtil.findLines(this.media[i], 'a=crypto:', this.session);
256
 
256
 
257
             if (crypto.length) {
257
             if (crypto.length) {
258
                 elem.c('encryption', { required: 1 });
258
                 elem.c('encryption', { required: 1 });
259
                 crypto.forEach(
259
                 crypto.forEach(
260
-                    line => elem.c('crypto', SDPUtil.parse_crypto(line)).up());
260
+                    line => elem.c('crypto', SDPUtil.parseCrypto(line)).up());
261
                 elem.up(); // end of encryption
261
                 elem.up(); // end of encryption
262
             }
262
             }
263
 
263
 
267
                     xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
267
                     xmlns: 'urn:xmpp:jingle:apps:rtp:ssma:0' });
268
 
268
 
269
                 // FIXME: group by ssrc and support multiple different ssrcs
269
                 // FIXME: group by ssrc and support multiple different ssrcs
270
-                const ssrclines = SDPUtil.find_lines(this.media[i], 'a=ssrc:');
270
+                const ssrclines = SDPUtil.findLines(this.media[i], 'a=ssrc:');
271
 
271
 
272
                 if (ssrclines.length > 0) {
272
                 if (ssrclines.length > 0) {
273
                     // eslint-disable-next-line no-loop-func
273
                     // eslint-disable-next-line no-loop-func
293
 
293
 
294
                             let v = kv.split(':', 2)[1];
294
                             let v = kv.split(':', 2)[1];
295
 
295
 
296
-                            v = SDPUtil.filter_special_chars(v);
296
+                            v = SDPUtil.filterSpecialChars(v);
297
                             elem.attrs({ value: v });
297
                             elem.attrs({ value: v });
298
                         }
298
                         }
299
                         elem.up();
299
                         elem.up();
323
                         msid = localTrack.getTrackId();
323
                         msid = localTrack.getTrackId();
324
                     }
324
                     }
325
                     if (msid !== null) {
325
                     if (msid !== null) {
326
-                        msid = SDPUtil.filter_special_chars(msid);
326
+                        msid = SDPUtil.filterSpecialChars(msid);
327
                         elem.c('parameter');
327
                         elem.c('parameter');
328
                         elem.attrs({ name: 'msid',
328
                         elem.attrs({ name: 'msid',
329
                             value: msid });
329
                             value: msid });
341
                 elem.up();
341
                 elem.up();
342
 
342
 
343
                 // XEP-0339 handle ssrc-group attributes
343
                 // XEP-0339 handle ssrc-group attributes
344
-                const ssrc_group_lines
345
-                    = SDPUtil.find_lines(this.media[i], 'a=ssrc-group:');
344
+                const ssrcGroupLines
345
+                    = SDPUtil.findLines(this.media[i], 'a=ssrc-group:');
346
 
346
 
347
-                ssrc_group_lines.forEach(line => {
347
+                ssrcGroupLines.forEach(line => {
348
                     const idx = line.indexOf(' ');
348
                     const idx = line.indexOf(' ');
349
                     const semantics = line.substr(0, idx).substr(13);
349
                     const semantics = line.substr(0, idx).substr(13);
350
                     const ssrcs = line.substr(14 + semantics.length).split(' ');
350
                     const ssrcs = line.substr(14 + semantics.length).split(' ');
358
                 });
358
                 });
359
             }
359
             }
360
 
360
 
361
-            if (SDPUtil.find_line(this.media[i], 'a=rtcp-mux')) {
361
+            if (SDPUtil.findLine(this.media[i], 'a=rtcp-mux')) {
362
                 elem.c('rtcp-mux').up();
362
                 elem.c('rtcp-mux').up();
363
             }
363
             }
364
 
364
 
366
             this.rtcpFbToJingle(i, elem, '*');
366
             this.rtcpFbToJingle(i, elem, '*');
367
 
367
 
368
             // XEP-0294
368
             // XEP-0294
369
-            lines = SDPUtil.find_lines(this.media[i], 'a=extmap:');
369
+            lines = SDPUtil.findLines(this.media[i], 'a=extmap:');
370
             if (lines.length) {
370
             if (lines.length) {
371
                 for (j = 0; j < lines.length; j++) {
371
                 for (j = 0; j < lines.length; j++) {
372
-                    tmp = SDPUtil.parse_extmap(lines[j]);
372
+                    tmp = SDPUtil.parseExtmap(lines[j]);
373
                     elem.c('rtp-hdrext', {
373
                     elem.c('rtp-hdrext', {
374
                         xmlns: 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0',
374
                         xmlns: 'urn:xmpp:jingle:apps:rtp:rtp-hdrext:0',
375
                         uri: tmp.uri,
375
                         uri: tmp.uri,
404
 
404
 
405
         const m = this.media[i];
405
         const m = this.media[i];
406
 
406
 
407
-        if (SDPUtil.find_line(m, 'a=sendrecv', this.session)) {
407
+        if (SDPUtil.findLine(m, 'a=sendrecv', this.session)) {
408
             elem.attrs({ senders: 'both' });
408
             elem.attrs({ senders: 'both' });
409
-        } else if (SDPUtil.find_line(m, 'a=sendonly', this.session)) {
409
+        } else if (SDPUtil.findLine(m, 'a=sendonly', this.session)) {
410
             elem.attrs({ senders: 'initiator' });
410
             elem.attrs({ senders: 'initiator' });
411
-        } else if (SDPUtil.find_line(m, 'a=recvonly', this.session)) {
411
+        } else if (SDPUtil.findLine(m, 'a=recvonly', this.session)) {
412
             elem.attrs({ senders: 'responder' });
412
             elem.attrs({ senders: 'responder' });
413
-        } else if (SDPUtil.find_line(m, 'a=inactive', this.session)) {
413
+        } else if (SDPUtil.findLine(m, 'a=inactive', this.session)) {
414
             elem.attrs({ senders: 'none' });
414
             elem.attrs({ senders: 'none' });
415
         }
415
         }
416
         if (mline.port === '0') {
416
         if (mline.port === '0') {
432
 
432
 
433
     // XEP-0343 DTLS/SCTP
433
     // XEP-0343 DTLS/SCTP
434
     const sctpmap
434
     const sctpmap
435
-        = SDPUtil.find_line(this.media[mediaindex], 'a=sctpmap:', self.session);
435
+        = SDPUtil.findLine(this.media[mediaindex], 'a=sctpmap:', self.session);
436
 
436
 
437
     if (sctpmap) {
437
     if (sctpmap) {
438
-        const sctpAttrs = SDPUtil.parse_sctpmap(sctpmap);
438
+        const sctpAttrs = SDPUtil.parseSCTPMap(sctpmap);
439
 
439
 
440
         elem.c('sctpmap', {
440
         elem.c('sctpmap', {
441
             xmlns: 'urn:xmpp:jingle:transports:dtls-sctp:1',
441
             xmlns: 'urn:xmpp:jingle:transports:dtls-sctp:1',
452
 
452
 
453
     // XEP-0320
453
     // XEP-0320
454
     const fingerprints
454
     const fingerprints
455
-        = SDPUtil.find_lines(
455
+        = SDPUtil.findLines(
456
             this.media[mediaindex],
456
             this.media[mediaindex],
457
             'a=fingerprint:',
457
             'a=fingerprint:',
458
             this.session);
458
             this.session);
459
 
459
 
460
     fingerprints.forEach(line => {
460
     fingerprints.forEach(line => {
461
-        tmp = SDPUtil.parse_fingerprint(line);
461
+        tmp = SDPUtil.parseFingerprint(line);
462
         tmp.xmlns = 'urn:xmpp:jingle:apps:dtls:0';
462
         tmp.xmlns = 'urn:xmpp:jingle:apps:dtls:0';
463
         elem.c('fingerprint').t(tmp.fingerprint);
463
         elem.c('fingerprint').t(tmp.fingerprint);
464
         delete tmp.fingerprint;
464
         delete tmp.fingerprint;
465
 
465
 
466
         // eslint-disable-next-line no-param-reassign
466
         // eslint-disable-next-line no-param-reassign
467
         line
467
         line
468
-            = SDPUtil.find_line(
468
+            = SDPUtil.findLine(
469
                 self.media[mediaindex],
469
                 self.media[mediaindex],
470
                 'a=setup:',
470
                 'a=setup:',
471
                 self.session);
471
                 self.session);
482
 
482
 
483
         // XEP-0176
483
         // XEP-0176
484
         const lines
484
         const lines
485
-            = SDPUtil.find_lines(
485
+            = SDPUtil.findLines(
486
                 this.media[mediaindex],
486
                 this.media[mediaindex],
487
                 'a=candidate:',
487
                 'a=candidate:',
488
                 this.session);
488
                 this.session);
514
 // XEP-0293
514
 // XEP-0293
515
 SDP.prototype.rtcpFbToJingle = function(mediaindex, elem, payloadtype) {
515
 SDP.prototype.rtcpFbToJingle = function(mediaindex, elem, payloadtype) {
516
     const lines
516
     const lines
517
-        = SDPUtil.find_lines(
517
+        = SDPUtil.findLines(
518
             this.media[mediaindex],
518
             this.media[mediaindex],
519
             `a=rtcp-fb:${payloadtype}`);
519
             `a=rtcp-fb:${payloadtype}`);
520
 
520
 
521
     lines.forEach(line => {
521
     lines.forEach(line => {
522
-        const tmp = SDPUtil.parse_rtcpfb(line);
522
+        const tmp = SDPUtil.parseRTCPFB(line);
523
 
523
 
524
         if (tmp.type === 'trr-int') {
524
         if (tmp.type === 'trr-int') {
525
             elem.c('rtcp-fb-trr-int', {
525
             elem.c('rtcp-fb-trr-int', {
608
 
608
 
609
     // reconstruct msid-semantic -- apparently not necessary
609
     // reconstruct msid-semantic -- apparently not necessary
610
     /*
610
     /*
611
-     var msid = SDPUtil.parse_ssrc(this.raw);
611
+     var msid = SDPUtil.parseSSRC(this.raw);
612
      if (msid.hasOwnProperty('mslabel')) {
612
      if (msid.hasOwnProperty('mslabel')) {
613
      this.session += "a=msid-semantic: WMS " + msid.mslabel + "\r\n";
613
      this.session += "a=msid-semantic: WMS " + msid.mslabel + "\r\n";
614
      }
614
      }
657
                     return this.getAttribute('id');
657
                     return this.getAttribute('id');
658
                 })
658
                 })
659
                 .get();
659
                 .get();
660
-        media += `${SDPUtil.build_mline(tmp)}\r\n`;
660
+        media += `${SDPUtil.buildMLine(tmp)}\r\n`;
661
     }
661
     }
662
 
662
 
663
     media += 'c=IN IP4 0.0.0.0\r\n';
663
     media += 'c=IN IP4 0.0.0.0\r\n';
669
             '>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]');
669
             '>transport[xmlns="urn:xmpp:jingle:transports:ice-udp:1"]');
670
     if (tmp.length) {
670
     if (tmp.length) {
671
         if (tmp.attr('ufrag')) {
671
         if (tmp.attr('ufrag')) {
672
-            media += `${SDPUtil.build_iceufrag(tmp.attr('ufrag'))}\r\n`;
672
+            media += `${SDPUtil.buildICEUfrag(tmp.attr('ufrag'))}\r\n`;
673
         }
673
         }
674
         if (tmp.attr('pwd')) {
674
         if (tmp.attr('pwd')) {
675
-            media += `${SDPUtil.build_icepwd(tmp.attr('pwd'))}\r\n`;
675
+            media += `${SDPUtil.buildICEPwd(tmp.attr('pwd'))}\r\n`;
676
         }
676
         }
677
         tmp.find('>fingerprint').each(function() {
677
         tmp.find('>fingerprint').each(function() {
678
             // FIXME: check namespace at some point
678
             // FIXME: check namespace at some point
720
         });
720
         });
721
     }
721
     }
722
     desc.find('payload-type').each(function() {
722
     desc.find('payload-type').each(function() {
723
-        media += `${SDPUtil.build_rtpmap(this)}\r\n`;
723
+        media += `${SDPUtil.buildRTPMap(this)}\r\n`;
724
         if ($(this).find('>parameter').length) {
724
         if ($(this).find('>parameter').length) {
725
             media += `a=fmtp:${this.getAttribute('id')} `;
725
             media += `a=fmtp:${this.getAttribute('id')} `;
726
             media
726
             media
803
             const name = this.getAttribute('name');
803
             const name = this.getAttribute('name');
804
             let value = this.getAttribute('value');
804
             let value = this.getAttribute('value');
805
 
805
 
806
-            value = SDPUtil.filter_special_chars(value);
806
+            value = SDPUtil.filterSpecialChars(value);
807
             media += `a=ssrc:${ssrc} ${name}`;
807
             media += `a=ssrc:${ssrc} ${name}`;
808
             if (value && value.length) {
808
             if (value && value.length) {
809
                 media += `:${value}`;
809
                 media += `:${value}`;

+ 1
- 1
modules/xmpp/SDPDiffer.js Vedi File

148
                 } else {
148
                 } else {
149
                     const nv = kv.split(':', 2);
149
                     const nv = kv.split(':', 2);
150
                     const name = nv[0];
150
                     const name = nv[0];
151
-                    const value = SDPUtil.filter_special_chars(nv[1]);
151
+                    const value = SDPUtil.filterSpecialChars(nv[1]);
152
 
152
 
153
                     modify.attrs({ name });
153
                     modify.attrs({ name });
154
                     modify.attrs({ value });
154
                     modify.attrs({ value });

+ 26
- 26
modules/xmpp/SDPUtil.js Vedi File

5
 const RTCBrowserType = require('../RTC/RTCBrowserType');
5
 const RTCBrowserType = require('../RTC/RTCBrowserType');
6
 
6
 
7
 const SDPUtil = {
7
 const SDPUtil = {
8
-    filter_special_chars(text) {
8
+    filterSpecialChars(text) {
9
         // XXX Neither one of the falsy values (e.g. null, undefined, false,
9
         // XXX Neither one of the falsy values (e.g. null, undefined, false,
10
         // "", etc.) "contain" special chars.
10
         // "", etc.) "contain" special chars.
11
         // eslint-disable-next-line no-useless-escape
11
         // eslint-disable-next-line no-useless-escape
15
         let data = null;
15
         let data = null;
16
         let pwd, ufrag;
16
         let pwd, ufrag;
17
 
17
 
18
-        if ((ufrag = SDPUtil.find_line(mediadesc, 'a=ice-ufrag:', sessiondesc))
18
+        if ((ufrag = SDPUtil.findLine(mediadesc, 'a=ice-ufrag:', sessiondesc))
19
                 && (pwd
19
                 && (pwd
20
-                    = SDPUtil.find_line(
20
+                    = SDPUtil.findLine(
21
                         mediadesc,
21
                         mediadesc,
22
                         'a=ice-pwd:',
22
                         'a=ice-pwd:',
23
                         sessiondesc))) {
23
                         sessiondesc))) {
24
             data = {
24
             data = {
25
-                ufrag: SDPUtil.parse_iceufrag(ufrag),
26
-                pwd: SDPUtil.parse_icepwd(pwd)
25
+                ufrag: SDPUtil.parseICEUfrag(ufrag),
26
+                pwd: SDPUtil.parseICEPwd(pwd)
27
             };
27
             };
28
         }
28
         }
29
 
29
 
30
         return data;
30
         return data;
31
     },
31
     },
32
-    parse_iceufrag(line) {
32
+    parseICEUfrag(line) {
33
         return line.substring(12);
33
         return line.substring(12);
34
     },
34
     },
35
-    build_iceufrag(frag) {
35
+    buildICEUfrag(frag) {
36
         return `a=ice-ufrag:${frag}`;
36
         return `a=ice-ufrag:${frag}`;
37
     },
37
     },
38
-    parse_icepwd(line) {
38
+    parseICEPwd(line) {
39
         return line.substring(10);
39
         return line.substring(10);
40
     },
40
     },
41
-    build_icepwd(pwd) {
41
+    buildICEPwd(pwd) {
42
         return `a=ice-pwd:${pwd}`;
42
         return `a=ice-pwd:${pwd}`;
43
     },
43
     },
44
-    parse_mid(line) {
44
+    parseMID(line) {
45
         return line.substring(6);
45
         return line.substring(6);
46
     },
46
     },
47
-    parse_mline(line) {
47
+    parseMLine(line) {
48
         const data = {};
48
         const data = {};
49
         const parts = line.substring(2).split(' ');
49
         const parts = line.substring(2).split(' ');
50
 
50
 
58
 
58
 
59
         return data;
59
         return data;
60
     },
60
     },
61
-    build_mline(mline) {
61
+    buildMLine(mline) {
62
         return (
62
         return (
63
             `m=${mline.media} ${mline.port} ${mline.proto} ${
63
             `m=${mline.media} ${mline.port} ${mline.proto} ${
64
                 mline.fmt.join(' ')}`);
64
                 mline.fmt.join(' ')}`);
65
     },
65
     },
66
-    parse_rtpmap(line) {
66
+    parseRTPMap(line) {
67
         const data = {};
67
         const data = {};
68
         let parts = line.substring(9).split(' ');
68
         let parts = line.substring(9).split(' ');
69
 
69
 
81
      * @param line eg. "a=sctpmap:5000 webrtc-datachannel"
81
      * @param line eg. "a=sctpmap:5000 webrtc-datachannel"
82
      * @returns [SCTP port number, protocol, streams]
82
      * @returns [SCTP port number, protocol, streams]
83
      */
83
      */
84
-    parse_sctpmap(line) {
84
+    parseSCTPMap(line) {
85
         const parts = line.substring(10).split(' ');
85
         const parts = line.substring(10).split(' ');
86
         const sctpPort = parts[0];
86
         const sctpPort = parts[0];
87
         const protocol = parts[1];
87
         const protocol = parts[1];
92
 
92
 
93
         return [ sctpPort, protocol, streamCount ];// SCTP port
93
         return [ sctpPort, protocol, streamCount ];// SCTP port
94
     },
94
     },
95
-    build_rtpmap(el) {
95
+    buildRTPMap(el) {
96
         let line
96
         let line
97
             = `a=rtpmap:${el.getAttribute('id')} ${el.getAttribute('name')}/${
97
             = `a=rtpmap:${el.getAttribute('id')} ${el.getAttribute('name')}/${
98
                 el.getAttribute('clockrate')}`;
98
                 el.getAttribute('clockrate')}`;
104
 
104
 
105
         return line;
105
         return line;
106
     },
106
     },
107
-    parse_crypto(line) {
107
+    parseCrypto(line) {
108
         const data = {};
108
         const data = {};
109
         const parts = line.substring(9).split(' ');
109
         const parts = line.substring(9).split(' ');
110
 
110
 
117
 
117
 
118
         return data;
118
         return data;
119
     },
119
     },
120
-    parse_fingerprint(line) { // RFC 4572
120
+    parseFingerprint(line) { // RFC 4572
121
         const data = {};
121
         const data = {};
122
         const parts = line.substring(14).split(' ');
122
         const parts = line.substring(14).split(' ');
123
 
123
 
127
         // TODO assert that fingerprint satisfies 2UHEX *(":" 2UHEX) ?
127
         // TODO assert that fingerprint satisfies 2UHEX *(":" 2UHEX) ?
128
         return data;
128
         return data;
129
     },
129
     },
130
-    parse_fmtp(line) {
130
+    parseFmtp(line) {
131
         const data = [];
131
         const data = [];
132
         let parts = line.split(' ');
132
         let parts = line.split(' ');
133
 
133
 
153
 
153
 
154
         return data;
154
         return data;
155
     },
155
     },
156
-    parse_icecandidate(line) {
156
+    parseICECandidate(line) {
157
         const candidate = {};
157
         const candidate = {};
158
         const elems = line.split(' ');
158
         const elems = line.split(' ');
159
 
159
 
183
                 break;
183
                 break;
184
             default: // TODO
184
             default: // TODO
185
                 logger.log(
185
                 logger.log(
186
-                    `parse_icecandidate not translating "${
186
+                    `parseICECandidate not translating "${
187
                         elems[i]}" = "${elems[i + 1]}"`);
187
                         elems[i]}" = "${elems[i + 1]}"`);
188
             }
188
             }
189
         }
189
         }
195
 
195
 
196
         return candidate;
196
         return candidate;
197
     },
197
     },
198
-    build_icecandidate(cand) {
198
+    buildICECandidate(cand) {
199
         let line = [
199
         let line = [
200
             `a=candidate:${cand.foundation}`,
200
             `a=candidate:${cand.foundation}`,
201
             cand.component,
201
             cand.component,
237
 
237
 
238
         return line;
238
         return line;
239
     },
239
     },
240
-    parse_ssrc(desc) {
240
+    parseSSRC(desc) {
241
         // proprietary mapping of a=ssrc lines
241
         // proprietary mapping of a=ssrc lines
242
         // TODO: see "Jingle RTP Source Description" by Juberti and P. Thatcher
242
         // TODO: see "Jingle RTP Source Description" by Juberti and P. Thatcher
243
         // on google docs and parse according to that
243
         // on google docs and parse according to that
255
 
255
 
256
         return data;
256
         return data;
257
     },
257
     },
258
-    parse_rtcpfb(line) {
258
+    parseRTCPFB(line) {
259
         const parts = line.substr(10).split(' ');
259
         const parts = line.substr(10).split(' ');
260
         const data = {};
260
         const data = {};
261
 
261
 
265
 
265
 
266
         return data;
266
         return data;
267
     },
267
     },
268
-    parse_extmap(line) {
268
+    parseExtmap(line) {
269
         const parts = line.substr(9).split(' ');
269
         const parts = line.substr(9).split(' ');
270
         const data = {};
270
         const data = {};
271
 
271
 
281
 
281
 
282
         return data;
282
         return data;
283
     },
283
     },
284
-    find_line(haystack, needle, sessionpart) {
284
+    findLine(haystack, needle, sessionpart) {
285
         let lines = haystack.split('\r\n');
285
         let lines = haystack.split('\r\n');
286
 
286
 
287
         for (let i = 0; i < lines.length; i++) {
287
         for (let i = 0; i < lines.length; i++) {
303
 
303
 
304
         return false;
304
         return false;
305
     },
305
     },
306
-    find_lines(haystack, needle, sessionpart) {
306
+    findLines(haystack, needle, sessionpart) {
307
         let lines = haystack.split('\r\n');
307
         let lines = haystack.split('\r\n');
308
         const needles = [];
308
         const needles = [];
309
 
309
 

+ 1
- 1
modules/xmpp/SDPUtil.spec.js Vedi File

4
 describe('SDPUtil', () => {
4
 describe('SDPUtil', () => {
5
     it('should parse an ice ufrag correctly', () => {
5
     it('should parse an ice ufrag correctly', () => {
6
         const line = 'a=ice-ufrag:3jlcc1b3j1rqt6';
6
         const line = 'a=ice-ufrag:3jlcc1b3j1rqt6';
7
-        const parsed = SDPUtil.parse_iceufrag(line);
7
+        const parsed = SDPUtil.parseICEUfrag(line);
8
 
8
 
9
         expect(parsed).toEqual('3jlcc1b3j1rqt6');
9
         expect(parsed).toEqual('3jlcc1b3j1rqt6');
10
     });
10
     });

+ 5
- 5
modules/xmpp/strophe.jingle.js Vedi File

19
         this.xmpp = xmpp;
19
         this.xmpp = xmpp;
20
         this.eventEmitter = eventEmitter;
20
         this.eventEmitter = eventEmitter;
21
         this.sessions = {};
21
         this.sessions = {};
22
-        this.ice_config = { iceServers: [] };
23
-        this.media_constraints = {
22
+        this.iceConfig = { iceServers: [] };
23
+        this.mediaConstraints = {
24
             mandatory: {
24
             mandatory: {
25
                 'OfferToReceiveAudio': true,
25
                 'OfferToReceiveAudio': true,
26
                 'OfferToReceiveVideo': true
26
                 'OfferToReceiveVideo': true
119
                         $(iq).attr('to'),
119
                         $(iq).attr('to'),
120
                         fromJid,
120
                         fromJid,
121
                         this.connection,
121
                         this.connection,
122
-                        this.media_constraints,
123
-                        this.ice_config, this.xmpp.options);
122
+                        this.mediaConstraints,
123
+                        this.iceConfig, this.xmpp.options);
124
 
124
 
125
             this.sessions[sess.sid] = sess;
125
             this.sessions[sess.sid] = sess;
126
 
126
 
271
                     }
271
                     }
272
                     }
272
                     }
273
                 });
273
                 });
274
-                this.ice_config.iceServers = iceservers;
274
+                this.iceConfig.iceServers = iceservers;
275
             }, err => {
275
             }, err => {
276
                 logger.warn('getting turn credentials failed', err);
276
                 logger.warn('getting turn credentials failed', err);
277
                 logger.warn('is mod_turncredentials or similar installed?');
277
                 logger.warn('is mod_turncredentials or similar installed?');

+ 4
- 4
modules/xmpp/strophe.logger.js Vedi File

12
 
12
 
13
     init(connection) {
13
     init(connection) {
14
         super.init(connection);
14
         super.init(connection);
15
-        this.connection.rawInput = this.log_incoming.bind(this);
16
-        this.connection.rawOutput = this.log_outgoing.bind(this);
15
+        this.connection.rawInput = this.logIncoming.bind(this);
16
+        this.connection.rawOutput = this.logOutgoing.bind(this);
17
     }
17
     }
18
 
18
 
19
-    log_incoming(stanza) {
19
+    logIncoming(stanza) {
20
         this.log.push([ new Date().getTime(), 'incoming', stanza ]);
20
         this.log.push([ new Date().getTime(), 'incoming', stanza ]);
21
     }
21
     }
22
 
22
 
23
-    log_outgoing(stanza) {
23
+    logOutgoing(stanza) {
24
         this.log.push([ new Date().getTime(), 'outgoing', stanza ]);
24
         this.log.push([ new Date().getTime(), 'outgoing', stanza ]);
25
     }
25
     }
26
 }
26
 }

+ 6
- 6
modules/xmpp/strophe.rayo.js Vedi File

54
                 // eslint-disable-next-line newline-per-chained-call
54
                 // eslint-disable-next-line newline-per-chained-call
55
                 const resource = $(result).find('ref').attr('uri');
55
                 const resource = $(result).find('ref').attr('uri');
56
 
56
 
57
-                this.call_resource = resource.substr('xmpp:'.length);
58
-                logger.info(`Received call resource: ${this.call_resource}`);
57
+                this.callResource = resource.substr('xmpp:'.length);
58
+                logger.info(`Received call resource: ${this.callResource}`);
59
                 resolve();
59
                 resolve();
60
             }, error => {
60
             }, error => {
61
                 logger.info('Dial error ', error);
61
                 logger.info('Dial error ', error);
66
 
66
 
67
     hangup() {
67
     hangup() {
68
         return new Promise((resolve, reject) => {
68
         return new Promise((resolve, reject) => {
69
-            if (!this.call_resource) {
69
+            if (!this.callResource) {
70
                 reject(new Error('No call in progress'));
70
                 reject(new Error('No call in progress'));
71
                 logger.warn('No call in progress');
71
                 logger.warn('No call in progress');
72
 
72
 
75
 
75
 
76
             const req = $iq({
76
             const req = $iq({
77
                 type: 'set',
77
                 type: 'set',
78
-                to: this.call_resource
78
+                to: this.callResource
79
             });
79
             });
80
 
80
 
81
             req.c('hangup', {
81
             req.c('hangup', {
84
 
84
 
85
             this.connection.sendIQ(req, result => {
85
             this.connection.sendIQ(req, result => {
86
                 logger.info('Hangup result ', result);
86
                 logger.info('Hangup result ', result);
87
-                this.call_resource = null;
87
+                this.callResource = null;
88
                 resolve();
88
                 resolve();
89
             }, error => {
89
             }, error => {
90
                 logger.info('Hangup error ', error);
90
                 logger.info('Hangup error ', error);
91
-                this.call_resource = null;
91
+                this.callResource = null;
92
                 reject(new Error('Hangup error '));
92
                 reject(new Error('Hangup error '));
93
             });
93
             });
94
         });
94
         });

Loading…
Annulla
Salva