Browse Source

Add missing semicolons, break some comments at line limit

master
paweldomas 9 years ago
parent
commit
6b25f9cd20

+ 8
- 7
modules/RTC/JitsiLocalTrack.js View File

@@ -42,7 +42,7 @@ JitsiLocalTrack.prototype.constructor = JitsiLocalTrack;
42 42
  */
43 43
 JitsiLocalTrack.prototype.mute = function () {
44 44
     return createMuteUnmutePromise(this, true);
45
-}
45
+};
46 46
 
47 47
 /**
48 48
  * Unmutes the stream. Will reject the Promise if there is mute/unmute operation
@@ -51,7 +51,7 @@ JitsiLocalTrack.prototype.mute = function () {
51 51
  */
52 52
 JitsiLocalTrack.prototype.unmute = function () {
53 53
     return createMuteUnmutePromise(this, false);
54
-}
54
+};
55 55
 
56 56
 /**
57 57
  * Creates Promise for mute/unmute operation.
@@ -82,7 +82,8 @@ function createMuteUnmutePromise(track, mute)
82 82
 
83 83
 /**
84 84
  * Mutes / unmutes the track.
85
- * @param mute {boolean} if true the track will be muted. Otherwise the track will be unmuted.
85
+ * @param mute {boolean} if true the track will be muted. Otherwise the track
86
+ * will be unmuted.
86 87
  */
87 88
 JitsiLocalTrack.prototype._setMute = function (mute, resolve, reject) {
88 89
     if (this.isMuted() === mute) {
@@ -186,7 +187,7 @@ JitsiLocalTrack.prototype._setMute = function (mute, resolve, reject) {
186 187
                 });
187 188
         }
188 189
     }
189
-}
190
+};
190 191
 
191 192
 /**
192 193
  * Stops sending the media track. And removes it from the HTML.
@@ -256,7 +257,7 @@ JitsiLocalTrack.prototype._setRTC = function (rtc) {
256 257
  */
257 258
 JitsiLocalTrack.prototype._setSSRC = function (ssrc) {
258 259
     this.ssrc = ssrc;
259
-}
260
+};
260 261
 
261 262
 
262 263
 //FIXME: This dependacy is not necessary. This is quick fix.
@@ -267,7 +268,7 @@ JitsiLocalTrack.prototype._setSSRC = function (ssrc) {
267 268
  */
268 269
 JitsiLocalTrack.prototype._setConference = function(conference) {
269 270
     this.conference = conference;
270
-}
271
+};
271 272
 
272 273
 /**
273 274
  * Gets the SSRC of this local track if it's available already or <tt>null</tt>
@@ -290,6 +291,6 @@ JitsiLocalTrack.prototype.getSSRC = function () {
290 291
  */
291 292
 JitsiLocalTrack.prototype.isLocal = function () {
292 293
     return true;
293
-}
294
+};
294 295
 
295 296
 module.exports = JitsiLocalTrack;

+ 3
- 2
modules/RTC/JitsiRemoteTrack.js View File

@@ -48,7 +48,8 @@ JitsiRemoteTrack.prototype.setMute = function (value) {
48 48
 
49 49
 /**
50 50
  * Returns the current muted status of the track.
51
- * @returns {boolean|*|JitsiRemoteTrack.muted} <tt>true</tt> if the track is muted and <tt>false</tt> otherwise.
51
+ * @returns {boolean|*|JitsiRemoteTrack.muted} <tt>true</tt> if the track is
52
+ * muted and <tt>false</tt> otherwise.
52 53
  */
53 54
 JitsiRemoteTrack.prototype.isMuted = function () {
54 55
     return this.muted;
@@ -85,7 +86,7 @@ JitsiRemoteTrack.prototype._setVideoType = function (type) {
85 86
         return;
86 87
     this.videoType = type;
87 88
     this.eventEmitter.emit(JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED, type);
88
-}
89
+};
89 90
 
90 91
 delete JitsiRemoteTrack.prototype.dispose;
91 92
 

+ 10
- 10
modules/RTC/JitsiTrack.js View File

@@ -119,7 +119,7 @@ JitsiTrack.prototype.isVideoTrack = function () {
119 119
  */
120 120
 JitsiTrack.prototype.getOriginalStream = function() {
121 121
     return this.stream;
122
-}
122
+};
123 123
 
124 124
 /**
125 125
  * Return meaningful usage label for this track depending on it's media and
@@ -203,14 +203,14 @@ JitsiTrack.prototype.detach = function (container) {
203 203
     if(container) {
204 204
         require("./RTCUtils").setVideoSrc(container, null);
205 205
     }
206
-}
206
+};
207 207
 
208 208
 /**
209 209
  * Dispose sending the media track. And removes it from the HTML.
210 210
  * NOTE: Works for local tracks only.
211 211
  */
212 212
 JitsiTrack.prototype.dispose = function () {
213
-}
213
+};
214 214
 
