浏览代码

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

master
Titus-Andrei Moldovan 4 年前
父节点
当前提交
af8072d9d2

+ 4
- 4
react/features/base/lastn/middleware.js 查看文件

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

+ 2
- 2
react/features/base/participants/functions.js 查看文件

360
     }
360
     }
361
 
361
 
362
     /* Last, check if the participant is sharing their screen and they are on stage. */
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
     const largeVideoParticipantId = state['features/large-video'].participantId;
364
     const largeVideoParticipantId = state['features/large-video'].participantId;
365
     const participantIsInLargeVideoWithScreen
365
     const participantIsInLargeVideoWithScreen
366
-        = participant.id === largeVideoParticipantId && screenShares.includes(participant.id);
366
+        = participant.id === largeVideoParticipantId && remoteScreenShares.includes(participant.id);
367
 
367
 
368
     return participantIsInLargeVideoWithScreen;
368
     return participantIsInLargeVideoWithScreen;
369
 }
369
 }

+ 3
- 3
react/features/large-video/actions.any.js 查看文件

61
         const state = getState();
61
         const state = getState();
62
         const participantId = participant ?? _electParticipantInLargeVideo(state);
62
         const participantId = participant ?? _electParticipantInLargeVideo(state);
63
         const largeVideo = state['features/large-video'];
63
         const largeVideo = state['features/large-video'];
64
-        const screenShares = state['features/video-layout'].screenShares;
64
+        const remoteScreenShares = state['features/video-layout'].remoteScreenShares;
65
         let latestScreenshareParticipantId;
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
         // When trying to auto pin screenshare, always select the endpoint even though it happens to be
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 查看文件

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
  * have an active screen share.
3
  * have an active screen share.
4
  *
4
  *
5
  * @returns {{
5
  * @returns {{
6
- *     type: SCREEN_SHARE_PARTICIPANTS_UPDATED,
6
+ *     type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
7
  *     participantIds: Array<string>
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
  * The type of the action which enables or disables the feature for showing
14
  * The type of the action which enables or disables the feature for showing

+ 6
- 6
react/features/video-layout/actions.js 查看文件

3
 import type { Dispatch } from 'redux';
3
 import type { Dispatch } from 'redux';
4
 
4
 
5
 import {
5
 import {
6
-    SCREEN_SHARE_PARTICIPANTS_UPDATED,
6
+    SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
7
     SET_TILE_VIEW
7
     SET_TILE_VIEW
8
 } from './actionTypes';
8
 } from './actionTypes';
9
 import { shouldDisplayTileView } from './functions';
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
  * with screen shares has changed.
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
  * screen share streams.
16
  * screen share streams.
17
  * @returns {{
17
  * @returns {{
18
- *     type: SCREEN_SHARE_PARTICIPANTS_UPDATED,
18
+ *     type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
19
  *     participantId: string
19
  *     participantId: string
20
  * }}
20
  * }}
21
  */
21
  */
22
-export function setParticipantsWithScreenShare(participantIds: Array<string>) {
22
+export function setRemoteParticipantsWithScreenShare(participantIds: Array<string>) {
23
     return {
23
     return {
24
-        type: SCREEN_SHARE_PARTICIPANTS_UPDATED,
24
+        type: SCREEN_SHARE_REMOTE_PARTICIPANTS_UPDATED,
25
         participantIds
25
         participantIds
26
     };
26
     };
27
 }
27
 }

+ 4
- 4
react/features/video-layout/reducer.js 查看文件

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

+ 6
- 6
react/features/video-layout/subscriber.js 查看文件

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

正在加载...
取消
保存