Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Coding style, consistency
Lyubo Marinov3033f7bc3d9c
diff --git a/react/features/base/tracks/actionTypes.js b/react/features/base/tracks/actionTypes.jsindex eff80d7dc0..2a8351cdb4 100644--- a/react/features/base/tracks/actionTypes.js+++ b/react/features/base/tracks/actionTypes.js@@ -9,26 +9,6 @@*/export const TRACK_ADDED = Symbol('TRACK_ADDED');-/**- * The type of redux action dispatched when a local track starts being created- * via a WebRTC {@code getUserMedia} call. The action's payload includes an- * extra {@code gumProcess} property which is a {@code Promise} with an extra- * {@code cancel} method which can be used to cancel the process. Canceling will- * result in disposing any {@code JitsiLocalTrack} returned by the- * {@code getUserMedia} callback. There will be a {@code TRACK_CREATE_CANCELED}- * action instead of a {@code TRACK_ADDED} or {@code TRACK_CREATE_ERROR} action.- *- * {- * type: TRACK_BEING_CREATED- * track: {- * gumProcess: Promise with a `cancel` method to cancel the process,- * local: true,- * mediaType: MEDIA_TYPE- * }- * }- */-export const TRACK_BEING_CREATED = Symbol('TRACK_BEING_CREATED');-/*** The type of redux action dispatched when a canceled {@code getUserMedia}* process completes either successfully or with an error (the error is ignored@@ -73,3 +53,23 @@ export const TRACK_REMOVED = Symbol('TRACK_REMOVED');* }*/export const TRACK_UPDATED = Symbol('TRACK_UPDATED');++/**+ * The type of redux action dispatched when a local track starts being created+ * via a WebRTC {@code getUserMedia} call. The action's payload includes an+ * extra {@code gumProcess} property which is a {@code Promise} with an extra+ * {@code cancel} method which can be used to cancel the process. Canceling will+ * result in disposing any {@code JitsiLocalTrack} returned by the+ * {@code getUserMedia} callback. There will be a {@code TRACK_CREATE_CANCELED}+ * action instead of a {@code TRACK_ADDED} or {@code TRACK_CREATE_ERROR} action.+ *+ * {+ * type: TRACK_WILL_CREATE+ * track: {+ * gumProcess: Promise with a `cancel` method to cancel the process,+ * local: true,+ * mediaType: MEDIA_TYPE+ * }+ * }+ */+export const TRACK_WILL_CREATE = Symbol('TRACK_WILL_CREATE');diff --git a/react/features/base/tracks/actions.js b/react/features/base/tracks/actions.jsindex 369ca81220..afa44dda6d 100644--- a/react/features/base/tracks/actions.js+++ b/react/features/base/tracks/actions.js@@ -10,11 +10,11 @@ import { getLocalParticipant } from '../participants';import {TRACK_ADDED,- TRACK_BEING_CREATED,TRACK_CREATE_CANCELED,TRACK_CREATE_ERROR,TRACK_REMOVED,- TRACK_UPDATED+ TRACK_UPDATED,+ TRACK_WILL_CREATE} from './actionTypes';import { createLocalTracksF } from './functions';@@ -138,7 +138,7 @@ export function createLocalTracksA(options = {}) {};dispatch({- type: TRACK_BEING_CREATED,+ type: TRACK_WILL_CREATE,track: {gumProcess,local: true,diff --git a/react/features/base/tracks/reducer.js b/react/features/base/tracks/reducer.jsindex d2cce6e4f1..3ed393170c 100644--- a/react/features/base/tracks/reducer.js+++ b/react/features/base/tracks/reducer.js@@ -3,11 +3,11 @@ import { ReducerRegistry } from '../redux';import {TRACK_ADDED,- TRACK_BEING_CREATED,TRACK_CREATE_CANCELED,TRACK_CREATE_ERROR,TRACK_REMOVED,- TRACK_UPDATED+ TRACK_UPDATED,+ TRACK_WILL_CREATE} from './actionTypes';/**@@ -101,9 +101,6 @@ ReducerRegistry.register('features/base/tracks', (state = [], action) => {return [ ...withoutTrackStub, action.track ];}- case TRACK_BEING_CREATED:- return [ ...state, action.track ];-case TRACK_CREATE_CANCELED:case TRACK_CREATE_ERROR: {return state.filter(t => !t.local || t.mediaType !== action.trackType);@@ -112,6 +109,9 @@ ReducerRegistry.register('features/base/tracks', (state = [], action) => {case TRACK_REMOVED:return state.filter(t => t.jitsiTrack !== action.track.jitsiTrack);+ case TRACK_WILL_CREATE:+ return [ ...state, action.track ];+default:return state;}