215 215
 /**
216 216
  * Returns true if this is a video track and the source of the video is a
@@ -218,11 +218,11 @@ JitsiTrack.prototype.dispose = function () {
218 218
  */
219 219
 JitsiTrack.prototype.isScreenSharing = function(){
220 220
 
221
-}
221
+};
222 222
 
223 223
 /**
224 224
  * Returns id of the track.
225
- * @returns {string} id of the track or null if this is fake track.
225
+ * @returns {string|null} id of the track or null if this is fake track.
226 226
  */
227 227
 JitsiTrack.prototype._getId = function () {
228 228
     var tracks = this.stream.getTracks();
@@ -233,7 +233,7 @@ JitsiTrack.prototype._getId = function () {
233 233
 
234 234
 /**
235 235
  * Returns id of the track.
236
- * @returns {string} id of the track or null if this is fake track.
236
+ * @returns {string|null} id of the track or null if this is fake track.
237 237
  */
238 238
 JitsiTrack.prototype.getId = function () {
239 239
     if(this.stream)
@@ -264,7 +264,7 @@ JitsiTrack.prototype.isActive = function () {
264 264
 JitsiTrack.prototype.on = function (eventId, handler) {
265 265
     if(this.eventEmitter)
266 266
         this.eventEmitter.on(eventId, handler);
267
-}
267
+};
268 268
 
269 269
 /**
270 270
  * Removes event listener
@@ -274,7 +274,7 @@ JitsiTrack.prototype.on = function (eventId, handler) {
274 274
 JitsiTrack.prototype.off = function (eventId, handler) {
275 275
     if(this.eventEmitter)
276 276
         this.eventEmitter.removeListener(eventId, handler);
277
-}
277
+};
278 278
 
279 279
 // Common aliases for event emitter
280 280
 JitsiTrack.prototype.addEventListener = JitsiTrack.prototype.on;
@@ -291,7 +291,7 @@ JitsiTrack.prototype.setAudioLevel = function (audioLevel) {
291 291
             audioLevel);
292 292
         this.audioLevel = audioLevel;
293 293
     }
294
- }
294
+ };
295 295
 
296 296
 /**
297 297
  * Returns the msid of the stream attached to the JitsiTrack object or null if
@@ -302,6 +302,6 @@ JitsiTrack.prototype.getMSID = function () {
302 302
     return (!this.stream || !this.stream.id || !(tracks = this._getTracks()) ||
303 303
         !tracks.length || !(track = tracks[0]) || !track.id)?
304 304
             null : this.stream.id + " " + track.id;
305
-}
305
+};
306 306
 
307 307
 module.exports = JitsiTrack;

+ 15
- 13
modules/RTC/RTC.js View File

@@ -73,9 +73,11 @@ function RTC(room, options) {
73 73
  * @param {Object} [options] optional parameters
74 74
  * @param {Array} options.devices the devices that will be requested
75 75
  * @param {string} options.resolution resolution constraints
76
- * @param {bool} options.dontCreateJitsiTrack if <tt>true</tt> objects with the following structure {stream: the Media Stream,
76
+ * @param {bool} options.dontCreateJitsiTrack if <tt>true</tt> objects with the
77
+ * following structure {stream: the Media Stream,
77 78
  * type: "audio" or "video", videoType: "camera" or "desktop"}
78
- * will be returned trough the Promise, otherwise JitsiTrack objects will be returned.
79
+ * will be returned trough the Promise, otherwise JitsiTrack objects will be
80
+ * returned.
79 81
  * @param {string} options.cameraDeviceId
80 82
  * @param {string} options.micDeviceId
81 83
  * @returns {*} Promise object that will receive the new JitsiTracks
@@ -85,7 +87,7 @@ RTC.obtainAudioAndVideoPermissions = function (options) {
85 87
     return RTCUtils.obtainAudioAndVideoPermissions(options).then(function (streams) {
86 88
         return createLocalTracks(streams, options);
87 89
     });
88
-}
90
+};
89 91
 
90 92
 RTC.prototype.onIncommingCall = function(event) {
91 93
     if(this.options.config.openSctp)
@@ -123,17 +125,17 @@ RTC.prototype.onIncommingCall = function(event) {
123 125
             this.room.addStream(this.localStreams[i].getOriginalStream(),
124 126
                 function () {}, ssrcInfo, true);
125 127
         }
126
-}
128
+};
127 129
 
128 130
 RTC.prototype.selectedEndpoint = function (id) {
129 131
     if(this.dataChannels)
130 132
         this.dataChannels.handleSelectedEndpointEvent(id);
131
-}
133
+};
132 134
 
133 135
 RTC.prototype.pinEndpoint = function (id) {
134 136
     if(this.dataChannels)
135 137
         this.dataChannels.handlePinnedEndpointEvent(id);
136
-}
138
+};
137 139
 
138 140
 RTC.prototype.addListener = function (type, listener) {
139 141
     this.eventEmitter.on(type, listener);
@@ -145,24 +147,24 @@ RTC.prototype.removeListener = function (eventType, listener) {
145 147
 
146 148
 RTC.addListener = function (eventType, listener) {
147 149
     RTCUtils.addListener(eventType, listener);
148
-}
150
+};
149 151
 
150 152
 RTC.removeListener = function (eventType, listener) {
151 153
     RTCUtils.removeListener(eventType, listener)
152
-}
154
+};
153 155
 
154 156
 RTC.isRTCReady = function () {
155 157
     return RTCUtils.isRTCReady();
156
-}
158
+};
157 159
 
158 160
 RTC.init = function (options) {
159 161
     this.options = options || {};
160 162
     return RTCUtils.init(this.options);
161
-}
163
+};
162 164
 
163 165
 RTC.getDeviceAvailability = function () {
164 166
     return RTCUtils.getDeviceAvailability();
165
-}
167
+};
166 168
 
167 169
 RTC.prototype.addLocalStream = function (stream) {
168 170
     this.localStreams.push(stream);
@@ -200,7 +202,7 @@ RTC.prototype.setAudioMute = function (value) {
200 202
     }
201 203
     // we return a Promise from all Promises so we can wait for their execution
202 204
     return Promise.all(mutePromises);
203
-}
205
+};
204 206
 
205 207
 RTC.prototype.removeLocalStream = function (stream) {
206 208
     var pos = this.localStreams.indexOf(stream);
@@ -265,7 +267,7 @@ RTC.isDeviceListAvailable = function () {
265 267
  */
266 268
 RTC.isDeviceChangeAvailable = function () {
267 269
     return RTCUtils.isDeviceChangeAvailable();
268
-}
270
+};
269 271
 /**
270 272
  * Allows to receive list of available cameras/microphones.
271 273
  * @param {function} callback would receive array of devices as an argument

+ 11
- 12
modules/xmpp/ChatRoom.js View File

@@ -641,7 +641,6 @@ ChatRoom.prototype.generateNewStreamSSRCInfo = function () {
641 641
 };
642 642
 
643 643
 ChatRoom.prototype.setVideoMute = function (mute, callback, options) {
644
-    var self = this;
645 644
     this.sendVideoInfoPresence(mute);
646 645
     if(callback)
647 646
         callback(mute);
@@ -726,7 +725,7 @@ ChatRoom.prototype.getRecordingState = function () {
726 725
     if(this.recording)
727 726
         return this.recording.getState();
728 727
     return "off";
729
-}
728
+};
730 729
 
731 730
 /**
732 731
  * Returns the url of the recorded video.
@@ -735,7 +734,7 @@ ChatRoom.prototype.getRecordingURL = function () {
735 734
     if(this.recording)
736 735
         return this.recording.getURL();
737 736
     return null;
738
-}
737
+};
739 738
 
740 739
 /**
741 740
  * Starts/stops the recording
@@ -748,7 +747,7 @@ ChatRoom.prototype.toggleRecording = function (options, statusChangeHandler) {
748 747
 
749 748
     return statusChangeHandler("error",
750 749
         new Error("The conference is not created yet!"));
751
-}
750
+};
752 751
 
753 752
 /**
754 753
  * Returns true if the SIP calls are supported and false otherwise
@@ -757,7 +756,7 @@ ChatRoom.prototype.isSIPCallingSupported = function () {
757 756
     if(this.moderator)
758 757
         return this.moderator.isSipGatewayEnabled();
759 758
     return false;
760
-}
759
+};
761 760
 
762 761
 /**
763 762
  * Dials a number.
@@ -767,28 +766,28 @@ ChatRoom.prototype.dial = function (number) {
767 766
     return this.connection.rayo.dial(number, "fromnumber",
768 767
         Strophe.getNodeFromJid(this.myroomjid), this.password,
769 768
         this.focusMucJid);
770
-}
769
+};
771 770
 
772 771
 /**
773 772
  * Hangup an existing call
774 773
  */
775 774
 ChatRoom.prototype.hangup = function () {
776 775
     return this.connection.rayo.hangup();
777
-}
776
+};
778 777
 
779 778
 /**
780 779
  * Returns the phone number for joining the conference.
781 780
  */
782 781
 ChatRoom.prototype.getPhoneNumber = function () {
783 782
     return this.phoneNumber;
784
-}
783
+};
785 784
 
