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
Comply w/ coding style
Lyubomir Marinov4f8b7a934c83
diff --git a/react/features/base/media/actionTypes.js b/react/features/base/media/actionTypes.jsindex 4f34cb94bf..f416744c70 100644--- a/react/features/base/media/actionTypes.js+++ b/react/features/base/media/actionTypes.js@@ -1,7 +1,7 @@import { Symbol } from '../react';/**- * Action to change the muted state of the local audio.+ * Action to set the muted state of the local audio.** {* type: SET_AUDIO_MUTED,@@ -11,7 +11,7 @@ import { Symbol } from '../react';export const SET_AUDIO_MUTED = Symbol('SET_AUDIO_MUTED');/**- * Action to change the facing mode of the local video camera.+ * Action to set the facing mode of the local video camera.** {* type: SET_CAMERA_FACING_MODE,@@ -21,7 +21,7 @@ export const SET_AUDIO_MUTED = Symbol('SET_AUDIO_MUTED');export const SET_CAMERA_FACING_MODE = Symbol('SET_CAMERA_FACING_MODE');/**- * Action to change the muted state of the local video.+ * Action to set the muted state of the local video.** {* type: SET_VIDEO_MUTED,diff --git a/react/features/base/media/actions.js b/react/features/base/media/actions.jsindex 9b4f85cbdd..c3e38baa64 100644--- a/react/features/base/media/actions.js+++ b/react/features/base/media/actions.js@@ -8,9 +8,10 @@ import './middleware';import './reducer';/**- * Action to change the local audio muted state.+ * Action to set the muted state of the local audio.*- * @param {boolean} muted - If local audio is muted.+ * @param {boolean} muted - True if the local audio is to be muted or false if+ * the local audio is to be unmuted.* @returns {{* type: SET_AUDIO_MUTED,* muted: boolean@@ -24,9 +25,9 @@ export function setAudioMuted(muted) {}/**- * Action to change the facing mode of the local video camera.+ * Action to set the facing mode of the local camera.*- * @param {CAMERA_FACING_MODE} cameraFacingMode - Camera facing mode.+ * @param {CAMERA_FACING_MODE} cameraFacingMode - The camera facing mode to set.* @returns {{* type: SET_CAMERA_FACING_MODE,* cameraFacingMode: CAMERA_FACING_MODE@@ -39,6 +40,23 @@ export function setCameraFacingMode(cameraFacingMode) {};}+/**+ * Action to set the muted state of the local video.+ *+ * @param {boolean} muted - True if the local video is to be muted or false if+ * the local video is to be unmuted.+ * @returns {{+ * type: SET_VIDEO_MUTED,+ * muted: boolean+ * }}+ */+export function setVideoMuted(muted) {+ return {+ type: SET_VIDEO_MUTED,+ muted+ };+}+/*** Toggles the mute state of the local audio track(s).*@@ -83,19 +101,3 @@ export function toggleVideoMuted() {return dispatch(setVideoMuted(!muted));};}--/**- * Action to change the local video muted state.- *- * @param {boolean} muted - If local video is muted.- * @returns {{- * type: SET_VIDEO_MUTED,- * muted: boolean- * }}- */-export function setVideoMuted(muted) {- return {- type: SET_VIDEO_MUTED,- muted- };-}diff --git a/react/features/base/media/reducer.js b/react/features/base/media/reducer.jsindex 5d0f8dd120..4b381ff06d 100644--- a/react/features/base/media/reducer.js+++ b/react/features/base/media/reducer.js@@ -9,6 +9,21 @@ import {} from './actionTypes';import { CAMERA_FACING_MODE } from './constants';+/**+ * Listen for various actions related to media devices.+ *+ * @param {Object} state - State of media devices.+ * @param {Object} action - Action object.+ * @param {string} action.type - Type of action.+ * @param {Object} action.media - Information about media devices to be+ * modified.+ * @returns {Object}+ */+ReducerRegistry.register('features/base/media', combineReducers({+ audio,+ video+}));+/*** Media state object for local audio.*@@ -90,18 +105,3 @@ function video(state = VIDEO_INITIAL_MEDIA_STATE, action) {return state;}}--/**- * Listen for various actions related to media devices.- *- * @param {Object} state - State of media devices.- * @param {Object} action - Action object.- * @param {string} action.type - Type of action.- * @param {Object} action.media - Information about media devices to be- * modified.- * @returns {Object}- */-ReducerRegistry.register('features/base/media', combineReducers({- audio,- video-}));diff --git a/react/features/base/tracks/middleware.js b/react/features/base/tracks/middleware.jsindex 6beba9a12c..1338f0d8ac 100644--- a/react/features/base/tracks/middleware.js+++ b/react/features/base/tracks/middleware.js@@ -1,7 +1,4 @@-import {- LIB_DISPOSED,- LIB_INITIALIZED-} from '../lib-jitsi-meet';+import { LIB_DISPOSED, LIB_INITIALIZED } from '../lib-jitsi-meet';import {MEDIA_TYPE,SET_AUDIO_MUTED,@@ -12,15 +9,9 @@ import {} from '../media';import { MiddlewareRegistry } from '../redux';-import {- createLocalTracks,- destroyLocalTracks-} from './actions';+import { createLocalTracks, destroyLocalTracks } from './actions';import { TRACK_UPDATED } from './actionTypes';-import {- getLocalTrack,- setTrackMuted-} from './functions';+import { getLocalTrack, setTrackMuted } from './functions';/*** Middleware that captures LIB_INITIALIZED and LIB_DISPOSED actions@@ -32,6 +23,14 @@ import {*/MiddlewareRegistry.register(store => next => action => {switch (action.type) {+ case LIB_INITIALIZED:+ store.dispatch(createLocalTracks());+ break;++ case LIB_DISPOSED:+ store.dispatch(destroyLocalTracks());+ break;+case SET_AUDIO_MUTED:_setMuted(store, action, MEDIA_TYPE.AUDIO);break;@@ -45,20 +44,12 @@ MiddlewareRegistry.register(store => next => action => {);break;- case LIB_INITIALIZED:- store.dispatch(createLocalTracks());- break;-- case LIB_DISPOSED:- store.dispatch(destroyLocalTracks());+ case SET_VIDEO_MUTED:+ _setMuted(store, action, MEDIA_TYPE.VIDEO);break;case TRACK_UPDATED:return _trackUpdated(store, next, action);-- case SET_VIDEO_MUTED:- _setMuted(store, action, MEDIA_TYPE.VIDEO);- break;}return next(action);diff --git a/react/features/largeVideo/actions.js b/react/features/largeVideo/actions.jsindex 733359afba..d262c5e270 100644--- a/react/features/largeVideo/actions.js+++ b/react/features/largeVideo/actions.js@@ -1,8 +1,5 @@import { _handleParticipantError } from '../base/conference';-import {- MEDIA_TYPE,- VIDEO_TYPE-} from '../base/media';+import { MEDIA_TYPE, VIDEO_TYPE } from '../base/media';import {getLocalVideoTrack,getTrackByMediaTypeAndParticipant@@ -48,7 +45,7 @@ export function selectParticipant() {/*** Action to select the participant to be displayed in LargeVideo based on a* variety of factors: if there is a dominant or pinned speaker, or if there are- * remote tracks etc.+ * remote tracks, etc.** @returns {Function}*/