Kaynağa Gözat

Fix typos. Apply consistent formatting

j8
Lyubo Marinov 8 yıl önce
ebeveyn
işleme
b62b296080
2 değiştirilmiş dosya ile 53 ekleme ve 55 silme
  1. 30
    39
      conference.js
  2. 23
    16
      react/features/base/tracks/actions.js

+ 30
- 39
conference.js Dosyayı Görüntüle

1256
             devices: ['desktop'],
1256
             devices: ['desktop'],
1257
             desktopSharingExtensionExternalInstallation: {
1257
             desktopSharingExtensionExternalInstallation: {
1258
                 interval: 500,
1258
                 interval: 500,
1259
-                checkAgain: () => {
1260
-                    return DSExternalInstallationInProgress;
1261
-                },
1259
+                checkAgain: () => DSExternalInstallationInProgress,
1262
                 listener: (status, url) => {
1260
                 listener: (status, url) => {
1263
                     switch(status) {
1261
                     switch(status) {
1264
-                        case "waitingForExtension": {
1265
-                            DSExternalInstallationInProgress = true;
1266
-                            externalInstallation = true;
1267
-                            const listener = () => {
1268
-                                // Wait a little bit more just to be sure that
1269
-                                // we won't miss the extension installation
1270
-                                setTimeout(
1271
-                                    () => {
1262
+                    case "waitingForExtension": {
1263
+                        DSExternalInstallationInProgress = true;
1264
+                        externalInstallation = true;
1265
+                        const listener = () => {
1266
+                            // Wait a little bit more just to be sure that we
1267
+                            // won't miss the extension installation
1268
+                            setTimeout(
1269
+                                () => {
1272
                                     DSExternalInstallationInProgress = false;
1270
                                     DSExternalInstallationInProgress = false;
1273
-                                    }, 500);
1274
-                                APP.UI.removeListener(
1275
-                                    UIEvents.EXTERNAL_INSTALLATION_CANCELED,
1276
-                                    listener);
1277
-                            };
1278
-                            APP.UI.addListener(
1271
+                                },
1272
+                                500);
1273
+                            APP.UI.removeListener(
1279
                                 UIEvents.EXTERNAL_INSTALLATION_CANCELED,
1274
                                 UIEvents.EXTERNAL_INSTALLATION_CANCELED,
1280
                                 listener);
1275
                                 listener);
1281
-                            APP.UI.showExtensionExternalInstallationDialog(url);
1282
-                            break;
1283
-                        }
1284
-                        case "extensionFound": {
1285
-                            if (externalInstallation) { //close the dialog
1286
-                                $.prompt.close();
1287
-                            }
1288
-                            break;
1289
-                        }
1290
-                        default: {
1291
-                            //Unknown status
1292
-                        }
1276
+                        };
1277
+                        APP.UI.addListener(
1278
+                            UIEvents.EXTERNAL_INSTALLATION_CANCELED,
1279
+                            listener);
1280
+                        APP.UI.showExtensionExternalInstallationDialog(url);
1281
+                        break;
1282
+                    }
1283
+                    case "extensionFound":
1284
+                        // Close the dialog.
1285
+                        externalInstallation && $.prompt.close();
1286
+                        break;
1287
+                    default:
1288
+                        // Unknown status
1293
                     }
1289
                     }
1294
                 }
1290
                 }
1295
             }
1291
             }
1304
                 () => {
1300
                 () => {
1305
                     // If the stream was stopped during screen sharing
1301
                     // If the stream was stopped during screen sharing
1306
                     // session then we should switch back to video.
1302
                     // session then we should switch back to video.
1307
-                    if (this.isSharingScreen) {
1308
-                        this._untoggleScreenSharing
1309
-                            && this._untoggleScreenSharing();
1310
-                    }
1303
+                    this.isSharingScreen
1304
+                        && this._untoggleScreenSharing
1305
+                        && this._untoggleScreenSharing();
1311
                 }
1306
                 }
1312
             );
1307
             );
1313
             // close external installation dialog on success.
1308
             // close external installation dialog on success.
1314
-            if (externalInstallation) {
1315
-                $.prompt.close();
1316
-            }
1309
+            externalInstallation && $.prompt.close();
1317
             return desktopStream;
1310
             return desktopStream;
1318
         }, error => {
1311
         }, error => {
1319
             DSExternalInstallationInProgress = false;
1312
             DSExternalInstallationInProgress = false;
1320
             // close external installation dialog on success.
1313
             // close external installation dialog on success.
1321
-            if (externalInstallation) {
1322
-                $.prompt.close();
1323
-            }
1314
+            externalInstallation && $.prompt.close();
1324
             throw error;
1315
             throw error;
1325
         });
1316
         });
1326
     },
1317
     },

+ 23
- 16
react/features/base/tracks/actions.js Dosyayı Görüntüle