786 785
 /**
787 786
  * Returns the pin for joining the conference with phone.
788 787
  */
789 788
 ChatRoom.prototype.getPhonePin = function () {
790 789
     return this.phonePin;
791
-}
790
+};
792 791
 
793 792
 /**
794 793
  * Returns the connection state for the current session.
@@ -797,7 +796,7 @@ ChatRoom.prototype.getConnectionState = function () {
797 796
     if(!this.session)
798 797
         return null;
799 798
     return this.session.getIceConnectionState();
800
-}
799
+};
801 800
 
802 801
 /**
803 802
  * Mutes remote participant.
@@ -823,7 +822,7 @@ ChatRoom.prototype.muteParticipant = function (jid, mute) {
823 822
         function (error) {
824 823
             logger.log('set mute error', error);
825 824
         });
826
-}
825
+};
827 826
 
828 827
 ChatRoom.prototype.onMute = function (iq) {
829 828
     var from = iq.getAttribute('from');
@@ -837,7 +836,7 @@ ChatRoom.prototype.onMute = function (iq) {
837 836
         this.eventEmitter.emit(XMPPEvents.AUDIO_MUTED_BY_FOCUS, doMuteAudio);
838 837
     }
839 838
     return true;
840
-}
839
+};
841 840
 
842 841
 /**
843 842
  * Leaves the room. Closes the jingle session.

+ 1
- 1
modules/xmpp/JingleSessionPC.js View File

@@ -1253,7 +1253,7 @@ JingleSessionPC.prototype.getIceConnectionState = function () {
1253 1253
 JingleSessionPC.prototype.close = function () {
1254 1254
     this.closed = true;
1255 1255
     this.peerconnection && this.peerconnection.close();
1256
-}
1256
+};
1257 1257
 
1258 1258
 
1259 1259
 /**

Loading…
Cancel
Save