瀏覽代碼

Add missing semicolons, break some comments at line limit

master
paweldomas 9 年之前
父節點
當前提交
6b25f9cd20

+ 8
- 7
modules/RTC/JitsiLocalTrack.js 查看文件

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

+ 3
- 2
modules/RTC/JitsiRemoteTrack.js 查看文件

48
 
48
 
49
 /**
49
 /**
50
  * Returns the current muted status of the track.
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
 JitsiRemoteTrack.prototype.isMuted = function () {
54
 JitsiRemoteTrack.prototype.isMuted = function () {
54
     return this.muted;
55
     return this.muted;
85
         return;
86
         return;
86
     this.videoType = type;
87
     this.videoType = type;
87
     this.eventEmitter.emit(JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED, type);
88
     this.eventEmitter.emit(JitsiTrackEvents.TRACK_VIDEOTYPE_CHANGED, type);
88
-}
89
+};
89
 
90
 
90
 delete JitsiRemoteTrack.prototype.dispose;
91
 delete JitsiRemoteTrack.prototype.dispose;
91
 
92
 

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

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

+ 15
- 13
modules/RTC/RTC.js 查看文件

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

+ 11
- 12
modules/xmpp/ChatRoom.js 查看文件

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

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

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

Loading…
取消
儲存