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
chore(mobile) changes the name for screenShares to remoteScreenShares to better reflect it's content
Titus-Andrei Moldovanaf8072d9d23e
diff --git a/react/features/base/lastn/middleware.js b/react/features/base/lastn/middleware.jsindex e746983a1a..864292a3b0 100644--- a/react/features/base/lastn/middleware.js+++ b/react/features/base/lastn/middleware.js@@ -3,7 +3,7 @@import { SET_FILMSTRIP_ENABLED } from '../../filmstrip/actionTypes';import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes';import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';-import { SCREEN_SHARE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';+import { SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';import { SET_AUDIO_ONLY } from '../audio-only/actionTypes';import { CONFERENCE_JOINED } from '../conference/actionTypes';import {@@ -33,7 +33,7 @@ MiddlewareRegistry.register(store => next => action => {case PARTICIPANT_JOINED:case PARTICIPANT_KICKED:case PARTICIPANT_LEFT:- case SCREEN_SHARE_PARTICIPANTS_UPDATED:+ case SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED:case SELECT_LARGE_VIDEO_PARTICIPANT:case SET_AUDIO_ONLY:case SET_FILMSTRIP_ENABLED:@@ -80,7 +80,7 @@ function _updateLastN({ getState }) {if (typeof appState !== 'undefined' && appState !== 'active') {lastN = isLocalVideoTrackDesktop(state) ? 1 : 0;} else if (audioOnly) {- const { screenShares, tileViewEnabled } = state['features/video-layout'];+ const { remoteScreenShares, tileViewEnabled } = state['features/video-layout'];const largeVideoParticipantId = state['features/large-video'].participantId;const largeVideoParticipant= largeVideoParticipantId ? getParticipantById(state, largeVideoParticipantId) : undefined;@@ -89,7 +89,7 @@ function _updateLastN({ getState }) {// view since we make an exception only for screenshare when in audio-only mode. If the user unpins// the screenshare, lastN will be set to 0 here. It will be set to 1 if screenshare has been auto pinned.if (!tileViewEnabled && largeVideoParticipant && !largeVideoParticipant.local) {- lastN = (screenShares || []).includes(largeVideoParticipantId) ? 1 : 0;+ lastN = (remoteScreenShares || []).includes(largeVideoParticipantId) ? 1 : 0;} else {lastN = 0;}diff --git a/react/features/base/participants/functions.js b/react/features/base/participants/functions.jsindex d1b46d2c18..a61cbbb2c9 100644--- a/react/features/base/participants/functions.js+++ b/react/features/base/participants/functions.js@@ -360,10 +360,10 @@ export function shouldRenderParticipantVideo(stateful: Object | Function, id: st}/* Last, check if the participant is sharing their screen and they are on stage. */- const screenShares = state['features/video-layout'].screenShares || [];+ const remoteScreenShares = state['features/video-layout'].remoteScreenShares || [];const largeVideoParticipantId = state['features/large-video'].participantId;const participantIsInLargeVideoWithScreen- = participant.id === largeVideoParticipantId && screenShares.includes(participant.id);+ = participant.id === largeVideoParticipantId && remoteScreenShares.includes(participant.id);return participantIsInLargeVideoWithScreen;}diff --git a/react/features/large-video/actions.any.js b/react/features/large-video/actions.any.jsindex ce17d5dc45..7035ff04f9 100644--- a/react/features/large-video/actions.any.js+++ b/react/features/large-video/actions.any.js@@ -61,11 +61,11 @@ export function selectParticipantInLargeVideo(participant: ?string) {const state = getState();const participantId = participant ?? _electParticipantInLargeVideo(state);const largeVideo = state['features/large-video'];- const screenShares = state['features/video-layout'].screenShares;+ const remoteScreenShares = state['features/video-layout'].remoteScreenShares;let latestScreenshareParticipantId;- if (screenShares && screenShares.length) {- latestScreenshareParticipantId = screenShares[screenShares.length - 1];+ if (remoteScreenShares && remoteScreenShares.length) {+ latestScreenshareParticipantId = remoteScreenShares[remoteScreenShares.length - 1];}// When trying to auto pin screenshare, always select the endpoint even though it happens to bediff --git a/react/features/video-layout/actionTypes.js b/react/features/video-layout/actionTypes.jsindex d0bcecb307..0b19fa84b3 100644--- a/react/features/video-layout/actionTypes.js+++ b/react/features/video-layout/actionTypes.js@@ -1,14 +1,14 @@/**- * The type of the action which sets the list of known participant IDs which+ * The type of the action which sets the list of known remote participant IDs which* have an active screen share.** @returns {{- * type: SCREEN_SHARE_PARTICIPANTS_UPDATED,+ * type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,* participantIds: Array<string>* }}*/-export const SCREEN_SHARE_PARTICIPANTS_UPDATED- = 'SCREEN_SHARE_PARTICIPANTS_UPDATED';+export const SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED+ = 'SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED';/*** The type of the action which enables or disables the feature for showingdiff --git a/react/features/video-layout/actions.js b/react/features/video-layout/actions.jsindex 1d957961f4..0494589f10 100644--- a/react/features/video-layout/actions.js+++ b/react/features/video-layout/actions.js@@ -3,25 +3,25 @@import type { Dispatch } from 'redux';import {- SCREEN_SHARE_PARTICIPANTS_UPDATED,+ SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,SET_TILE_VIEW} from './actionTypes';import { shouldDisplayTileView } from './functions';/**- * Creates a (redux) action which signals that the list of known participants+ * Creates a (redux) action which signals that the list of known remote participants* with screen shares has changed.*- * @param {string} participantIds - The participants which currently have active+ * @param {string} participantIds - The remote participants which currently have active* screen share streams.* @returns {{- * type: SCREEN_SHARE_PARTICIPANTS_UPDATED,+ * type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,* participantId: string* }}*/-export function setParticipantsWithScreenShare(participantIds: Array<string>) {+export function setRemoteParticipantsWithScreenShare(participantIds: Array<string>) {return {- type: SCREEN_SHARE_PARTICIPANTS_UPDATED,+ type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,participantIds};}diff --git a/react/features/video-layout/reducer.js b/react/features/video-layout/reducer.jsindex 01d7b70ad5..db4e744279 100644--- a/react/features/video-layout/reducer.js+++ b/react/features/video-layout/reducer.js@@ -3,12 +3,12 @@import { ReducerRegistry } from '../base/redux';import {- SCREEN_SHARE_PARTICIPANTS_UPDATED,+ SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,SET_TILE_VIEW} from './actionTypes';const DEFAULT_STATE = {- screenShares: [],+ remoteScreenShares: [],/*** The indicator which determines whether the video layout should display@@ -27,10 +27,10 @@ const STORE_NAME = 'features/video-layout';ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {switch (action.type) {- case SCREEN_SHARE_PARTICIPANTS_UPDATED: {+ case SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED: {return {...state,- screenShares: action.participantIds+ remoteScreenShares: action.participantIds};}diff --git a/react/features/video-layout/subscriber.js b/react/features/video-layout/subscriber.jsindex eecdfab93c..bf8584f707 100644--- a/react/features/video-layout/subscriber.js+++ b/react/features/video-layout/subscriber.js@@ -7,7 +7,7 @@ import { StateListenerRegistry, equals } from '../base/redux';import { isFollowMeActive } from '../follow-me';import { selectParticipant } from '../large-video/actions';-import { setParticipantsWithScreenShare } from './actions';+import { setRemoteParticipantsWithScreenShare } from './actions';declare var APP: Object;declare var interfaceConfig: Object;@@ -37,7 +37,7 @@ StateListenerRegistry.register(return;}- const oldScreenSharesOrder = store.getState()['features/video-layout'].screenShares || [];+ const oldScreenSharesOrder = store.getState()['features/video-layout'].remoteScreenShares || [];const knownSharingParticipantIds = tracks.reduce((acc, track) => {if (track.mediaType === 'video' && track.videoType === 'desktop') {const skipTrack = _getAutoPinSetting() === 'remote-only' && track.local;@@ -66,7 +66,7 @@ StateListenerRegistry.register(if (!equals(oldScreenSharesOrder, newScreenSharesOrder)) {store.dispatch(- setParticipantsWithScreenShare(newScreenSharesOrder));+ setRemoteParticipantsWithScreenShare(newScreenSharesOrder));_updateAutoPinnedParticipant(store);}@@ -96,14 +96,14 @@ function _getAutoPinSetting() {*/function _updateAutoPinnedParticipant({ dispatch, getState }) {const state = getState();- const screenShares = state['features/video-layout'].screenShares;+ const remoteScreenShares = state['features/video-layout'].remoteScreenShares;- if (!screenShares) {+ if (!remoteScreenShares) {return;}const latestScreenshareParticipantId- = screenShares[screenShares.length - 1];+ = remoteScreenShares[remoteScreenShares.length - 1];const pinned = getPinnedParticipant(getState);