Bläddra i källkod

chore(mobile) changes the name for screenShares to remoteScreenShares to better reflect it's content

master
Titus-Andrei Moldovan 4 år sedan
förälder
incheckning
af8072d9d2

+ 4
- 4
react/features/base/lastn/middleware.js Visa fil

@@ -3,7 +3,7 @@
3 3
 import { SET_FILMSTRIP_ENABLED } from '../../filmstrip/actionTypes';
4 4
 import { SELECT_LARGE_VIDEO_PARTICIPANT } from '../../large-video/actionTypes';
5 5
 import { APP_STATE_CHANGED } from '../../mobile/background/actionTypes';
6
-import { SCREEN_SHARE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';
6
+import { SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED, SET_TILE_VIEW } from '../../video-layout/actionTypes';
7 7
 import { SET_AUDIO_ONLY } from '../audio-only/actionTypes';
8 8
 import { CONFERENCE_JOINED } from '../conference/actionTypes';
9 9
 import {
@@ -33,7 +33,7 @@ MiddlewareRegistry.register(store => next => action => {
33 33
     case PARTICIPANT_JOINED:
34 34
     case PARTICIPANT_KICKED:
35 35
     case PARTICIPANT_LEFT:
36
-    case SCREEN_SHARE_PARTICIPANTS_UPDATED:
36
+    case SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED:
37 37
     case SELECT_LARGE_VIDEO_PARTICIPANT:
38 38
     case SET_AUDIO_ONLY:
39 39
     case SET_FILMSTRIP_ENABLED:
@@ -80,7 +80,7 @@ function _updateLastN({ getState }) {
80 80
     if (typeof appState !== 'undefined' && appState !== 'active') {
81 81
         lastN = isLocalVideoTrackDesktop(state) ? 1 : 0;
82 82
     } else if (audioOnly) {
83
-        const { screenShares, tileViewEnabled } = state['features/video-layout'];
83
+        const { remoteScreenShares, tileViewEnabled } = state['features/video-layout'];
84 84
         const largeVideoParticipantId = state['features/large-video'].participantId;
85 85
         const largeVideoParticipant
86 86
             = largeVideoParticipantId ? getParticipantById(state, largeVideoParticipantId) : undefined;
@@ -89,7 +89,7 @@ function _updateLastN({ getState }) {
89 89
         // view since we make an exception only for screenshare when in audio-only mode. If the user unpins
90 90
         // the screenshare, lastN will be set to 0 here. It will be set to 1 if screenshare has been auto pinned.
91 91
         if (!tileViewEnabled && largeVideoParticipant && !largeVideoParticipant.local) {
92
-            lastN = (screenShares || []).includes(largeVideoParticipantId) ? 1 : 0;
92
+            lastN = (remoteScreenShares || []).includes(largeVideoParticipantId) ? 1 : 0;
93 93
         } else {
94 94
             lastN = 0;
95 95
         }

+ 2
- 2
react/features/base/participants/functions.js Visa fil

@@ -360,10 +360,10 @@ export function shouldRenderParticipantVideo(stateful: Object | Function, id: st
360 360
     }
361 361
 
362 362
     /* Last, check if the participant is sharing their screen and they are on stage. */
363
-    const screenShares = state['features/video-layout'].screenShares || [];
363
+    const remoteScreenShares = state['features/video-layout'].remoteScreenShares || [];
364 364
     const largeVideoParticipantId = state['features/large-video'].participantId;
365 365
     const participantIsInLargeVideoWithScreen
366
-        = participant.id === largeVideoParticipantId && screenShares.includes(participant.id);
366
+        = participant.id === largeVideoParticipantId && remoteScreenShares.includes(participant.id);
367 367
 
368 368
     return participantIsInLargeVideoWithScreen;
369 369
 }

+ 3
- 3
react/features/large-video/actions.any.js Visa fil

@@ -61,11 +61,11 @@ export function selectParticipantInLargeVideo(participant: ?string) {
61 61
         const state = getState();
62 62
         const participantId = participant ?? _electParticipantInLargeVideo(state);
63 63
         const largeVideo = state['features/large-video'];
64
-        const screenShares = state['features/video-layout'].screenShares;
64
+        const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
65 65
         let latestScreenshareParticipantId;
66 66
 
67
-        if (screenShares && screenShares.length) {
68
-            latestScreenshareParticipantId = screenShares[screenShares.length - 1];
67
+        if (remoteScreenShares && remoteScreenShares.length) {
68
+            latestScreenshareParticipantId = remoteScreenShares[remoteScreenShares.length - 1];
69 69
         }
70 70
 
71 71
         // When trying to auto pin screenshare, always select the endpoint even though it happens to be

+ 4
- 4
react/features/video-layout/actionTypes.js Visa fil

@@ -1,14 +1,14 @@
1 1
 /**
2
- * The type of the action which sets the list of known participant IDs which
2
+ * The type of the action which sets the list of known remote participant IDs which
3 3
  * have an active screen share.
4 4
  *
5 5
  * @returns {{
6
- *     type: SCREEN_SHARE_PARTICIPANTS_UPDATED,
6
+ *     type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
7 7
  *     participantIds: Array<string>
8 8
  * }}
9 9
  */
10
-export const SCREEN_SHARE_PARTICIPANTS_UPDATED
11
-    = 'SCREEN_SHARE_PARTICIPANTS_UPDATED';
10
+export const SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED
11
+    = 'SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED';
12 12
 
13 13
 /**
14 14
  * The type of the action which enables or disables the feature for showing

+ 6
- 6
react/features/video-layout/actions.js Visa fil

@@ -3,25 +3,25 @@
3 3
 import type { Dispatch } from 'redux';
4 4
 
5 5
 import {
6
-    SCREEN_SHARE_PARTICIPANTS_UPDATED,
6
+    SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
7 7
     SET_TILE_VIEW
8 8
 } from './actionTypes';
9 9
 import { shouldDisplayTileView } from './functions';
10 10
 
11 11
 /**
12
- * Creates a (redux) action which signals that the list of known participants
12
+ * Creates a (redux) action which signals that the list of known remote participants
13 13
  * with screen shares has changed.
14 14
  *
15
- * @param {string} participantIds - The participants which currently have active
15
+ * @param {string} participantIds - The remote participants which currently have active
16 16
  * screen share streams.
17 17
  * @returns {{
18
- *     type: SCREEN_SHARE_PARTICIPANTS_UPDATED,
18
+ *     type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
19 19
  *     participantId: string
20 20
  * }}
21 21
  */
22
-export function setParticipantsWithScreenShare(participantIds: Array<string>) {
22
+export function setRemoteParticipantsWithScreenShare(participantIds: Array<string>) {
23 23
     return {
24
-        type: SCREEN_SHARE_PARTICIPANTS_UPDATED,
24
+        type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
25 25
         participantIds
26 26
     };
27 27
 }

+ 4
- 4
react/features/video-layout/reducer.js Visa fil

@@ -3,12 +3,12 @@
3 3
 import { ReducerRegistry } from '../base/redux';
4 4
 
5 5
 import {
6
-    SCREEN_SHARE_PARTICIPANTS_UPDATED,
6
+    SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
7 7
     SET_TILE_VIEW
8 8
 } from './actionTypes';
9 9
 
10 10
 const DEFAULT_STATE = {
11
-    screenShares: [],
11
+    remoteScreenShares: [],
12 12
 
13 13
     /**
14 14
      * The indicator which determines whether the video layout should display
@@ -27,10 +27,10 @@ const STORE_NAME = 'features/video-layout';
27 27
 
28 28
 ReducerRegistry.register(STORE_NAME, (state = DEFAULT_STATE, action) => {
29 29
     switch (action.type) {
30
-    case SCREEN_SHARE_PARTICIPANTS_UPDATED: {
30
+    case SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED: {
31 31
         return {
32 32
             ...state,
33
-            screenShares: action.participantIds
33
+            remoteScreenShares: action.participantIds
34 34
         };
35 35
     }
36 36
 

+ 6
- 6
react/features/video-layout/subscriber.js Visa fil

@@ -7,7 +7,7 @@ import { StateListenerRegistry, equals } from '../base/redux';
7 7
 import { isFollowMeActive } from '../follow-me';
8 8
 import { selectParticipant } from '../large-video/actions';
9 9
 
10
-import { setParticipantsWithScreenShare } from './actions';
10
+import { setRemoteParticipantsWithScreenShare } from './actions';
11 11
 
12 12
 declare var APP: Object;
13 13
 declare var interfaceConfig: Object;
@@ -37,7 +37,7 @@ StateListenerRegistry.register(
37 37
             return;
38 38
         }
39 39
 
40
-        const oldScreenSharesOrder = store.getState()['features/video-layout'].screenShares || [];
40
+        const oldScreenSharesOrder = store.getState()['features/video-layout'].remoteScreenShares || [];
41 41
         const knownSharingParticipantIds = tracks.reduce((acc, track) => {
42 42
             if (track.mediaType === 'video' && track.videoType === 'desktop') {
43 43
                 const skipTrack = _getAutoPinSetting() === 'remote-only' && track.local;
@@ -66,7 +66,7 @@ StateListenerRegistry.register(
66 66
 
67 67
         if (!equals(oldScreenSharesOrder, newScreenSharesOrder)) {
68 68
             store.dispatch(
69
-                setParticipantsWithScreenShare(newScreenSharesOrder));
69
+                setRemoteParticipantsWithScreenShare(newScreenSharesOrder));
70 70
 
71 71
             _updateAutoPinnedParticipant(store);
72 72
         }
@@ -96,14 +96,14 @@ function _getAutoPinSetting() {
96 96
  */
97 97
 function _updateAutoPinnedParticipant({ dispatch, getState }) {
98 98
     const state = getState();
99
-    const screenShares = state['features/video-layout'].screenShares;
99
+    const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
100 100
 
101
-    if (!screenShares) {
101
+    if (!remoteScreenShares) {
102 102
         return;
103 103
     }
104 104
 
105 105
     const latestScreenshareParticipantId
106
-        = screenShares[screenShares.length - 1];
106
+        = remoteScreenShares[remoteScreenShares.length - 1];
107 107
 
108 108
     const pinned = getPinnedParticipant(getState);
109 109
 

Laddar…
Avbryt
Spara