1
-import JitsiMeetJS, {
2
-    JitsiTrackErrors,
3
-    JitsiTrackEvents
4
-} from '../lib-jitsi-meet';
1
+import { JitsiTrackErrors, JitsiTrackEvents } from '../lib-jitsi-meet';
5
 import {
2
 import {
6
     CAMERA_FACING_MODE,
3
     CAMERA_FACING_MODE,
7
     MEDIA_TYPE,
4
     MEDIA_TYPE,
78
 
75
 
79
 /**
76
 /**
80
  * Replaces one track with another for one renegotiation instead of invoking
77
  * Replaces one track with another for one renegotiation instead of invoking
81
- * two renegotations with a separate removeTrack and addTrack. Disposes the
78
+ * two renegotiations with a separate removeTrack and addTrack. Disposes the
82
  * removed track as well.
79
  * removed track as well.
83
  *
80
  *
84
  * @param {JitsiLocalTrack|null} oldTrack - The track to dispose.
81
  * @param {JitsiLocalTrack|null} oldTrack - The track to dispose.
85
  * @param {JitsiLocalTrack|null} newTrack - The track to use instead.
82
  * @param {JitsiLocalTrack|null} newTrack - The track to use instead.
86
  * @param {JitsiConference} [conference] - The conference from which to remove
83
  * @param {JitsiConference} [conference] - The conference from which to remove
87
- * and add the tracks. If one is not provied, the conference in the redux store
84
+ * and add the tracks. If one is not provided, the conference in the redux store
88
  * will be used.
85
  * will be used.
89
  * @returns {Function}
86
  * @returns {Function}
90
  */
87
  */
182
  * changed.
179
  * changed.
183
  *
180
  *
184
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
181
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
185
- * @returns {{ type: TRACK_UPDATED, track: Track }}
182
+ * @returns {{
183
+ *     type: TRACK_UPDATED,
184
+ *     track: Track
185
+ * }}
186
  */
186
  */
187
 export function trackMutedChanged(track) {
187
 export function trackMutedChanged(track) {
188
     return {
188
     return {
199
  * conference.
199
  * conference.
200
  *
200
  *
201
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
201
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
202
- * @returns {{ type: TRACK_REMOVED, track: Track }}
202
+ * @returns {{
203
+ *     type: TRACK_REMOVED,
204
+ *     track: Track
205
+ * }}
203
  */
206
  */
204
 export function trackRemoved(track) {
207
 export function trackRemoved(track) {
205
     track.removeAllListeners(JitsiTrackEvents.TRACK_MUTE_CHANGED);
208
     track.removeAllListeners(JitsiTrackEvents.TRACK_MUTE_CHANGED);
217
  * Signal that track's video started to play.
220
  * Signal that track's video started to play.
218
  *
221
  *
219
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
222
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
220
- * @returns {{ type: TRACK_UPDATED, track: Track }}
223
+ * @returns {{
224
+ *     type: TRACK_UPDATED,
225
+ *     track: Track
226
+ * }}
221
  */
227
  */
222
 export function trackVideoStarted(track) {
228
 export function trackVideoStarted(track) {
223
     return {
229
     return {
234
  *
240
  *
235
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
241
  * @param {(JitsiLocalTrack|JitsiRemoteTrack)} track - JitsiTrack instance.
236
  * @param {VIDEO_TYPE|undefined} videoType - Video type.
242
  * @param {VIDEO_TYPE|undefined} videoType - Video type.
237
- * @returns {{ type: TRACK_UPDATED, track: Track }}
243
+ * @returns {{
244
+ *     type: TRACK_UPDATED,
245
+ *     track: Track
246
+ * }}
238
  */
247
  */
239
 export function trackVideoTypeChanged(track, videoType) {
248
 export function trackVideoTypeChanged(track, videoType) {
240
     return {
249
     return {
254
  * @returns {Function}
263
  * @returns {Function}
255
  */
264
  */
256
 function _addTracks(tracks) {
265
 function _addTracks(tracks) {
257
-    return dispatch =>
258
-        Promise.all(tracks.map(t => dispatch(trackAdded(t))));
266
+    return dispatch => Promise.all(tracks.map(t => dispatch(trackAdded(t))));
259
 }
267
 }
260
 
268
 
261
 /**
269
 /**
311
  * tracks.
319
  * tracks.
312
  * @private
320
  * @private
313
  * @returns {{
321
  * @returns {{
314
- *      tracksToAdd: JitsiLocalTrack[],
315
- *      tracksToRemove: JitsiLocalTrack[]
322
+ *     tracksToAdd: JitsiLocalTrack[],
323
+ *     tracksToRemove: JitsiLocalTrack[]
316
  * }}
324
  * }}
317
  */
325
  */
318
 function _getLocalTracksToChange(currentTracks, newTracks) {
326
 function _getLocalTracksToChange(currentTracks, newTracks) {
363
             // of the value on the right side of the equality check is defined
371
             // of the value on the right side of the equality check is defined
364
             // by jitsi-meet. The type definitions are surely compatible today
372
             // by jitsi-meet. The type definitions are surely compatible today
365
             // but that may not be the case tomorrow.
373
             // but that may not be the case tomorrow.
366
-            && track.getCameraFacingMode() === CAMERA_FACING_MODE.USER
367
-    );
374
+            && track.getCameraFacingMode() === CAMERA_FACING_MODE.USER);
368
 }
375
 }
369
 
376
 
370
 /**
377
 /**

Loading…
İptal
Kaydet