浏览代码

ref(TS) Convert some features to TS (#12523)

factor2
Robert Pintilii 2 年前
父节点
当前提交
4bd27730ce
没有帐户链接到提交者的电子邮件
共有 60 个文件被更改,包括 410 次插入374 次删除
  1. 1
    1
      react/features/app/functions.native.ts
  2. 6
    9
      react/features/authentication/actions.native.ts
  3. 5
    6
      react/features/authentication/functions.ts
  4. 13
    15
      react/features/authentication/middleware.native.ts
  5. 12
    10
      react/features/authentication/middleware.web.ts
  6. 3
    1
      react/features/authentication/reducer.ts
  7. 1
    1
      react/features/base/conference/actions.ts
  8. 1
    0
      react/features/base/config/configType.ts
  9. 20
    0
      react/features/base/config/functions.any.ts
  10. 0
    20
      react/features/base/config/functions.web.ts
  11. 1
    1
      react/features/base/environment/environment.ts
  12. 1
    1
      react/features/base/media/functions.ts
  13. 1
    1
      react/features/base/participants/actions.ts
  14. 10
    13
      react/features/conference/actions.native.ts
  15. 7
    13
      react/features/conference/actions.web.ts
  16. 5
    4
      react/features/conference/functions.any.ts
  17. 3
    4
      react/features/conference/functions.native.ts
  18. 6
    4
      react/features/conference/functions.web.ts
  19. 0
    2
      react/features/conference/logger.ts
  20. 15
    14
      react/features/conference/middleware.ts
  21. 1
    1
      react/features/connection-indicator/functions.ts
  22. 0
    1
      react/features/dropbox/actions.ts
  23. 3
    4
      react/features/dropbox/functions.any.ts
  24. 14
    8
      react/features/dropbox/functions.native.ts
  25. 14
    9
      react/features/dropbox/functions.web.ts
  26. 0
    2
      react/features/dropbox/logger.ts
  27. 0
    2
      react/features/filmstrip/actions.any.ts
  28. 4
    4
      react/features/filmstrip/actions.native.ts
  29. 39
    38
      react/features/filmstrip/actions.web.ts
  30. 1
    1
      react/features/filmstrip/components/web/Filmstrip.tsx
  31. 1
    1
      react/features/filmstrip/components/web/PinnedIndicator.tsx
  32. 8
    4
      react/features/filmstrip/functions.any.ts
  33. 39
    19
      react/features/filmstrip/functions.native.ts
  34. 69
    46
      react/features/filmstrip/functions.web.ts
  35. 0
    2
      react/features/filmstrip/logger.ts
  36. 6
    8
      react/features/filmstrip/middleware.native.ts
  37. 20
    21
      react/features/filmstrip/middleware.web.ts
  38. 1
    3
      react/features/filmstrip/subscriber.any.ts
  39. 3
    5
      react/features/filmstrip/subscriber.native.ts
  40. 11
    10
      react/features/filmstrip/subscriber.web.ts
  41. 1
    1
      react/features/follow-me/subscriber.ts
  42. 1
    0
      react/features/notifications/types.ts
  43. 6
    5
      react/features/overlay/functions.ts
  44. 0
    2
      react/features/overlay/logger.ts
  45. 10
    13
      react/features/overlay/middleware.ts
  46. 0
    16
      react/features/overlay/overlays.native.js
  47. 15
    0
      react/features/overlay/overlays.native.ts
  48. 2
    2
      react/features/overlay/overlays.web.ts
  49. 1
    1
      react/features/prejoin/functions.ts
  50. 13
    1
      react/features/reactions/actions.any.ts
  51. 1
    0
      react/features/reactions/actions.native.ts
  52. 2
    12
      react/features/reactions/actions.web.ts
  53. 2
    2
      react/features/reactions/middleware.ts
  54. 2
    2
      react/features/screen-share/actions.web.ts
  55. 2
    2
      react/features/screen-share/components/web/ShareAudioDialog.tsx
  56. 1
    1
      react/features/settings/middleware.web.ts
  57. 1
    1
      react/features/toolbox/actions.any.ts
  58. 1
    1
      react/features/video-layout/functions.web.ts
  59. 2
    2
      react/features/video-layout/subscriber.ts
  60. 2
    1
      react/features/video-quality/subscriber.ts

+ 1
- 1
react/features/app/functions.native.ts 查看文件

2
 
2
 
3
 import { IStateful } from '../base/app/types';
3
 import { IStateful } from '../base/app/types';
4
 import { toState } from '../base/redux/functions';
4
 import { toState } from '../base/redux/functions';
5
-import { getServerURL } from '../base/settings/functions';
5
+import { getServerURL } from '../base/settings/functions.native';
6
 
6
 
7
 export * from './functions.any';
7
 export * from './functions.any';
8
 
8
 

react/features/authentication/actions.native.js → react/features/authentication/actions.native.ts 查看文件

1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
 import { appNavigate } from '../app/actions';
1
 import { appNavigate } from '../app/actions';
2
+import { IStore } from '../app/types';
6
 import { conferenceLeft } from '../base/conference/actions';
3
 import { conferenceLeft } from '../base/conference/actions';
7
 import { connectionFailed } from '../base/connection/actions.native';
4
 import { connectionFailed } from '../base/connection/actions.native';
8
-import { set } from '../base/redux';
5
+import { set } from '../base/redux/functions';
9
 
6
 
10
 import { CANCEL_LOGIN } from './actionTypes';
7
 import { CANCEL_LOGIN } from './actionTypes';
11
 import { stopWaitForOwner } from './actions.any';
8
 import { stopWaitForOwner } from './actions.any';
20
  * }}
17
  * }}
21
  */
18
  */
22
 export function cancelLogin() {
19
 export function cancelLogin() {
23
-    return (dispatch: Dispatch<any>, getState: Function) => {
20
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
24
         dispatch({ type: CANCEL_LOGIN });
21
         dispatch({ type: CANCEL_LOGIN });
25
 
22
 
26
         // XXX The error associated with CONNECTION_FAILED was marked as
23
         // XXX The error associated with CONNECTION_FAILED was marked as
36
         passwordRequired
33
         passwordRequired
37
             && dispatch(
34
             && dispatch(
38
                 connectionFailed(
35
                 connectionFailed(
39
-                    passwordRequired,
40
-                    set(error, 'recoverable', false)));
36
+                    passwordRequired, // @ts-ignore
37
+                    set(error, 'recoverable', false) as any));
41
     };
38
     };
42
 }
39
 }
43
 
40
 
47
  * @returns {Function}
44
  * @returns {Function}
48
  */
45
  */
49
 export function cancelWaitForOwner() {
46
 export function cancelWaitForOwner() {
50
-    return (dispatch: Dispatch<any>, getState: Function) => {
47
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
51
         dispatch(stopWaitForOwner());
48
         dispatch(stopWaitForOwner());
52
 
49
 
53
         // XXX The error associated with CONFERENCE_FAILED was marked as
50
         // XXX The error associated with CONFERENCE_FAILED was marked as

react/features/authentication/functions.js → react/features/authentication/functions.ts 查看文件

1
-// @flow
2
-
3
-import JitsiMeetJS from '../../../react/features/base/lib-jitsi-meet';
1
+import { IConfig } from '../base/config/configType';
2
+import JitsiMeetJS from '../base/lib-jitsi-meet';
4
 
3
 
5
 
4
 
6
 /**
5
 /**
9
  * @param {Object} config - Configuration state object from store.
8
  * @param {Object} config - Configuration state object from store.
10
  * @returns {boolean}
9
  * @returns {boolean}
11
  */
10
  */
12
-export const isTokenAuthEnabled = (config: Object) =>
11
+export const isTokenAuthEnabled = (config: IConfig) =>
13
     typeof config.tokenAuthUrl === 'string'
12
     typeof config.tokenAuthUrl === 'string'
14
     && config.tokenAuthUrl.length;
13
     && config.tokenAuthUrl.length;
15
 
14
 
20
  * @param {Object} config - Configuration state object from store.
19
  * @param {Object} config - Configuration state object from store.
21
  * @returns {string}
20
  * @returns {string}
22
  */
21
  */
23
-export const getTokenAuthUrl = (config: Object) =>
22
+export const getTokenAuthUrl = (config: IConfig) =>
24
     JitsiMeetJS.util.AuthUtil.getTokenAuthUrl.bind(null,
23
     JitsiMeetJS.util.AuthUtil.getTokenAuthUrl.bind(null,
25
-         config.tokenAuthUrl);
24
+        config.tokenAuthUrl);

react/features/authentication/middleware.native.js → react/features/authentication/middleware.native.ts 查看文件

1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
-import { appNavigate } from '../app/actions';
1
+import { appNavigate } from '../app/actions.native';
2
+import { IStore } from '../app/types';
6
 import {
3
 import {
7
     CONFERENCE_FAILED,
4
     CONFERENCE_FAILED,
8
     CONFERENCE_JOINED,
5
     CONFERENCE_JOINED,
9
     CONFERENCE_LEFT
6
     CONFERENCE_LEFT
10
-} from '../base/conference';
11
-import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../base/connection';
12
-import { hideDialog, isDialogOpen } from '../base/dialog';
7
+} from '../base/conference/actionTypes';
8
+import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../base/connection/actionTypes';
9
+import { hideDialog } from '../base/dialog/actions';
10
+import { isDialogOpen } from '../base/dialog/functions';
13
 import {
11
 import {
14
     JitsiConferenceErrors,
12
     JitsiConferenceErrors,
15
     JitsiConnectionErrors
13
     JitsiConnectionErrors
16
 } from '../base/lib-jitsi-meet';
14
 } from '../base/lib-jitsi-meet';
17
-import { MiddlewareRegistry } from '../base/redux';
15
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
18
 
16
 
19
 import {
17
 import {
20
     CANCEL_LOGIN,
18
     CANCEL_LOGIN,
26
     openLoginDialog,
24
     openLoginDialog,
27
     openWaitForOwnerDialog,
25
     openWaitForOwnerDialog,
28
     stopWaitForOwner,
26
     stopWaitForOwner,
29
-    waitForOwner } from './actions.native';
27
+    waitForOwner } from './actions.native'; // @ts-ignore
30
 import { LoginDialog, WaitForOwnerDialog } from './components';
28
 import { LoginDialog, WaitForOwnerDialog } from './components';
31
 
29
 
32
 /**
30
 /**
44
         const { dispatch, getState } = store;
42
         const { dispatch, getState } = store;
45
         const { thenableWithCancel } = getState()['features/authentication'];
43
         const { thenableWithCancel } = getState()['features/authentication'];
46
 
44
 
47
-        thenableWithCancel && thenableWithCancel.cancel();
45
+        thenableWithCancel?.cancel();
48
 
46
 
49
         // The LoginDialog can be opened on top of "wait for owner". The app
47
         // The LoginDialog can be opened on top of "wait for owner". The app
50
         // should navigate only if LoginDialog was open without the
48
         // should navigate only if LoginDialog was open without the
142
     case WAIT_FOR_OWNER: {
140
     case WAIT_FOR_OWNER: {
143
         _clearExistingWaitForOwnerTimeout(store);
141
         _clearExistingWaitForOwnerTimeout(store);
144
 
142
 
145
-        const { handler, timeoutMs } = action;
143
+        const { handler, timeoutMs }: { handler: () => void; timeoutMs: number; } = action;
146
 
144
 
147
         action.waitForOwnerTimeoutID = setTimeout(handler, timeoutMs);
145
         action.waitForOwnerTimeoutID = setTimeout(handler, timeoutMs);
148
 
146
 
165
  * @returns {void}
163
  * @returns {void}
166
  */
164
  */
167
 function _clearExistingWaitForOwnerTimeout(
165
 function _clearExistingWaitForOwnerTimeout(
168
-        { getState }: { getState: Function }) {
166
+        { getState }: IStore) {
169
     const { waitForOwnerTimeoutID } = getState()['features/authentication'];
167
     const { waitForOwnerTimeoutID } = getState()['features/authentication'];
170
 
168
 
171
     waitForOwnerTimeoutID && clearTimeout(waitForOwnerTimeoutID);
169
     waitForOwnerTimeoutID && clearTimeout(waitForOwnerTimeoutID);
177
  * @param {Object} store - The redux store.
175
  * @param {Object} store - The redux store.
178
  * @returns {void}
176
  * @returns {void}
179
  */
177
  */
180
-function _hideLoginDialog({ dispatch }: { dispatch: Dispatch<any> }) {
178
+function _hideLoginDialog({ dispatch }: IStore) {
181
     dispatch(hideDialog(LoginDialog));
179
     dispatch(hideDialog(LoginDialog));
182
 }
180
 }
183
 
181
 
187
  * @param {Object} store - The redux store.
185
  * @param {Object} store - The redux store.
188
  * @returns {boolean}
186
  * @returns {boolean}
189
  */
187
  */
190
-function _isWaitingForOwner({ getState }: { getState: Function }) {
188
+function _isWaitingForOwner({ getState }: IStore) {
191
     return Boolean(getState()['features/authentication'].waitForOwnerTimeoutID);
189
     return Boolean(getState()['features/authentication'].waitForOwnerTimeoutID);
192
 }
190
 }

react/features/authentication/middleware.web.js → react/features/authentication/middleware.web.ts 查看文件

1
-// @flow
2
-
3
-import { maybeRedirectToWelcomePage } from '../app/actions';
1
+import { maybeRedirectToWelcomePage } from '../app/actions.web';
2
+import { IStore } from '../app/types';
4
 import {
3
 import {
5
     CONFERENCE_FAILED,
4
     CONFERENCE_FAILED,
6
     CONFERENCE_JOINED,
5
     CONFERENCE_JOINED,
7
     CONFERENCE_LEFT
6
     CONFERENCE_LEFT
8
-} from '../base/conference';
9
-import { CONNECTION_ESTABLISHED } from '../base/connection';
10
-import { hideDialog, isDialogOpen } from '../base/dialog';
7
+} from '../base/conference/actionTypes';
8
+import { CONNECTION_ESTABLISHED } from '../base/connection/actionTypes';
9
+import { hideDialog } from '../base/dialog/actions';
10
+import { isDialogOpen } from '../base/dialog/functions';
11
 import {
11
 import {
12
     JitsiConferenceErrors
12
     JitsiConferenceErrors
13
 } from '../base/lib-jitsi-meet';
13
 } from '../base/lib-jitsi-meet';
14
-import { MiddlewareRegistry } from '../base/redux';
14
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
15
 
15
 
16
 import {
16
 import {
17
     CANCEL_LOGIN,
17
     CANCEL_LOGIN,
24
     openWaitForOwnerDialog,
24
     openWaitForOwnerDialog,
25
     stopWaitForOwner
25
     stopWaitForOwner
26
 } from './actions.web';
26
 } from './actions.web';
27
+// eslint-disable-next-line lines-around-comment
28
+// @ts-ignore
27
 import { LoginDialog, WaitForOwnerDialog } from './components';
29
 import { LoginDialog, WaitForOwnerDialog } from './components';
28
 
30
 
29
 /**
31
 /**
113
     case WAIT_FOR_OWNER: {
115
     case WAIT_FOR_OWNER: {
114
         _clearExistingWaitForOwnerTimeout(store);
116
         _clearExistingWaitForOwnerTimeout(store);
115
 
117
 
116
-        const { handler, timeoutMs } = action;
118
+        const { handler, timeoutMs }: { handler: () => void; timeoutMs: number; } = action;
117
 
119
 
118
         action.waitForOwnerTimeoutID = setTimeout(handler, timeoutMs);
120
         action.waitForOwnerTimeoutID = setTimeout(handler, timeoutMs);
119
 
121
 
134
  * @returns {void}
136
  * @returns {void}
135
  */
137
  */
136
 function _clearExistingWaitForOwnerTimeout(
138
 function _clearExistingWaitForOwnerTimeout(
137
-        { getState }: { getState: Function }) {
139
+        { getState }: IStore) {
138
     const { waitForOwnerTimeoutID } = getState()['features/authentication'];
140
     const { waitForOwnerTimeoutID } = getState()['features/authentication'];
139
 
141
 
140
     waitForOwnerTimeoutID && clearTimeout(waitForOwnerTimeoutID);
142
     waitForOwnerTimeoutID && clearTimeout(waitForOwnerTimeoutID);
146
  * @param {Object} store - The redux store.
148
  * @param {Object} store - The redux store.
147
  * @returns {void}
149
  * @returns {void}
148
  */
150
  */
149
-function _isWaitingForOwner({ getState }: { getState: Function }) {
151
+function _isWaitingForOwner({ getState }: IStore) {
150
     return getState()['features/authentication'].waitForOwnerTimeoutID;
152
     return getState()['features/authentication'].waitForOwnerTimeoutID;
151
 }
153
 }

+ 3
- 1
react/features/authentication/reducer.ts 查看文件

12
 export interface IAuthenticationState {
12
 export interface IAuthenticationState {
13
     error?: Object | undefined;
13
     error?: Object | undefined;
14
     progress?: number | undefined;
14
     progress?: number | undefined;
15
-    thenableWithCancel?: Object | undefined;
15
+    thenableWithCancel?: {
16
+        cancel: Function;
17
+    };
16
     waitForOwnerTimeoutID?: number;
18
     waitForOwnerTimeoutID?: number;
17
 }
19
 }
18
 
20
 

+ 1
- 1
react/features/base/conference/actions.ts 查看文件

377
  *     conference: JitsiConference
377
  *     conference: JitsiConference
378
  * }}
378
  * }}
379
  */
379
  */
380
-export function conferenceLeft(conference: IJitsiConference) {
380
+export function conferenceLeft(conference: Partial<IJitsiConference>) {
381
     return {
381
     return {
382
         type: CONFERENCE_LEFT,
382
         type: CONFERENCE_LEFT,
383
         conference
383
         conference

+ 1
- 0
react/features/base/config/configType.ts 查看文件

456
     tileView?: {
456
     tileView?: {
457
         numberOfVisibleTiles?: number;
457
         numberOfVisibleTiles?: number;
458
     };
458
     };
459
+    tokenAuthUrl?: string;
459
     toolbarButtons?: Array<ToolbarButtons>;
460
     toolbarButtons?: Array<ToolbarButtons>;
460
     toolbarConfig?: {
461
     toolbarConfig?: {
461
         alwaysVisible?: boolean;
462
         alwaysVisible?: boolean;

+ 20
- 0
react/features/base/config/functions.any.ts 查看文件

286
 }
286
 }
287
 
287
 
288
 /* eslint-enable max-params */
288
 /* eslint-enable max-params */
289
+
290
+/**
291
+ * Returns the dial out url.
292
+ *
293
+ * @param {Object} state - The state of the app.
294
+ * @returns {string}
295
+ */
296
+export function getDialOutStatusUrl(state: IReduxState) {
297
+    return state['features/base/config'].guestDialOutStatusUrl;
298
+}
299
+
300
+/**
301
+ * Returns the dial out status url.
302
+ *
303
+ * @param {Object} state - The state of the app.
304
+ * @returns {string}
305
+ */
306
+export function getDialOutUrl(state: IReduxState) {
307
+    return state['features/base/config'].guestDialOutUrl;
308
+}

+ 0
- 20
react/features/base/config/functions.web.ts 查看文件

14
 export function _cleanupConfig(config: IConfig) { // eslint-disable-line @typescript-eslint/no-unused-vars
14
 export function _cleanupConfig(config: IConfig) { // eslint-disable-line @typescript-eslint/no-unused-vars
15
 }
15
 }
16
 
16
 
17
-/**
18
- * Returns the dial out url.
19
- *
20
- * @param {Object} state - The state of the app.
21
- * @returns {string}
22
- */
23
-export function getDialOutStatusUrl(state: IReduxState): string | undefined {
24
-    return state['features/base/config'].guestDialOutStatusUrl;
25
-}
26
-
27
-/**
28
- * Returns the dial out status url.
29
- *
30
- * @param {Object} state - The state of the app.
31
- * @returns {string}
32
- */
33
-export function getDialOutUrl(state: IReduxState): string | undefined {
34
-    return state['features/base/config'].guestDialOutUrl;
35
-}
36
-
37
 /**
17
 /**
38
  * Returns the replaceParticipant config.
18
  * Returns the replaceParticipant config.
39
  *
19
  *

+ 1
- 1
react/features/base/environment/environment.ts 查看文件

1
 import JitsiMeetJS from '../lib-jitsi-meet';
1
 import JitsiMeetJS from '../lib-jitsi-meet';
2
-import Platform from '../react/Platform.web';
2
+import Platform from '../react/Platform';
3
 
3
 
4
 import { isMobileBrowser } from './utils';
4
 import { isMobileBrowser } from './utils';
5
 
5
 

+ 1
- 1
react/features/base/media/functions.ts 查看文件

1
 import { IStateful } from '../app/types';
1
 import { IStateful } from '../app/types';
2
 import { toState } from '../redux/functions';
2
 import { toState } from '../redux/functions';
3
-import { getPropertyValue } from '../settings/functions.any';
3
+import { getPropertyValue } from '../settings/functions';
4
 
4
 
5
 import { VIDEO_MUTISM_AUTHORITY } from './constants';
5
 import { VIDEO_MUTISM_AUTHORITY } from './constants';
6
 
6
 

+ 1
- 1
react/features/base/participants/actions.ts 查看文件

540
  *     }
540
  *     }
541
  * }}
541
  * }}
542
  */
542
  */
543
-export function pinParticipant(id: string | null) {
543
+export function pinParticipant(id?: string | null) {
544
     return {
544
     return {
545
         type: PIN_PARTICIPANT,
545
         type: PIN_PARTICIPANT,
546
         participant: {
546
         participant: {

react/features/conference/actions.native.js → react/features/conference/actions.native.ts 查看文件

1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
-import {
6
-    AlertDialog,
7
-    openDialog
8
-} from '../base/dialog';
9
-import { getParticipantDisplayName } from '../base/participants';
1
+import { IStore } from '../app/types';
2
+import { openDialog } from '../base/dialog/actions';
3
+// eslint-disable-next-line lines-around-comment
4
+// @ts-ignore
5
+import { AlertDialog } from '../base/dialog/components/native';
6
+import { getParticipantDisplayName } from '../base/participants/functions';
10
 
7
 
11
 /**
8
 /**
12
  * Notify that we've been kicked out of the conference.
9
  * Notify that we've been kicked out of the conference.
16
  * @param {?Function} submit - The function to execute after submiting the dialog.
13
  * @param {?Function} submit - The function to execute after submiting the dialog.
17
  * @returns {Function}
14
  * @returns {Function}
18
  */
15
  */
19
-export function notifyKickedOut(participant: Object, submit: ?Function) {
20
-    return (dispatch: Dispatch<any>, getState: Function) => {
21
-        if (!participant || (participant.isReplaced && participant.isReplaced())) {
22
-            submit && submit();
16
+export function notifyKickedOut(participant: any, submit?: Function) {
17
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
18
+        if (!participant || participant?.isReplaced?.()) {
19
+            submit?.();
23
 
20
 
24
             return;
21
             return;
25
         }
22
         }

react/features/conference/actions.web.js → react/features/conference/actions.web.ts 查看文件

1
-// @flow
2
-
3
-import type { Dispatch } from 'redux';
4
-
5
-import { getParticipantDisplayName } from '../base/participants';
6
-import {
7
-    NOTIFICATION_TIMEOUT_TYPE,
8
-    NOTIFICATION_TYPE,
9
-    showNotification
10
-} from '../notifications';
1
+import { IStore } from '../app/types';
2
+import { getParticipantDisplayName } from '../base/participants/functions';
3
+import { showNotification } from '../notifications/actions';
4
+import { NOTIFICATION_TIMEOUT_TYPE, NOTIFICATION_TYPE } from '../notifications/constants';
11
 
5
 
12
 /**
6
 /**
13
  * Notify that we've been kicked out of the conference.
7
  * Notify that we've been kicked out of the conference.
17
  * @param {?Function} _ - Used only in native code.
11
  * @param {?Function} _ - Used only in native code.
18
  * @returns {Function}
12
  * @returns {Function}
19
  */
13
  */
20
-export function notifyKickedOut(participant: Object, _: ?Function) { // eslint-disable-line no-unused-vars
21
-    return (dispatch: Dispatch<any>, getState: Function) => {
22
-        if (!participant || (participant.isReplaced && participant.isReplaced())) {
14
+export function notifyKickedOut(participant: any, _?: Function) {
15
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
16
+        if (!participant || participant?.isReplaced()) {
23
             return;
17
             return;
24
         }
18
         }
25
 
19
 

react/features/conference/functions.any.js → react/features/conference/functions.any.ts 查看文件

1
-import { toState } from '../base/redux';
2
-import { areThereNotifications } from '../notifications';
3
-import { getOverlayToRender } from '../overlay';
1
+import { IStateful } from '../base/app/types';
2
+import { toState } from '../base/redux/functions';
3
+import { areThereNotifications } from '../notifications/functions';
4
+import { getOverlayToRender } from '../overlay/functions';
4
 
5
 
5
 /**
6
 /**
6
  * Tells whether or not the notifications should be displayed within
7
  * Tells whether or not the notifications should be displayed within
9
  * @param {Object|Function} stateful - The redux store state.
10
  * @param {Object|Function} stateful - The redux store state.
10
  * @returns {boolean}
11
  * @returns {boolean}
11
  */
12
  */
12
-export function shouldDisplayNotifications(stateful) {
13
+export function shouldDisplayNotifications(stateful: IStateful) {
13
     const state = toState(stateful);
14
     const state = toState(stateful);
14
     const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
15
     const isAnyOverlayVisible = Boolean(getOverlayToRender(state));
15
     const { calleeInfoVisible } = state['features/invite'];
16
     const { calleeInfoVisible } = state['features/invite'];

react/features/conference/functions.native.js → react/features/conference/functions.native.ts 查看文件

1
-// @flow
2
-
3
-import { toState } from '../base/redux';
1
+import { IStateful } from '../base/app/types';
2
+import { toState } from '../base/redux/functions';
4
 
3
 
5
 export * from './functions.any';
4
 export * from './functions.any';
6
 
5
 
14
  * features/base/config.
13
  * features/base/config.
15
  * @returns {boolean}.
14
  * @returns {boolean}.
16
  */
15
  */
17
-export function getDisablePolls(stateful: Object) {
16
+export function getDisablePolls(stateful: IStateful) {
18
     const state = toState(stateful)['features/base/config'];
17
     const state = toState(stateful)['features/base/config'];
19
 
18
 
20
     return state.disablePolls;
19
     return state.disablePolls;

react/features/conference/functions.web.js → react/features/conference/functions.web.ts 查看文件

1
-import { isSuboptimalBrowser } from '../base/environment';
2
-import { translateToHTML } from '../base/i18n';
3
-import { NOTIFICATION_TIMEOUT_TYPE, showWarningNotification } from '../notifications';
1
+import { IStore } from '../app/types';
2
+import { isSuboptimalBrowser } from '../base/environment/environment';
3
+import { translateToHTML } from '../base/i18n/functions';
4
+import { showWarningNotification } from '../notifications/actions';
5
+import { NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
4
 
6
 
5
 export * from './functions.any';
7
 export * from './functions.any';
6
 
8
 
11
  * @param {Function} t - The translation function.
13
  * @param {Function} t - The translation function.
12
  * @returns {void}
14
  * @returns {void}
13
  */
15
  */
14
-export function maybeShowSuboptimalExperienceNotification(dispatch, t) {
16
+export function maybeShowSuboptimalExperienceNotification(dispatch: IStore['dispatch'], t: Function) {
15
     if (isSuboptimalBrowser()) {
17
     if (isSuboptimalBrowser()) {
16
         dispatch(
18
         dispatch(
17
             showWarningNotification(
19
             showWarningNotification(

react/features/conference/logger.js → react/features/conference/logger.ts 查看文件

1
-// @flow
2
-
3
 import { getLogger } from '../base/logging/functions';
1
 import { getLogger } from '../base/logging/functions';
4
 
2
 
5
 export default getLogger('features/conference');
3
 export default getLogger('features/conference');

react/features/conference/middleware.js → react/features/conference/middleware.ts 查看文件

1
-// @flow
2
 import { appNavigate } from '../app/actions';
1
 import { appNavigate } from '../app/actions';
3
-import {
4
-    CONFERENCE_JOINED,
5
-    KICKED_OUT,
6
-    conferenceLeft,
7
-    getCurrentConference
8
-} from '../base/conference';
9
-import { hideDialog, isDialogOpen } from '../base/dialog';
10
-import { pinParticipant } from '../base/participants';
11
-import { MiddlewareRegistry, StateListenerRegistry } from '../base/redux';
12
-import { SET_REDUCED_UI } from '../base/responsive-ui';
2
+import { IStore } from '../app/types';
3
+import { CONFERENCE_JOINED, KICKED_OUT } from '../base/conference/actionTypes';
4
+import { conferenceLeft } from '../base/conference/actions';
5
+import { getCurrentConference } from '../base/conference/functions';
6
+import { hideDialog } from '../base/dialog/actions';
7
+import { isDialogOpen } from '../base/dialog/functions';
8
+import { pinParticipant } from '../base/participants/actions';
9
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
10
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
11
+import { SET_REDUCED_UI } from '../base/responsive-ui/actionTypes';
12
+// eslint-disable-next-line lines-around-comment
13
+// @ts-ignore
13
 import { FeedbackDialog } from '../feedback';
14
 import { FeedbackDialog } from '../feedback';
14
-import { setFilmstripEnabled } from '../filmstrip';
15
+import { setFilmstripEnabled } from '../filmstrip/actions';
15
 import { showSalesforceNotification } from '../salesforce/actions';
16
 import { showSalesforceNotification } from '../salesforce/actions';
16
 import { setToolboxEnabled } from '../toolbox/actions';
17
 import { setToolboxEnabled } from '../toolbox/actions';
17
 
18
 
90
  * @private
91
  * @private
91
  * @returns {void}
92
  * @returns {void}
92
  */
93
  */
93
-function _setReducedUI({ dispatch, getState }) {
94
+function _setReducedUI({ dispatch, getState }: IStore) {
94
     const { reducedUI } = getState()['features/base/responsive-ui'];
95
     const { reducedUI } = getState()['features/base/responsive-ui'];
95
 
96
 
96
     dispatch(setToolboxEnabled(!reducedUI));
97
     dispatch(setToolboxEnabled(!reducedUI));
106
  * @private
107
  * @private
107
  * @returns {void}
108
  * @returns {void}
108
  */
109
  */
109
-function _conferenceJoined({ dispatch, getState }) {
110
+function _conferenceJoined({ dispatch, getState }: IStore) {
110
     _setReducedUI({
111
     _setReducedUI({
111
         dispatch,
112
         dispatch,
112
         getState
113
         getState

+ 1
- 1
react/features/connection-indicator/functions.ts 查看文件

7
  * @param {Object} videoTrack - Track reference.
7
  * @param {Object} videoTrack - Track reference.
8
  * @returns {boolean} - Is streaming status active.
8
  * @returns {boolean} - Is streaming status active.
9
  */
9
  */
10
-export function isTrackStreamingStatusActive(videoTrack: ITrack) {
10
+export function isTrackStreamingStatusActive(videoTrack?: ITrack) {
11
     const streamingStatus = videoTrack?.streamingStatus;
11
     const streamingStatus = videoTrack?.streamingStatus;
12
 
12
 
13
     return streamingStatus === JitsiTrackStreamingStatus.ACTIVE;
13
     return streamingStatus === JitsiTrackStreamingStatus.ACTIVE;

react/features/dropbox/actions.js → react/features/dropbox/actions.ts 查看文件

1
-// @flow
2
 import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
1
 import { UPDATE_DROPBOX_TOKEN } from './actionTypes';
3
 import { _authorizeDropbox } from './functions';
2
 import { _authorizeDropbox } from './functions';
4
 import logger from './logger';
3
 import logger from './logger';

react/features/dropbox/functions.any.js → react/features/dropbox/functions.any.ts 查看文件

1
-// @flow
2
 export * from './functions';
1
 export * from './functions';
3
 
2
 
4
 import { getDisplayName, getSpaceUsage } from './functions';
3
 import { getDisplayName, getSpaceUsage } from './functions';
12
     /**
11
     /**
13
      * The available space left in MB into the user's Dropbox account.
12
      * The available space left in MB into the user's Dropbox account.
14
      */
13
      */
15
-    spaceLeft: number,
14
+    spaceLeft: number;
16
 
15
 
17
     /**
16
     /**
18
      * The display name of the user in Dropbox.
17
      * The display name of the user in Dropbox.
19
      */
18
      */
20
-    userName: string
19
+    userName: string;
21
 };
20
 };
22
 
21
 
23
 /**
22
 /**
30
 export function getDropboxData(
29
 export function getDropboxData(
31
         token: string,
30
         token: string,
32
         appKey: string
31
         appKey: string
33
-): Promise<?DropboxUserData> {
32
+): Promise<DropboxUserData | undefined> {
34
     return Promise.all(
33
     return Promise.all(
35
         [ getDisplayName(token, appKey), getSpaceUsage(token, appKey) ]
34
         [ getDisplayName(token, appKey), getSpaceUsage(token, appKey) ]
36
     ).then(([ userName, space ]) => {
35
     ).then(([ userName, space ]) => {

react/features/dropbox/functions.native.js → react/features/dropbox/functions.native.ts 查看文件

1
-// @flow
2
-
3
 import { NativeModules } from 'react-native';
1
 import { NativeModules } from 'react-native';
4
 
2
 
5
-const { Dropbox } = NativeModules;
6
-
3
+import { IReduxState } from '../app/types';
4
+// eslint-disable-next-line lines-around-comment
5
+// @ts-ignore
7
 import { setPictureInPictureEnabled } from '../mobile/picture-in-picture/functions';
6
 import { setPictureInPictureEnabled } from '../mobile/picture-in-picture/functions';
8
 
7
 
8
+const { Dropbox } = NativeModules;
9
+
9
 /**
10
 /**
10
  * Action to authorize the Jitsi Recording app in dropbox.
11
  * Action to authorize the Jitsi Recording app in dropbox.
11
  *
12
  *
13
+ * @param {any} _appKey - Used on web.
14
+ * @param {any} _redirectURI - Used on web.
12
  * @returns {Promise<Object>} - The promise will be resolved with the dropbox
15
  * @returns {Promise<Object>} - The promise will be resolved with the dropbox
13
  * access token or rejected with an error.
16
  * access token or rejected with an error.
14
  */
17
  */
15
-export async function _authorizeDropbox(): Promise<Object> {
18
+export async function _authorizeDropbox(_appKey?: any, _redirectURI?: any): Promise<any> {
16
     setPictureInPictureEnabled(false);
19
     setPictureInPictureEnabled(false);
17
 
20
 
18
     try {
21
     try {
35
  * Returns the display name for the current dropbox account.
38
  * Returns the display name for the current dropbox account.
36
  *
39
  *
37
  * @param {string} token - The dropbox access token.
40
  * @param {string} token - The dropbox access token.
41
+ * @param {any} _appKey - Used on web.
38
  * @returns {Promise<string>} - The promise will be resolved with the display
42
  * @returns {Promise<string>} - The promise will be resolved with the display
39
  * name or rejected with an error.
43
  * name or rejected with an error.
40
  */
44
  */
41
-export function getDisplayName(token: string) {
45
+export function getDisplayName(token: string, _appKey?: any) {
42
     return Dropbox.getDisplayName(token);
46
     return Dropbox.getDisplayName(token);
43
 }
47
 }
44
 
48
 
46
  * Returns information about the space usage for the current dropbox account.
50
  * Returns information about the space usage for the current dropbox account.
47
  *
51
  *
48
  * @param {string} token - The dropbox access token.
52
  * @param {string} token - The dropbox access token.
53
+ * @param {any} _appKey - Used on web.
49
  * @returns {Promise<{ used: number, allocated: number}>} - The promise will be
54
  * @returns {Promise<{ used: number, allocated: number}>} - The promise will be
50
  * resolved with the object with information about the space usage (the used
55
  * resolved with the object with information about the space usage (the used
51
  * space and the allocated space) for the current dropbox account or rejected
56
  * space and the allocated space) for the current dropbox account or rejected
52
  * with an error.
57
  * with an error.
53
  */
58
  */
54
-export function getSpaceUsage(token: string) {
59
+export function getSpaceUsage(token: string, _appKey?: any) {
55
     return Dropbox.getSpaceUsage(token);
60
     return Dropbox.getSpaceUsage(token);
56
 }
61
 }
57
 
62
 
62
  * @param {Object} state - The redux state.
67
  * @param {Object} state - The redux state.
63
  * @returns {boolean}
68
  * @returns {boolean}
64
  */
69
  */
65
-export function isEnabled(state: Object) {
70
+export function isEnabled(state: IReduxState) {
66
     const { dropbox = {} } = state['features/base/config'];
71
     const { dropbox = {} } = state['features/base/config'];
67
 
72
 
73
+    // @ts-ignore
68
     return Boolean(Dropbox?.ENABLED && typeof dropbox.appKey === 'string');
74
     return Boolean(Dropbox?.ENABLED && typeof dropbox.appKey === 'string');
69
 }
75
 }

react/features/dropbox/functions.web.js → react/features/dropbox/functions.web.ts 查看文件

1
-// @flow
2
-
3
 import { Dropbox, DropboxAuth } from 'dropbox';
1
 import { Dropbox, DropboxAuth } from 'dropbox';
4
 
2
 
3
+import { IReduxState } from '../app/types';
4
+
5
 /**
5
 /**
6
  * Executes the oauth flow.
6
  * Executes the oauth flow.
7
  *
7
  *
13
 
13
 
14
     return new Promise(resolve => {
14
     return new Promise(resolve => {
15
         // eslint-disable-next-line prefer-const
15
         // eslint-disable-next-line prefer-const
16
-        let popup;
17
-        const handleAuth = ({ data }) => {
16
+        let popup: any;
17
+        const handleAuth = ({ data }: { data: { type: string; url: string; windowName: string; }; }) => {
18
             if (data && data.type === 'dropbox-login' && data.windowName === windowName) {
18
             if (data && data.type === 'dropbox-login' && data.windowName === windowName) {
19
                 if (popup) {
19
                 if (popup) {
20
                     popup.close();
20
                     popup.close();
49
 export function _authorizeDropbox(
49
 export function _authorizeDropbox(
50
         appKey: string,
50
         appKey: string,
51
         redirectURI: string
51
         redirectURI: string
52
-): Promise<Object> {
52
+): Promise<any> {
53
     const dropbox = new DropboxAuth({ clientId: appKey });
53
     const dropbox = new DropboxAuth({ clientId: appKey });
54
 
54
 
55
     return dropbox.getAuthenticationUrl(redirectURI, undefined, 'code', 'offline', undefined, undefined, true)
55
     return dropbox.getAuthenticationUrl(redirectURI, undefined, 'code', 'offline', undefined, undefined, true)
56
+
57
+        // @ts-ignore
56
         .then(authorize)
58
         .then(authorize)
57
         .then(returnUrl => {
59
         .then(returnUrl => {
58
             const params = new URLSearchParams(new URL(returnUrl).search);
60
             const params = new URLSearchParams(new URL(returnUrl).search);
59
             const code = params.get('code');
61
             const code = params.get('code');
60
 
62
 
61
-            return dropbox.getAccessTokenFromCode(redirectURI, code);
63
+            return dropbox.getAccessTokenFromCode(redirectURI, code ?? '');
62
         })
64
         })
63
-        .then(resp => {
65
+        .then((resp: any) => {
64
             return {
66
             return {
65
                 token: resp.result.access_token,
67
                 token: resp.result.access_token,
66
                 rToken: resp.result.refresh_token,
68
                 rToken: resp.result.refresh_token,
82
 
84
 
83
     dropbox.setRefreshToken(rToken);
85
     dropbox.setRefreshToken(rToken);
84
 
86
 
85
-    return dropbox.refreshAccessToken()
87
+    return dropbox.refreshAccessToken() // @ts-ignore
86
         .then(() => {
88
         .then(() => {
87
             return {
89
             return {
88
                 token: dropbox.getAccessToken(),
90
                 token: dropbox.getAccessToken(),
125
 
127
 
126
     return dropboxAPI.usersGetSpaceUsage().then(space => {
128
     return dropboxAPI.usersGetSpaceUsage().then(space => {
127
         const { allocation, used } = space.result;
129
         const { allocation, used } = space.result;
130
+
131
+        // @ts-ignore
128
         const { allocated } = allocation;
132
         const { allocated } = allocation;
129
 
133
 
130
         return {
134
         return {
141
  * @param {Object} state - The redux state.
145
  * @param {Object} state - The redux state.
142
  * @returns {boolean}
146
  * @returns {boolean}
143
  */
147
  */
144
-export function isEnabled(state: Object) {
148
+export function isEnabled(state: IReduxState) {
145
     const { dropbox = {} } = state['features/base/config'];
149
     const { dropbox = {} } = state['features/base/config'];
146
 
150
 
151
+    // @ts-ignore
147
     return typeof dropbox.appKey === 'string';
152
     return typeof dropbox.appKey === 'string';
148
 }
153
 }

react/features/dropbox/logger.js → react/features/dropbox/logger.ts 查看文件

1
-// @flow
2
-
3
 import { getLogger } from '../base/logging/functions';
1
 import { getLogger } from '../base/logging/functions';
4
 
2
 
5
 export default getLogger('features/dropbox');
3
 export default getLogger('features/dropbox');

react/features/filmstrip/actions.any.js → react/features/filmstrip/actions.any.ts 查看文件

1
-// @flow
2
-
3
 import {
1
 import {
4
     SET_FILMSTRIP_ENABLED,
2
     SET_FILMSTRIP_ENABLED,
5
     SET_FILMSTRIP_VISIBLE,
3
     SET_FILMSTRIP_VISIBLE,

react/features/filmstrip/actions.native.js → react/features/filmstrip/actions.native.ts 查看文件

1
-// @flow
2
-
1
+// @ts-ignore
3
 import conferenceStyles from '../conference/components/native/styles';
2
 import conferenceStyles from '../conference/components/native/styles';
4
 
3
 
5
 import { SET_TILE_VIEW_DIMENSIONS } from './actionTypes';
4
 import { SET_TILE_VIEW_DIMENSIONS } from './actionTypes';
5
+// eslint-disable-next-line lines-around-comment
6
+// @ts-ignore
6
 import { styles } from './components';
7
 import { styles } from './components';
7
 import { SQUARE_TILE_ASPECT_RATIO, TILE_MARGIN } from './constants';
8
 import { SQUARE_TILE_ASPECT_RATIO, TILE_MARGIN } from './constants';
8
-import { getColumnCount } from './functions';
9
-import { getTileViewParticipantCount } from './functions.native';
9
+import { getColumnCount, getTileViewParticipantCount } from './functions.native';
10
 
10
 
11
 export * from './actions.any';
11
 export * from './actions.any';
12
 
12
 

react/features/filmstrip/actions.web.js → react/features/filmstrip/actions.web.ts 查看文件

1
-// @flow
2
-import type { Dispatch } from 'redux';
3
-
1
+import { IStore } from '../app/types';
2
+import { pinParticipant } from '../base/participants/actions';
4
 import {
3
 import {
5
     getLocalParticipant,
4
     getLocalParticipant,
6
     getParticipantById,
5
     getParticipantById,
7
-    getRemoteParticipantCount,
8
-    pinParticipant
9
-} from '../base/participants';
10
-import { shouldHideSelfView } from '../base/settings/functions.any';
11
-import { getMaxColumnCount } from '../video-layout';
6
+    getRemoteParticipantCount
7
+} from '../base/participants/functions';
8
+import { shouldHideSelfView } from '../base/settings/functions.web';
9
+import { getMaxColumnCount } from '../video-layout/functions.web';
12
 
10
 
13
 import {
11
 import {
14
     ADD_STAGE_PARTICIPANT,
12
     ADD_STAGE_PARTICIPANT,
54
     getNumberOfPartipantsForTileView,
52
     getNumberOfPartipantsForTileView,
55
     getVerticalViewMaxWidth,
53
     getVerticalViewMaxWidth,
56
     isFilmstripResizable,
54
     isFilmstripResizable,
57
-    isStageFilmstripTopPanel,
58
-    showGridInVerticalView
59
-} from './functions';
60
-import { isStageFilmstripAvailable } from './functions.web';
55
+    isStageFilmstripAvailable,
56
+    isStageFilmstripTopPanel
57
+    , showGridInVerticalView } from './functions.web';
61
 
58
 
62
 export * from './actions.any';
59
 export * from './actions.any';
63
 
60
 
71
  *  width: number,
68
  *  width: number,
72
  * }}
69
  * }}
73
  */
70
  */
74
-export function resizeFilmStrip(width) {
71
+export function resizeFilmStrip(width: number) {
75
     return {
72
     return {
76
         type: RESIZE_FILMSTRIP,
73
         type: RESIZE_FILMSTRIP,
77
         width
74
         width
84
  * @returns {Function}
81
  * @returns {Function}
85
  */
82
  */
86
 export function setTileViewDimensions() {
83
 export function setTileViewDimensions() {
87
-    return (dispatch: Dispatch<any>, getState: Function) => {
84
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
88
         const state = getState();
85
         const state = getState();
89
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
86
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
90
         const {
87
         const {
111
                 numberOfParticipants,
108
                 numberOfParticipants,
112
                 desiredNumberOfVisibleTiles: numberOfVisibleTiles
109
                 desiredNumberOfVisibleTiles: numberOfVisibleTiles
113
             });
110
             });
114
-        const thumbnailsTotalHeight = rows * (TILE_VERTICAL_MARGIN + height);
111
+        const thumbnailsTotalHeight = (rows ?? 1) * (TILE_VERTICAL_MARGIN + (height ?? 0));
115
         const availableHeight = clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN;
112
         const availableHeight = clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN;
116
         const hasScroll = availableHeight < thumbnailsTotalHeight;
113
         const hasScroll = availableHeight < thumbnailsTotalHeight;
117
         const filmstripWidth
114
         const filmstripWidth
118
-            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN, columns * (TILE_HORIZONTAL_MARGIN + width))
115
+            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN,
116
+                (columns ?? 1) * (TILE_HORIZONTAL_MARGIN + (width ?? 0)))
119
                 + (hasScroll ? SCROLL_SIZE : 0);
117
                 + (hasScroll ? SCROLL_SIZE : 0);
120
         const filmstripHeight = Math.min(availableHeight, thumbnailsTotalHeight);
118
         const filmstripHeight = Math.min(availableHeight, thumbnailsTotalHeight);
121
 
119
 
144
  * @returns {Function}
142
  * @returns {Function}
145
  */
143
  */
146
 export function setVerticalViewDimensions() {
144
 export function setVerticalViewDimensions() {
147
-    return (dispatch: Dispatch<any>, getState: Function) => {
145
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
148
         const state = getState();
146
         const state = getState();
149
         const { clientHeight = 0, clientWidth = 0 } = state['features/base/responsive-ui'];
147
         const { clientHeight = 0, clientWidth = 0 } = state['features/base/responsive-ui'];
150
         const { width: filmstripWidth } = state['features/filmstrip'];
148
         const { width: filmstripWidth } = state['features/filmstrip'];
155
         const { localScreenShare } = state['features/base/participants'];
153
         const { localScreenShare } = state['features/base/participants'];
156
 
154
 
157
         let gridView = {};
155
         let gridView = {};
158
-        let thumbnails = {};
156
+        let thumbnails: any = {};
159
         let filmstripDimensions = {};
157
         let filmstripDimensions = {};
160
         let hasScroll = false;
158
         let hasScroll = false;
161
         let remoteVideosContainerWidth;
159
         let remoteVideosContainerWidth;
177
                 columns,
175
                 columns,
178
                 rows
176
                 rows
179
             } = calculateResponsiveTileViewDimensions({
177
             } = calculateResponsiveTileViewDimensions({
180
-                clientWidth: filmstripWidth.current,
178
+                clientWidth: filmstripWidth.current ?? 0,
181
                 clientHeight,
179
                 clientHeight,
182
                 disableTileEnlargement: false,
180
                 disableTileEnlargement: false,
183
                 maxColumns,
181
                 maxColumns,
185
                 numberOfParticipants,
183
                 numberOfParticipants,
186
                 desiredNumberOfVisibleTiles: numberOfVisibleTiles
184
                 desiredNumberOfVisibleTiles: numberOfVisibleTiles
187
             });
185
             });
188
-            const thumbnailsTotalHeight = rows * (TILE_VERTICAL_MARGIN + height);
186
+            const thumbnailsTotalHeight = (rows ?? 1) * (TILE_VERTICAL_MARGIN + (height ?? 0));
189
 
187
 
190
             hasScroll = clientHeight < thumbnailsTotalHeight;
188
             hasScroll = clientHeight < thumbnailsTotalHeight;
191
-            const widthOfFilmstrip = (columns * (TILE_HORIZONTAL_MARGIN + width)) + (hasScroll ? SCROLL_SIZE : 0);
189
+            const widthOfFilmstrip = ((columns ?? 1) * (TILE_HORIZONTAL_MARGIN + (width ?? 0)))
190
+                + (hasScroll ? SCROLL_SIZE : 0);
192
             const filmstripHeight = Math.min(clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN, thumbnailsTotalHeight);
191
             const filmstripHeight = Math.min(clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN, thumbnailsTotalHeight);
193
 
192
 
194
             gridView = {
193
             gridView = {
208
                 width: widthOfFilmstrip
207
                 width: widthOfFilmstrip
209
             };
208
             };
210
         } else {
209
         } else {
211
-            thumbnails = calculateThumbnailSizeForVerticalView(clientWidth, filmstripWidth.current, resizableFilmstrip);
210
+            thumbnails = calculateThumbnailSizeForVerticalView(clientWidth, filmstripWidth.current ?? 0,
211
+                resizableFilmstrip);
212
 
212
 
213
             remoteVideosContainerWidth
213
             remoteVideosContainerWidth
214
                 = thumbnails?.local?.width + TILE_VERTICAL_CONTAINER_HORIZONTAL_MARGIN + SCROLL_SIZE;
214
                 = thumbnails?.local?.width + TILE_VERTICAL_CONTAINER_HORIZONTAL_MARGIN + SCROLL_SIZE;
252
  * @returns {Function}
252
  * @returns {Function}
253
  */
253
  */
254
 export function setHorizontalViewDimensions() {
254
 export function setHorizontalViewDimensions() {
255
-    return (dispatch: Dispatch<any>, getState: Function) => {
255
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
256
         const state = getState();
256
         const state = getState();
257
         const { clientHeight = 0, clientWidth = 0 } = state['features/base/responsive-ui'];
257
         const { clientHeight = 0, clientWidth = 0 } = state['features/base/responsive-ui'];
258
         const disableSelfView = shouldHideSelfView(state);
258
         const disableSelfView = shouldHideSelfView(state);
286
  * @returns {Function}
286
  * @returns {Function}
287
  */
287
  */
288
 export function setStageFilmstripViewDimensions() {
288
 export function setStageFilmstripViewDimensions() {
289
-    return (dispatch: Dispatch<any>, getState: Function) => {
289
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
290
         const state = getState();
290
         const state = getState();
291
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
291
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
292
         const {
292
         const {
316
             maxColumns,
316
             maxColumns,
317
             noHorizontalContainerMargin: verticalWidth > 0,
317
             noHorizontalContainerMargin: verticalWidth > 0,
318
             numberOfParticipants,
318
             numberOfParticipants,
319
-            numberOfVisibleTiles,
319
+            desiredNumberOfVisibleTiles: numberOfVisibleTiles,
320
             minTileHeight: topPanel ? TILE_MIN_HEIGHT_SMALL : null
320
             minTileHeight: topPanel ? TILE_MIN_HEIGHT_SMALL : null
321
         });
321
         });
322
-        const thumbnailsTotalHeight = rows * (TILE_VERTICAL_MARGIN + height);
322
+        const thumbnailsTotalHeight = (rows ?? 1) * (TILE_VERTICAL_MARGIN + (height ?? 0));
323
         const hasScroll = clientHeight < thumbnailsTotalHeight;
323
         const hasScroll = clientHeight < thumbnailsTotalHeight;
324
         const filmstripWidth
324
         const filmstripWidth
325
-            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN, columns * (TILE_HORIZONTAL_MARGIN + width))
325
+            = Math.min(clientWidth - TILE_VIEW_GRID_HORIZONTAL_MARGIN,
326
+                (columns ?? 1) * (TILE_HORIZONTAL_MARGIN + (width ?? 0)))
326
             + (hasScroll ? SCROLL_SIZE : 0);
327
             + (hasScroll ? SCROLL_SIZE : 0);
327
         const filmstripHeight = Math.min(clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN, thumbnailsTotalHeight);
328
         const filmstripHeight = Math.min(clientHeight - TILE_VIEW_GRID_VERTICAL_MARGIN, thumbnailsTotalHeight);
328
 
329
 
352
  * @returns {Function}
353
  * @returns {Function}
353
  */
354
  */
354
 export function clickOnVideo(n: number) {
355
 export function clickOnVideo(n: number) {
355
-    return (dispatch: Function, getState: Function) => {
356
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
356
         const state = getState();
357
         const state = getState();
357
-        const { id: localId } = getLocalParticipant(state);
358
+        const { id: localId } = getLocalParticipant(state) ?? {};
358
 
359
 
359
         // Use the list that correctly represents the current order of the participants as visible in the UI.
360
         // Use the list that correctly represents the current order of the participants as visible in the UI.
360
         const { remoteParticipants } = state['features/filmstrip'];
361
         const { remoteParticipants } = state['features/filmstrip'];
363
         if (participants.length - 1 < n) {
364
         if (participants.length - 1 < n) {
364
             return;
365
             return;
365
         }
366
         }
366
-        const { id, pinned } = getParticipantById(state, participants[n]);
367
+        const { id, pinned } = getParticipantById(state, participants[n] ?? '') ?? {};
367
 
368
 
368
         if (isStageFilmstripAvailable(state)) {
369
         if (isStageFilmstripAvailable(state)) {
369
-            dispatch(togglePinStageParticipant(id));
370
+            dispatch(togglePinStageParticipant(id ?? ''));
370
         } else {
371
         } else {
371
             dispatch(pinParticipant(pinned ? null : id));
372
             dispatch(pinParticipant(pinned ? null : id));
372
         }
373
         }
476
  * @param {boolean?} pinned - Whether the participant is pinned or not.
477
  * @param {boolean?} pinned - Whether the participant is pinned or not.
477
  * @returns {Object}
478
  * @returns {Object}
478
  */
479
  */
479
-export function addStageParticipant(participantId, pinned = false) {
480
+export function addStageParticipant(participantId: string, pinned = false) {
480
     return {
481
     return {
481
         type: ADD_STAGE_PARTICIPANT,
482
         type: ADD_STAGE_PARTICIPANT,
482
         participantId,
483
         participantId,
490
  * @param {string} participantId - The Id of the participant to be removed.
491
  * @param {string} participantId - The Id of the participant to be removed.
491
  * @returns {Object}
492
  * @returns {Object}
492
  */
493
  */
493
-export function removeStageParticipant(participantId) {
494
+export function removeStageParticipant(participantId: string) {
494
     return {
495
     return {
495
         type: REMOVE_STAGE_PARTICIPANT,
496
         type: REMOVE_STAGE_PARTICIPANT,
496
         participantId
497
         participantId
503
  * @param {Array<Object>} queue - The new list.
504
  * @param {Array<Object>} queue - The new list.
504
  * @returns {Object}
505
  * @returns {Object}
505
  */
506
  */
506
-export function setStageParticipants(queue) {
507
+export function setStageParticipants(queue: Object[]) {
507
     return {
508
     return {
508
         type: SET_STAGE_PARTICIPANTS,
509
         type: SET_STAGE_PARTICIPANTS,
509
         queue
510
         queue
516
  * @param {string} participantId - The id of the participant to be toggled.
517
  * @param {string} participantId - The id of the participant to be toggled.
517
  * @returns {Object}
518
  * @returns {Object}
518
  */
519
  */
519
-export function togglePinStageParticipant(participantId) {
520
+export function togglePinStageParticipant(participantId: string) {
520
     return {
521
     return {
521
         type: TOGGLE_PIN_STAGE_PARTICIPANT,
522
         type: TOGGLE_PIN_STAGE_PARTICIPANT,
522
         participantId
523
         participantId
540
  * @returns {Object}
541
  * @returns {Object}
541
  */
542
  */
542
 export function setScreensharingTileDimensions() {
543
 export function setScreensharingTileDimensions() {
543
-    return (dispatch: Dispatch<any>, getState: Function) => {
544
+    return (dispatch: IStore['dispatch'], getState: IStore['getState']) => {
544
         const state = getState();
545
         const state = getState();
545
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
546
         const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
546
         const { visible, topPanelHeight, topPanelVisible } = state['features/filmstrip'];
547
         const { visible, topPanelHeight, topPanelVisible } = state['features/filmstrip'];
569
  * @param {boolean} visible - Whether it should be visible or not.
570
  * @param {boolean} visible - Whether it should be visible or not.
570
  * @returns {Object}
571
  * @returns {Object}
571
  */
572
  */
572
-export function setTopPanelVisible(visible) {
573
+export function setTopPanelVisible(visible: boolean) {
573
     return {
574
     return {
574
         type: SET_TOP_PANEL_VISIBILITY,
575
         type: SET_TOP_PANEL_VISIBILITY,
575
         visible
576
         visible
582
  * @param {string|undefined} participantId - The id of the participant to be set.
583
  * @param {string|undefined} participantId - The id of the participant to be set.
583
  * @returns {Object}
584
  * @returns {Object}
584
  */
585
  */
585
-export function setScreenshareFilmstripParticipant(participantId) {
586
+export function setScreenshareFilmstripParticipant(participantId?: string) {
586
     return {
587
     return {
587
         type: SET_SCREENSHARE_FILMSTRIP_PARTICIPANT,
588
         type: SET_SCREENSHARE_FILMSTRIP_PARTICIPANT,
588
         participantId
589
         participantId

+ 1
- 1
react/features/filmstrip/components/web/Filmstrip.tsx 查看文件

16
 import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
16
 import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
17
 import { IParticipant } from '../../../base/participants/types';
17
 import { IParticipant } from '../../../base/participants/types';
18
 import { connect } from '../../../base/redux/functions';
18
 import { connect } from '../../../base/redux/functions';
19
-import { shouldHideSelfView } from '../../../base/settings/functions.any';
19
+import { shouldHideSelfView } from '../../../base/settings/functions.web';
20
 // @ts-ignore
20
 // @ts-ignore
21
 import { showToolbox } from '../../../toolbox/actions.web';
21
 import { showToolbox } from '../../../toolbox/actions.web';
22
 import { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';
22
 import { isButtonEnabled, isToolboxVisible } from '../../../toolbox/functions.web';

+ 1
- 1
react/features/filmstrip/components/web/PinnedIndicator.tsx 查看文件

57
 }: IProps) => {
57
 }: IProps) => {
58
     const stageFilmstrip = useSelector(isStageFilmstripAvailable);
58
     const stageFilmstrip = useSelector(isStageFilmstripAvailable);
59
     const pinned = useSelector((state: IReduxState) => getParticipantById(state, participantId))?.pinned;
59
     const pinned = useSelector((state: IReduxState) => getParticipantById(state, participantId))?.pinned;
60
-    const activePinnedParticipants: Array<{ participantId: string; pinned: boolean; }>
60
+    const activePinnedParticipants: Array<{ participantId: string; pinned?: boolean; }>
61
         = useSelector(getPinnedActiveParticipants);
61
         = useSelector(getPinnedActiveParticipants);
62
     const isPinned = activePinnedParticipants.find(p => p.participantId === participantId);
62
     const isPinned = activePinnedParticipants.find(p => p.participantId === participantId);
63
     const { classes: styles } = useStyles();
63
     const { classes: styles } = useStyles();

react/features/filmstrip/functions.any.js → react/features/filmstrip/functions.any.ts 查看文件

1
-import { getActiveSpeakersToBeDisplayed, getVirtualScreenshareParticipantOwnerId } from '../base/participants';
1
+import { IStore } from '../app/types';
2
+import {
3
+    getActiveSpeakersToBeDisplayed,
4
+    getVirtualScreenshareParticipantOwnerId
5
+} from '../base/participants/functions';
2
 
6
 
3
 import { setRemoteParticipants } from './actions';
7
 import { setRemoteParticipants } from './actions';
4
 import { isFilmstripScrollVisible } from './functions';
8
 import { isFilmstripScrollVisible } from './functions';
11
  * @returns {void}
15
  * @returns {void}
12
  * @private
16
  * @private
13
  */
17
  */
14
-export function updateRemoteParticipants(store: Object, participantId: ?number) {
18
+export function updateRemoteParticipants(store: IStore, participantId?: string) {
15
     const state = store.getState();
19
     const state = store.getState();
16
     let reorderedParticipants = [];
20
     let reorderedParticipants = [];
17
     const { sortedRemoteVirtualScreenshareParticipants } = state['features/base/participants'];
21
     const { sortedRemoteVirtualScreenshareParticipants } = state['features/base/participants'];
53
     }
57
     }
54
 
58
 
55
     // Always update the order of the thumnails.
59
     // Always update the order of the thumnails.
56
-    const participantsWithScreenShare = screenShareParticipants.reduce((acc, screenshare) => {
60
+    const participantsWithScreenShare = screenShareParticipants.reduce<string[]>((acc, screenshare) => {
57
         const ownerId = getVirtualScreenshareParticipantOwnerId(screenshare);
61
         const ownerId = getVirtualScreenshareParticipantOwnerId(screenshare);
58
 
62
 
59
         acc.push(ownerId);
63
         acc.push(ownerId);
80
  * @returns {void}
84
  * @returns {void}
81
  * @private
85
  * @private
82
  */
86
  */
83
-export function updateRemoteParticipantsOnLeave(store: Object, participantId: ?string = null) {
87
+export function updateRemoteParticipantsOnLeave(store: IStore, participantId: string | null = null) {
84
     if (!participantId) {
88
     if (!participantId) {
85
         return;
89
         return;
86
     }
90
     }

react/features/filmstrip/functions.native.js → react/features/filmstrip/functions.native.ts 查看文件

1
-// @flow
2
-
3
-import { FILMSTRIP_ENABLED, getFeatureFlag } from '../base/flags';
1
+import { IReduxState } from '../app/types';
2
+import { IStateful } from '../base/app/types';
3
+import { FILMSTRIP_ENABLED } from '../base/flags/constants';
4
+import { getFeatureFlag } from '../base/flags/functions';
4
 import {
5
 import {
5
     getLocalParticipant,
6
     getLocalParticipant,
6
     getParticipantCountWithFake,
7
     getParticipantCountWithFake,
7
     getPinnedParticipant
8
     getPinnedParticipant
8
-} from '../base/participants';
9
-import { Platform } from '../base/react';
10
-import { toState } from '../base/redux';
9
+} from '../base/participants/functions';
10
+import Platform from '../base/react/Platform.native';
11
+import { toState } from '../base/redux/functions';
11
 import { ASPECT_RATIO_NARROW } from '../base/responsive-ui/constants';
12
 import { ASPECT_RATIO_NARROW } from '../base/responsive-ui/constants';
12
-import { shouldHideSelfView } from '../base/settings/functions.any';
13
+import { shouldHideSelfView } from '../base/settings/functions.native';
14
+// eslint-disable-next-line lines-around-comment
15
+// @ts-ignore
13
 import conferenceStyles from '../conference/components/native/styles';
16
 import conferenceStyles from '../conference/components/native/styles';
14
-import { shouldDisplayTileView } from '../video-layout';
17
+import { shouldDisplayTileView } from '../video-layout/functions.native';
15
 
18
 
19
+// @ts-ignore
16
 import { styles } from './components';
20
 import { styles } from './components';
17
 
21
 
18
 export * from './functions.any';
22
 export * from './functions.any';
27
  * resolved to a Redux state object with the toState function.
31
  * resolved to a Redux state object with the toState function.
28
  * @returns {boolean}
32
  * @returns {boolean}
29
  */
33
  */
30
-export function isFilmstripVisible(stateful: Object | Function) {
34
+export function isFilmstripVisible(stateful: IStateful) {
31
     const state = toState(stateful);
35
     const state = toState(stateful);
32
 
36
 
33
     const enabled = getFeatureFlag(state, FILMSTRIP_ENABLED, true);
37
     const enabled = getFeatureFlag(state, FILMSTRIP_ENABLED, true);
47
  * @returns {boolean} - If remote video thumbnails should be displayed/visible
51
  * @returns {boolean} - If remote video thumbnails should be displayed/visible
48
  * in the filmstrip, then {@code true}; otherwise, {@code false}.
52
  * in the filmstrip, then {@code true}; otherwise, {@code false}.
49
  */
53
  */
50
-export function shouldRemoteVideosBeVisible(state: Object) {
54
+export function shouldRemoteVideosBeVisible(state: IReduxState) {
51
     if (state['features/invite'].calleeInfoVisible) {
55
     if (state['features/invite'].calleeInfoVisible) {
52
         return false;
56
         return false;
53
     }
57
     }
74
 /**
78
 /**
75
  * Not implemented on mobile.
79
  * Not implemented on mobile.
76
  *
80
  *
81
+ * @param {any} _state - Used on web.
77
  * @returns {Array<string>}
82
  * @returns {Array<string>}
78
  */
83
  */
79
-export function getActiveParticipantsIds() {
84
+export function getActiveParticipantsIds(_state: any) {
80
     return [];
85
     return [];
81
 }
86
 }
82
 
87
 
87
  * resolved to a Redux state object with the toState function.
92
  * resolved to a Redux state object with the toState function.
88
  * @returns {number} - The number of participants displayed in tile view.
93
  * @returns {number} - The number of participants displayed in tile view.
89
  */
94
  */
90
-export function getTileViewParticipantCount(stateful: Object | Function) {
95
+export function getTileViewParticipantCount(stateful: IStateful) {
91
     const state = toState(stateful);
96
     const state = toState(stateful);
92
     const disableSelfView = shouldHideSelfView(state);
97
     const disableSelfView = shouldHideSelfView(state);
93
     const localParticipant = getLocalParticipant(state);
98
     const localParticipant = getLocalParticipant(state);
104
  * @returns {number} - The number of columns to be rendered in tile view.
109
  * @returns {number} - The number of columns to be rendered in tile view.
105
  * @private
110
  * @private
106
  */
111
  */
107
-export function getColumnCount(stateful: Object | Function) {
112
+export function getColumnCount(stateful: IStateful) {
108
     const state = toState(stateful);
113
     const state = toState(stateful);
109
     const participantCount = getTileViewParticipantCount(state);
114
     const participantCount = getTileViewParticipantCount(state);
110
     const { aspectRatio } = state['features/base/responsive-ui'];
115
     const { aspectRatio } = state['features/base/responsive-ui'];
130
  * @param {Object} state - The redux state.
135
  * @param {Object} state - The redux state.
131
  * @returns {boolean} - True if the scroll is displayed and false otherwise.
136
  * @returns {boolean} - True if the scroll is displayed and false otherwise.
132
  */
137
  */
133
-export function isFilmstripScrollVisible(state) {
138
+export function isFilmstripScrollVisible(state: IReduxState) {
134
     if (shouldDisplayTileView(state)) {
139
     if (shouldDisplayTileView(state)) {
135
         return state['features/filmstrip']?.tileViewDimensions?.hasScroll;
140
         return state['features/filmstrip']?.tileViewDimensions?.hasScroll;
136
     }
141
     }
162
 /**
167
 /**
163
  * Whether the stage filmstrip is available or not.
168
  * Whether the stage filmstrip is available or not.
164
  *
169
  *
165
- * @param {Object} state - Redux state.
170
+ * @param {any} _state - Used on web.
171
+ * @param {any} _count - Used on web.
166
  * @returns {boolean}
172
  * @returns {boolean}
167
  */
173
  */
168
-export function isStageFilmstripAvailable() {
174
+export function isStageFilmstripAvailable(_state: any, _count?: any) {
169
     return false;
175
     return false;
170
 }
176
 }
171
 
177
 
172
 /**
178
 /**
173
  * Whether the stage filmstrip is enabled.
179
  * Whether the stage filmstrip is enabled.
174
  *
180
  *
181
+ * @param {any} _state - Used on web.
175
  * @returns {boolean}
182
  * @returns {boolean}
176
  */
183
  */
177
-export function isStageFilmstripEnabled() {
184
+export function isStageFilmstripEnabled(_state: any) {
178
     return false;
185
     return false;
179
 }
186
 }
180
 
187
 
181
 /**
188
 /**
182
  * Whether or not the top panel is enabled.
189
  * Whether or not the top panel is enabled.
183
  *
190
  *
191
+ * @param {any} _state - Used on web.
184
  * @returns {boolean}
192
  * @returns {boolean}
185
  */
193
  */
186
-export function isTopPanelEnabled() {
194
+export function isTopPanelEnabled(_state: any) {
187
     return false;
195
     return false;
188
 
196
 
189
 }
197
 }
200
     clientHeight,
208
     clientHeight,
201
     insets = {},
209
     insets = {},
202
     localParticipantVisible = true
210
     localParticipantVisible = true
211
+}: {
212
+    aspectRatio: Symbol;
213
+    clientHeight: number;
214
+    clientWidth: number;
215
+    insets: {
216
+        bottom?: number;
217
+        left?: number;
218
+        right?: number;
219
+        top?: number;
220
+    };
221
+    localParticipantVisible?: boolean;
203
 }) {
222
 }) {
204
     const { height, width, margin } = styles.thumbnail;
223
     const { height, width, margin } = styles.thumbnail;
205
     const conferenceBorder = conferenceStyles.conference.borderWidth || 0;
224
     const conferenceBorder = conferenceStyles.conference.borderWidth || 0;
254
 /**
273
 /**
255
  * Not implemented on mobile.
274
  * Not implemented on mobile.
256
  *
275
  *
276
+ * @param {any} _state - Used on web.
257
  * @returns {undefined}
277
  * @returns {undefined}
258
  */
278
  */
259
-export function getScreenshareFilmstripParticipantId() {
279
+export function getScreenshareFilmstripParticipantId(_state: any) {
260
     return undefined;
280
     return undefined;
261
 }
281
 }
262
 
282
 

react/features/filmstrip/functions.web.js → react/features/filmstrip/functions.web.ts 查看文件

1
-// @flow
2
-
1
+import { IReduxState } from '../app/types';
2
+import { IStateful } from '../base/app/types';
3
 import { isMobileBrowser } from '../base/environment/utils';
3
 import { isMobileBrowser } from '../base/environment/utils';
4
-import { MEDIA_TYPE } from '../base/media';
4
+import { MEDIA_TYPE } from '../base/media/constants';
5
 import {
5
 import {
6
     getLocalParticipant,
6
     getLocalParticipant,
7
     getParticipantById,
7
     getParticipantById,
9
     getParticipantCountWithFake,
9
     getParticipantCountWithFake,
10
     getPinnedParticipant,
10
     getPinnedParticipant,
11
     isScreenShareParticipant
11
     isScreenShareParticipant
12
-} from '../base/participants';
13
-import { toState } from '../base/redux';
14
-import { shouldHideSelfView } from '../base/settings/functions.any';
12
+} from '../base/participants/functions';
13
+import { toState } from '../base/redux/functions';
14
+import { shouldHideSelfView } from '../base/settings/functions.web';
15
 import {
15
 import {
16
     getVideoTrackByParticipant,
16
     getVideoTrackByParticipant,
17
     isLocalTrackMuted,
17
     isLocalTrackMuted,
19
 } from '../base/tracks/functions';
19
 } from '../base/tracks/functions';
20
 import { isTrackStreamingStatusActive } from '../connection-indicator/functions';
20
 import { isTrackStreamingStatusActive } from '../connection-indicator/functions';
21
 import { isSharingStatus } from '../shared-video/functions';
21
 import { isSharingStatus } from '../shared-video/functions';
22
-import {
23
-    LAYOUTS,
24
-    getCurrentLayout,
25
-    getNotResponsiveTileViewGridDimensions
26
-} from '../video-layout';
22
+import { LAYOUTS } from '../video-layout/constants';
23
+import { getCurrentLayout, getNotResponsiveTileViewGridDimensions } from '../video-layout/functions.web';
27
 
24
 
28
 import {
25
 import {
29
     ASPECT_RATIO_BREAKPOINT,
26
     ASPECT_RATIO_BREAKPOINT,
51
 
48
 
52
 export * from './functions.any';
49
 export * from './functions.any';
53
 
50
 
54
-declare var interfaceConfig: Object;
55
-
56
 /**
51
 /**
57
  * Returns true if the filmstrip on mobile is visible, false otherwise.
52
  * Returns true if the filmstrip on mobile is visible, false otherwise.
58
  *
53
  *
60
  * function lies here only for the sake of consistency and to avoid flow errors
55
  * function lies here only for the sake of consistency and to avoid flow errors
61
  * on import.
56
  * on import.
62
  *
57
  *
63
- * @param {Object | Function} stateful - The Object or Function that can be
58
+ * @param {IStateful} stateful - The Object or Function that can be
64
  * resolved to a Redux state object with the toState function.
59
  * resolved to a Redux state object with the toState function.
65
  * @returns {boolean}
60
  * @returns {boolean}
66
  */
61
  */
67
-export function isFilmstripVisible(stateful: Object | Function) {
62
+export function isFilmstripVisible(stateful: IStateful) {
68
     return toState(stateful)['features/filmstrip'].visible;
63
     return toState(stateful)['features/filmstrip'].visible;
69
 }
64
 }
70
 
65
 
72
  * Determines whether the remote video thumbnails should be displayed/visible in
67
  * Determines whether the remote video thumbnails should be displayed/visible in
73
  * the filmstrip.
68
  * the filmstrip.
74
  *
69
  *
75
- * @param {Object} state - The full redux state.
70
+ * @param {IReduxState} state - The full redux state.
76
  * @returns {boolean} - If remote video thumbnails should be displayed/visible
71
  * @returns {boolean} - If remote video thumbnails should be displayed/visible
77
  * in the filmstrip, then {@code true}; otherwise, {@code false}.
72
  * in the filmstrip, then {@code true}; otherwise, {@code false}.
78
  */
73
  */
79
-export function shouldRemoteVideosBeVisible(state: Object) {
74
+export function shouldRemoteVideosBeVisible(state: IReduxState) {
80
     if (state['features/invite'].calleeInfoVisible) {
75
     if (state['features/invite'].calleeInfoVisible) {
81
         return false;
76
         return false;
82
     }
77
     }
107
 /**
102
 /**
108
  * Checks whether there is a playable video stream available for the user associated with the passed ID.
103
  * Checks whether there is a playable video stream available for the user associated with the passed ID.
109
  *
104
  *
110
- * @param {Object | Function} stateful - The Object or Function that can be
105
+ * @param {IStateful} stateful - The Object or Function that can be
111
  * resolved to a Redux state object with the toState function.
106
  * resolved to a Redux state object with the toState function.
112
  * @param {string} id - The id of the participant.
107
  * @param {string} id - The id of the participant.
113
  * @returns {boolean} <tt>true</tt> if there is a playable video stream available
108
  * @returns {boolean} <tt>true</tt> if there is a playable video stream available
114
  * or <tt>false</tt> otherwise.
109
  * or <tt>false</tt> otherwise.
115
  */
110
  */
116
-export function isVideoPlayable(stateful: Object | Function, id: String) {
111
+export function isVideoPlayable(stateful: IStateful, id: string) {
117
     const state = toState(stateful);
112
     const state = toState(stateful);
118
     const tracks = state['features/base/tracks'];
113
     const tracks = state['features/base/tracks'];
119
     const participant = id ? getParticipantById(state, id) : getLocalParticipant(state);
114
     const participant = id ? getParticipantById(state, id) : getLocalParticipant(state);
142
  * @param {number} clientHeight - The height of the app window.
137
  * @param {number} clientHeight - The height of the app window.
143
  * @returns {{local: {height, width}, remote: {height, width}}}
138
  * @returns {{local: {height, width}, remote: {height, width}}}
144
  */
139
  */
145
-export function calculateThumbnailSizeForHorizontalView(clientHeight: number = 0) {
140
+export function calculateThumbnailSizeForHorizontalView(clientHeight = 0) {
146
     const topBottomMargin = 15;
141
     const topBottomMargin = 15;
147
     const availableHeight = Math.min(clientHeight,
142
     const availableHeight = Math.min(clientHeight,
148
         (interfaceConfig.FILM_STRIP_MAX_HEIGHT || DEFAULT_FILMSTRIP_WIDTH) + topBottomMargin);
143
         (interfaceConfig.FILM_STRIP_MAX_HEIGHT || DEFAULT_FILMSTRIP_WIDTH) + topBottomMargin);
168
  * @param {boolean} isResizable - Whether the filmstrip is resizable or not.
163
  * @param {boolean} isResizable - Whether the filmstrip is resizable or not.
169
  * @returns {{local: {height, width}, remote: {height, width}}}
164
  * @returns {{local: {height, width}, remote: {height, width}}}
170
  */
165
  */
171
-export function calculateThumbnailSizeForVerticalView(clientWidth: number = 0,
172
-        filmstripWidth: number = 0, isResizable = false) {
166
+export function calculateThumbnailSizeForVerticalView(clientWidth = 0, filmstripWidth = 0, isResizable = false) {
173
     const availableWidth = Math.min(
167
     const availableWidth = Math.min(
174
         Math.max(clientWidth - VERTICAL_VIEW_HORIZONTAL_MARGIN, 0),
168
         Math.max(clientWidth - VERTICAL_VIEW_HORIZONTAL_MARGIN, 0),
175
         (isResizable ? filmstripWidth : interfaceConfig.FILM_STRIP_MAX_HEIGHT) || DEFAULT_FILMSTRIP_WIDTH);
169
         (isResizable ? filmstripWidth : interfaceConfig.FILM_STRIP_MAX_HEIGHT) || DEFAULT_FILMSTRIP_WIDTH);
195
  * @param {number} clientWidth - The width of the window.
189
  * @param {number} clientWidth - The width of the window.
196
  * @returns {number} The minimum height of a thumbnail.
190
  * @returns {number} The minimum height of a thumbnail.
197
  */
191
  */
198
-export function getThumbnailMinHeight(clientWidth) {
192
+export function getThumbnailMinHeight(clientWidth: number) {
199
     return clientWidth < ASPECT_RATIO_BREAKPOINT ? TILE_MIN_HEIGHT_SMALL : TILE_MIN_HEIGHT_LARGE;
193
     return clientWidth < ASPECT_RATIO_BREAKPOINT ? TILE_MIN_HEIGHT_SMALL : TILE_MIN_HEIGHT_LARGE;
200
 }
194
 }
201
 
195
 
207
  * @param {number} clientWidth - The width of the window.
201
  * @param {number} clientWidth - The width of the window.
208
  * @returns {number} The default aspect ratio for a tile.
202
  * @returns {number} The default aspect ratio for a tile.
209
  */
203
  */
210
-export function getTileDefaultAspectRatio(disableResponsiveTiles, disableTileEnlargement, clientWidth) {
204
+export function getTileDefaultAspectRatio(disableResponsiveTiles: boolean,
205
+        disableTileEnlargement: boolean, clientWidth: number) {
211
     if (!disableResponsiveTiles && disableTileEnlargement && clientWidth < ASPECT_RATIO_BREAKPOINT) {
206
     if (!disableResponsiveTiles && disableTileEnlargement && clientWidth < ASPECT_RATIO_BREAKPOINT) {
212
         return SQUARE_TILE_ASPECT_RATIO;
207
         return SQUARE_TILE_ASPECT_RATIO;
213
     }
208
     }
221
  * @param {Object} state - The redux store state.
216
  * @param {Object} state - The redux store state.
222
  * @returns {number} The number of participants that will be displayed in tile view.
217
  * @returns {number} The number of participants that will be displayed in tile view.
223
  */
218
  */
224
-export function getNumberOfPartipantsForTileView(state) {
219
+export function getNumberOfPartipantsForTileView(state: IReduxState) {
225
     const { iAmRecorder } = state['features/base/config'];
220
     const { iAmRecorder } = state['features/base/config'];
226
     const disableSelfView = shouldHideSelfView(state);
221
     const disableSelfView = shouldHideSelfView(state);
227
     const { localScreenShare } = state['features/base/participants'];
222
     const { localScreenShare } = state['features/base/participants'];
240
  * @param {Object} state - The redux store state.
235
  * @param {Object} state - The redux store state.
241
  * @returns {Object} - The dimensions.
236
  * @returns {Object} - The dimensions.
242
  */
237
  */
243
-export function calculateNonResponsiveTileViewDimensions(state) {
238
+export function calculateNonResponsiveTileViewDimensions(state: IReduxState) {
244
     const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
239
     const { clientHeight, clientWidth } = state['features/base/responsive-ui'];
245
     const { disableTileEnlargement } = state['features/base/config'];
240
     const { disableTileEnlargement } = state['features/base/config'];
246
     const { columns: c, minVisibleRows, rows: r } = getNotResponsiveTileViewGridDimensions(state);
241
     const { columns: c, minVisibleRows, rows: r } = getNotResponsiveTileViewGridDimensions(state);
292
     numberOfParticipants,
287
     numberOfParticipants,
293
     desiredNumberOfVisibleTiles = TILE_VIEW_DEFAULT_NUMBER_OF_VISIBLE_TILES,
288
     desiredNumberOfVisibleTiles = TILE_VIEW_DEFAULT_NUMBER_OF_VISIBLE_TILES,
294
     minTileHeight
289
     minTileHeight
290
+}: {
291
+    clientHeight: number;
292
+    clientWidth: number;
293
+    desiredNumberOfVisibleTiles: number;
294
+    disableTileEnlargement?: boolean;
295
+    maxColumns: number;
296
+    minTileHeight?: number | null;
297
+    noHorizontalContainerMargin?: boolean;
298
+    numberOfParticipants: number;
295
 }) {
299
 }) {
296
     let height, width;
300
     let height, width;
297
     let columns, rows;
301
     let columns, rows;
298
-    let dimensions = {
302
+
303
+    interface IDimensions {
304
+        columns?: number;
305
+        height?: number;
306
+        maxArea: number;
307
+        numberOfVisibleParticipants?: number;
308
+        rows?: number;
309
+        width?: number;
310
+    }
311
+
312
+    let dimensions: IDimensions = {
299
         maxArea: 0
313
         maxArea: 0
300
     };
314
     };
301
-    let minHeightEnforcedDimensions = {
315
+    let minHeightEnforcedDimensions: IDimensions = {
302
         maxArea: 0
316
         maxArea: 0
303
     };
317
     };
304
-    let zeroVisibleRowsDimensions = {
318
+    let zeroVisibleRowsDimensions: IDimensions = {
305
         maxArea: 0
319
         maxArea: 0
306
     };
320
     };
307
 
321
 
411
     disableTileEnlargement = false,
425
     disableTileEnlargement = false,
412
     noHorizontalContainerMargin = false,
426
     noHorizontalContainerMargin = false,
413
     minTileHeight
427
     minTileHeight
414
-}: Object) {
428
+}: {
429
+    clientHeight: number;
430
+    clientWidth: number;
431
+    columns: number;
432
+    disableResponsiveTiles: boolean;
433
+    disableTileEnlargement?: boolean;
434
+    minTileHeight?: number | null;
435
+    minVisibleRows: number;
436
+    noHorizontalContainerMargin?: boolean;
437
+}) {
415
     const aspectRatio = getTileDefaultAspectRatio(disableResponsiveTiles, disableTileEnlargement, clientWidth);
438
     const aspectRatio = getTileDefaultAspectRatio(disableResponsiveTiles, disableTileEnlargement, clientWidth);
416
     const minHeight = minTileHeight || getThumbnailMinHeight(clientWidth);
439
     const minHeight = minTileHeight || getThumbnailMinHeight(clientWidth);
417
     const viewWidth = clientWidth - (columns * TILE_HORIZONTAL_MARGIN)
440
     const viewWidth = clientWidth - (columns * TILE_HORIZONTAL_MARGIN)
501
  * the thumbnail.
524
  * the thumbnail.
502
  * @returns {number} - One of <tt>DISPLAY_VIDEO</tt> or <tt>DISPLAY_AVATAR</tt>.
525
  * @returns {number} - One of <tt>DISPLAY_VIDEO</tt> or <tt>DISPLAY_AVATAR</tt>.
503
 */
526
 */
504
-export function computeDisplayModeFromInput(input: Object) {
527
+export function computeDisplayModeFromInput(input: any) {
505
     const {
528
     const {
506
         filmstripType,
529
         filmstripType,
507
         isActiveParticipant,
530
         isActiveParticipant,
550
  * @param {Object} state - The Thumbnail component's state.
573
  * @param {Object} state - The Thumbnail component's state.
551
  * @returns {Object}
574
  * @returns {Object}
552
 */
575
 */
553
-export function getDisplayModeInput(props: Object, state: Object) {
576
+export function getDisplayModeInput(props: any, state: { canPlayEventReceived: boolean; }) {
554
     const {
577
     const {
555
         _currentLayout,
578
         _currentLayout,
556
         _isActiveParticipant,
579
         _isActiveParticipant,
600
  * @param {Object} state - Redux state.
623
  * @param {Object} state - Redux state.
601
  * @returns {boolean}
624
  * @returns {boolean}
602
  */
625
  */
603
-export function isFilmstripResizable(state: Object) {
626
+export function isFilmstripResizable(state: IReduxState) {
604
     const { filmstrip } = state['features/base/config'];
627
     const { filmstrip } = state['features/base/config'];
605
     const _currentLayout = getCurrentLayout(state);
628
     const _currentLayout = getCurrentLayout(state);
606
 
629
 
614
  * @param {Object} state - Redux state.
637
  * @param {Object} state - Redux state.
615
  * @returns {boolean}
638
  * @returns {boolean}
616
  */
639
  */
617
-export function showGridInVerticalView(state) {
640
+export function showGridInVerticalView(state: IReduxState) {
618
     const resizableFilmstrip = isFilmstripResizable(state);
641
     const resizableFilmstrip = isFilmstripResizable(state);
619
     const { width } = state['features/filmstrip'];
642
     const { width } = state['features/filmstrip'];
620
 
643
 
627
  * @param {Object} state - Redux state.
650
  * @param {Object} state - Redux state.
628
  * @returns {number}
651
  * @returns {number}
629
  */
652
  */
630
-export function getVerticalViewMaxWidth(state) {
653
+export function getVerticalViewMaxWidth(state: IReduxState) {
631
     const { width } = state['features/filmstrip'];
654
     const { width } = state['features/filmstrip'];
632
     const _resizableFilmstrip = isFilmstripResizable(state);
655
     const _resizableFilmstrip = isFilmstripResizable(state);
633
     const _verticalViewGrid = showGridInVerticalView(state);
656
     const _verticalViewGrid = showGridInVerticalView(state);
649
  * @param {Object} state - The redux state.
672
  * @param {Object} state - The redux state.
650
  * @returns {boolean} - True if the scroll is displayed and false otherwise.
673
  * @returns {boolean} - True if the scroll is displayed and false otherwise.
651
  */
674
  */
652
-export function isFilmstripScrollVisible(state) {
675
+export function isFilmstripScrollVisible(state: IReduxState) {
653
     const _currentLayout = getCurrentLayout(state);
676
     const _currentLayout = getCurrentLayout(state);
654
     let hasScroll = false;
677
     let hasScroll = false;
655
 
678
 
656
     switch (_currentLayout) {
679
     switch (_currentLayout) {
657
     case LAYOUTS.TILE_VIEW:
680
     case LAYOUTS.TILE_VIEW:
658
-        ({ hasScroll = false } = state['features/filmstrip'].tileViewDimensions);
681
+        ({ hasScroll = false } = state['features/filmstrip'].tileViewDimensions ?? {});
659
         break;
682
         break;
660
     case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
683
     case LAYOUTS.VERTICAL_FILMSTRIP_VIEW:
661
     case LAYOUTS.STAGE_FILMSTRIP_VIEW: {
684
     case LAYOUTS.STAGE_FILMSTRIP_VIEW: {
677
  * @param {Object} state - Redux state.
700
  * @param {Object} state - Redux state.
678
  * @returns {Array<string>}
701
  * @returns {Array<string>}
679
  */
702
  */
680
-export function getActiveParticipantsIds(state) {
703
+export function getActiveParticipantsIds(state: IReduxState) {
681
     const { activeParticipants } = state['features/filmstrip'];
704
     const { activeParticipants } = state['features/filmstrip'];
682
 
705
 
683
     return activeParticipants.map(p => p.participantId);
706
     return activeParticipants.map(p => p.participantId);
689
  * @param {Object} state - Redux state.
712
  * @param {Object} state - Redux state.
690
  * @returns {Array<Object>}
713
  * @returns {Array<Object>}
691
  */
714
  */
692
-export function getPinnedActiveParticipants(state) {
715
+export function getPinnedActiveParticipants(state: IReduxState) {
693
     const { activeParticipants } = state['features/filmstrip'];
716
     const { activeParticipants } = state['features/filmstrip'];
694
 
717
 
695
     return activeParticipants.filter(p => p.pinned);
718
     return activeParticipants.filter(p => p.pinned);
703
  * to be displayed.
726
  * to be displayed.
704
  * @returns {boolean}
727
  * @returns {boolean}
705
  */
728
  */
706
-export function isStageFilmstripAvailable(state, minParticipantCount = 0) {
729
+export function isStageFilmstripAvailable(state: IReduxState, minParticipantCount = 0) {
707
     const { activeParticipants } = state['features/filmstrip'];
730
     const { activeParticipants } = state['features/filmstrip'];
708
     const { remoteScreenShares } = state['features/video-layout'];
731
     const { remoteScreenShares } = state['features/video-layout'];
709
-    const sharedVideo = isSharingStatus(state['features/shared-video']?.status);
732
+    const sharedVideo = isSharingStatus(state['features/shared-video']?.status ?? '');
710
 
733
 
711
     return isStageFilmstripEnabled(state) && !sharedVideo
734
     return isStageFilmstripEnabled(state) && !sharedVideo
712
         && activeParticipants.length >= minParticipantCount
735
         && activeParticipants.length >= minParticipantCount
721
  * to be displayed.
744
  * to be displayed.
722
  * @returns {boolean}
745
  * @returns {boolean}
723
  */
746
  */
724
-export function isStageFilmstripTopPanel(state, minParticipantCount = 0) {
747
+export function isStageFilmstripTopPanel(state: IReduxState, minParticipantCount = 0) {
725
     const { remoteScreenShares } = state['features/video-layout'];
748
     const { remoteScreenShares } = state['features/video-layout'];
726
 
749
 
727
     return isTopPanelEnabled(state)
750
     return isTopPanelEnabled(state)
734
  * @param {Object} state - Redux state.
757
  * @param {Object} state - Redux state.
735
  * @returns {boolean}
758
  * @returns {boolean}
736
  */
759
  */
737
-export function isStageFilmstripEnabled(state) {
760
+export function isStageFilmstripEnabled(state: IReduxState) {
738
     const { filmstrip } = state['features/base/config'];
761
     const { filmstrip } = state['features/base/config'];
739
 
762
 
740
     return !filmstrip?.disableStageFilmstrip && interfaceConfig.VERTICAL_FILMSTRIP;
763
     return !filmstrip?.disableStageFilmstrip && interfaceConfig.VERTICAL_FILMSTRIP;
747
  * @param {string} filmstripType - The current filmstrip type.
770
  * @param {string} filmstripType - The current filmstrip type.
748
  * @returns {string}
771
  * @returns {string}
749
  */
772
  */
750
-export function getThumbnailTypeFromLayout(currentLayout, filmstripType) {
773
+export function getThumbnailTypeFromLayout(currentLayout: string, filmstripType: string) {
751
     switch (currentLayout) {
774
     switch (currentLayout) {
752
     case LAYOUTS.TILE_VIEW:
775
     case LAYOUTS.TILE_VIEW:
753
         return THUMBNAIL_TYPE.TILE;
776
         return THUMBNAIL_TYPE.TILE;
770
  * @param {Object} state - Redux state.
793
  * @param {Object} state - Redux state.
771
  * @returns {string} - The participant id.
794
  * @returns {string} - The participant id.
772
  */
795
  */
773
-export function getScreenshareFilmstripParticipantId(state) {
796
+export function getScreenshareFilmstripParticipantId(state: IReduxState) {
774
     const { screenshareFilmstripParticipantId } = state['features/filmstrip'];
797
     const { screenshareFilmstripParticipantId } = state['features/filmstrip'];
775
     const screenshares = state['features/video-layout'].remoteScreenShares;
798
     const screenshares = state['features/video-layout'].remoteScreenShares;
776
     let id = screenshares.find(sId => sId === screenshareFilmstripParticipantId);
799
     let id = screenshares.find(sId => sId === screenshareFilmstripParticipantId);
788
  * @param {Object} state - Redux state.
811
  * @param {Object} state - Redux state.
789
  * @returns {boolean}
812
  * @returns {boolean}
790
  */
813
  */
791
-export function isTopPanelEnabled(state) {
814
+export function isTopPanelEnabled(state: IReduxState) {
792
     const { filmstrip } = state['features/base/config'];
815
     const { filmstrip } = state['features/base/config'];
793
     const participantsCount = getParticipantCount(state);
816
     const participantsCount = getParticipantCount(state);
794
 
817
 

react/features/filmstrip/logger.js → react/features/filmstrip/logger.ts 查看文件

1
-// @flow
2
-
3
 import { getLogger } from '../base/logging/functions';
1
 import { getLogger } from '../base/logging/functions';
4
 
2
 
5
 export default getLogger('features/filmstrip');
3
 export default getLogger('features/filmstrip');

react/features/filmstrip/middleware.native.js → react/features/filmstrip/middleware.native.ts 查看文件

1
-// @flow
1
+import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../base/participants/actionTypes';
2
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
3
+import { CLIENT_RESIZED, SAFE_AREA_INSETS_CHANGED, SET_ASPECT_RATIO } from '../base/responsive-ui/actionTypes';
2
 
4
 
3
-import { PARTICIPANT_JOINED, PARTICIPANT_LEFT } from '../base/participants';
4
-import { MiddlewareRegistry } from '../base/redux';
5
-import { CLIENT_RESIZED, SAFE_AREA_INSETS_CHANGED, SET_ASPECT_RATIO } from '../base/responsive-ui';
6
-
7
-import { setTileViewDimensions } from './actions';
8
-import { updateRemoteParticipants, updateRemoteParticipantsOnLeave } from './functions';
9
-import './subscriber';
5
+import { setTileViewDimensions } from './actions.native';
6
+import { updateRemoteParticipants, updateRemoteParticipantsOnLeave } from './functions.native';
7
+import './subscriber.native';
10
 
8
 
11
 /**
9
 /**
12
  * The middleware of the feature Filmstrip.
10
  * The middleware of the feature Filmstrip.

react/features/filmstrip/middleware.web.js → react/features/filmstrip/middleware.web.ts 查看文件

1
-// @flow
2
-
3
 import { batch } from 'react-redux';
1
 import { batch } from 'react-redux';
4
 
2
 
3
+// @ts-expect-error
5
 import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
4
 import VideoLayout from '../../../modules/UI/videolayout/VideoLayout';
6
 import {
5
 import {
7
     DOMINANT_SPEAKER_CHANGED,
6
     DOMINANT_SPEAKER_CHANGED,
8
     PARTICIPANT_JOINED,
7
     PARTICIPANT_JOINED,
9
-    PARTICIPANT_LEFT,
8
+    PARTICIPANT_LEFT
9
+} from '../base/participants/actionTypes';
10
+import {
10
     getDominantSpeakerParticipant,
11
     getDominantSpeakerParticipant,
11
     getLocalParticipant,
12
     getLocalParticipant,
12
     getLocalScreenShareParticipant,
13
     getLocalScreenShareParticipant,
13
     isScreenShareParticipant
14
     isScreenShareParticipant
14
-} from '../base/participants';
15
-import { MiddlewareRegistry } from '../base/redux';
16
-import { CLIENT_RESIZED } from '../base/responsive-ui';
17
-import { SETTINGS_UPDATED } from '../base/settings';
18
-import {
19
-    LAYOUTS,
20
-    getCurrentLayout,
21
-    setTileView
22
-} from '../video-layout';
15
+} from '../base/participants/functions';
16
+import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
17
+import { CLIENT_RESIZED } from '../base/responsive-ui/actionTypes';
18
+import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
19
+import { setTileView } from '../video-layout/actions.web';
20
+import { LAYOUTS } from '../video-layout/constants';
21
+import { getCurrentLayout } from '../video-layout/functions.web';
23
 
22
 
24
 import {
23
 import {
25
     ADD_STAGE_PARTICIPANT,
24
     ADD_STAGE_PARTICIPANT,
54
     updateRemoteParticipants,
53
     updateRemoteParticipants,
55
     updateRemoteParticipantsOnLeave
54
     updateRemoteParticipantsOnLeave
56
 } from './functions.web';
55
 } from './functions.web';
57
-import './subscriber';
56
+import './subscriber.web';
58
 
57
 
59
 /**
58
 /**
60
  * Map of timers.
59
  * Map of timers.
87
             const { clientWidth, clientHeight } = action;
86
             const { clientWidth, clientHeight } = action;
88
             let height, width;
87
             let height, width;
89
 
88
 
90
-            if (filmstripWidth.current > clientWidth - MIN_STAGE_VIEW_WIDTH) {
89
+            if ((filmstripWidth.current ?? 0) > clientWidth - MIN_STAGE_VIEW_WIDTH) {
91
                 width = Math.max(clientWidth - MIN_STAGE_VIEW_WIDTH, DEFAULT_FILMSTRIP_WIDTH);
90
                 width = Math.max(clientWidth - MIN_STAGE_VIEW_WIDTH, DEFAULT_FILMSTRIP_WIDTH);
92
             } else {
91
             } else {
93
-                width = Math.min(clientWidth - MIN_STAGE_VIEW_WIDTH, filmstripWidth.userSet);
92
+                width = Math.min(clientWidth - MIN_STAGE_VIEW_WIDTH, filmstripWidth.userSet ?? 0);
94
             }
93
             }
95
             if (width !== filmstripWidth.current) {
94
             if (width !== filmstripWidth.current) {
96
                 store.dispatch(setFilmstripWidth(width));
95
                 store.dispatch(setFilmstripWidth(width));
97
             }
96
             }
98
 
97
 
99
-            if (topPanelHeight.current > clientHeight - MIN_STAGE_VIEW_HEIGHT) {
98
+            if ((topPanelHeight.current ?? 0) > clientHeight - MIN_STAGE_VIEW_HEIGHT) {
100
                 height = Math.max(clientHeight - MIN_STAGE_VIEW_HEIGHT, TOP_FILMSTRIP_HEIGHT);
99
                 height = Math.max(clientHeight - MIN_STAGE_VIEW_HEIGHT, TOP_FILMSTRIP_HEIGHT);
101
             } else {
100
             } else {
102
-                height = Math.min(clientHeight - MIN_STAGE_VIEW_HEIGHT, topPanelHeight.userSet);
101
+                height = Math.min(clientHeight - MIN_STAGE_VIEW_HEIGHT, topPanelHeight.userSet ?? 0);
103
             }
102
             }
104
             if (height !== topPanelHeight.current) {
103
             if (height !== topPanelHeight.current) {
105
                 store.dispatch(setFilmstripHeight(height));
104
                 store.dispatch(setFilmstripHeight(height));
127
             const localScreenShare = getLocalScreenShareParticipant(state);
126
             const localScreenShare = getLocalScreenShareParticipant(state);
128
             const activeParticipantsIds = getActiveParticipantsIds(state);
127
             const activeParticipantsIds = getActiveParticipantsIds(state);
129
 
128
 
130
-            if (activeParticipantsIds.find(id => id === local.id)) {
131
-                store.dispatch(removeStageParticipant(local.id));
129
+            if (activeParticipantsIds.find(id => id === local?.id)) {
130
+                store.dispatch(removeStageParticipant(local?.id ?? ''));
132
             }
131
             }
133
 
132
 
134
             if (localScreenShare) {
133
             if (localScreenShare) {
181
 
180
 
182
             clearTimeout(tid);
181
             clearTimeout(tid);
183
             timers.delete(participantId);
182
             timers.delete(participantId);
184
-        } else if (activeParticipants.length < maxStageParticipants) {
183
+        } else if (activeParticipants.length < (maxStageParticipants ?? 0)) {
185
             queue = [ ...activeParticipants, {
184
             queue = [ ...activeParticipants, {
186
                 participantId,
185
                 participantId,
187
                 pinned
186
                 pinned
252
         const currentLayout = getCurrentLayout(state);
251
         const currentLayout = getCurrentLayout(state);
253
         const dominantSpeaker = getDominantSpeakerParticipant(state);
252
         const dominantSpeaker = getDominantSpeakerParticipant(state);
254
 
253
 
255
-        if (dominantSpeaker?.id === id || id === local.id || currentLayout === LAYOUTS.TILE_VIEW) {
254
+        if (dominantSpeaker?.id === id || id === local?.id || currentLayout === LAYOUTS.TILE_VIEW) {
256
             break;
255
             break;
257
         }
256
         }
258
 
257
 

react/features/filmstrip/subscriber.any.js → react/features/filmstrip/subscriber.any.ts 查看文件

1
-// @flow
2
-
3
-import { StateListenerRegistry } from '../base/redux';
1
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
4
 
2
 
5
 import { isFilmstripScrollVisible, updateRemoteParticipants } from './functions';
3
 import { isFilmstripScrollVisible, updateRemoteParticipants } from './functions';
6
 
4
 

react/features/filmstrip/subscriber.native.js → react/features/filmstrip/subscriber.native.ts 查看文件

1
-// @flow
2
-
3
 import { getCurrentConference } from '../base/conference/functions';
1
 import { getCurrentConference } from '../base/conference/functions';
4
-import { StateListenerRegistry } from '../base/redux';
5
-import { shouldDisplayTileView } from '../video-layout';
2
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
3
+import { shouldDisplayTileView } from '../video-layout/functions.native';
6
 
4
 
7
-import { setRemoteParticipants, setTileViewDimensions } from './actions';
5
+import { setRemoteParticipants, setTileViewDimensions } from './actions.native';
8
 import { getTileViewParticipantCount } from './functions.native';
6
 import { getTileViewParticipantCount } from './functions.native';
9
 import './subscriber.any';
7
 import './subscriber.any';
10
 
8
 

react/features/filmstrip/subscriber.web.js → react/features/filmstrip/subscriber.web.ts 查看文件

1
-// @flow
2
-
3
 import { isMobileBrowser } from '../base/environment/utils';
1
 import { isMobileBrowser } from '../base/environment/utils';
4
-import { getParticipantCountWithFake, pinParticipant } from '../base/participants';
5
-import { StateListenerRegistry } from '../base/redux';
6
-import { clientResized } from '../base/responsive-ui';
7
-import { shouldHideSelfView } from '../base/settings';
8
-import { setFilmstripVisible } from '../filmstrip/actions';
2
+import { pinParticipant } from '../base/participants/actions';
3
+import { getParticipantCountWithFake } from '../base/participants/functions';
4
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
5
+import { clientResized } from '../base/responsive-ui/actions';
6
+import { shouldHideSelfView } from '../base/settings/functions.web';
7
+// eslint-disable-next-line lines-around-comment
8
+// @ts-ignore
9
 import { selectParticipantInLargeVideo } from '../large-video/actions.any';
9
 import { selectParticipantInLargeVideo } from '../large-video/actions.any';
10
 import { getParticipantsPaneOpen } from '../participants-pane/functions';
10
 import { getParticipantsPaneOpen } from '../participants-pane/functions';
11
 import { setOverflowDrawer } from '../toolbox/actions.web';
11
 import { setOverflowDrawer } from '../toolbox/actions.web';
12
-import { LAYOUTS, getCurrentLayout, shouldDisplayTileView } from '../video-layout';
12
+import { LAYOUTS } from '../video-layout/constants';
13
+import { getCurrentLayout, shouldDisplayTileView } from '../video-layout/functions.web';
13
 
14
 
14
-import {
15
-    clearStageParticipants,
15
+import { clearStageParticipants,
16
+    setFilmstripVisible,
16
     setHorizontalViewDimensions,
17
     setHorizontalViewDimensions,
17
     setScreenshareFilmstripParticipant,
18
     setScreenshareFilmstripParticipant,
18
     setScreensharingTileDimensions,
19
     setScreensharingTileDimensions,

+ 1
- 1
react/features/follow-me/subscriber.ts 查看文件

7
 import StateListenerRegistry from '../base/redux/StateListenerRegistry';
7
 import StateListenerRegistry from '../base/redux/StateListenerRegistry';
8
 // eslint-disable-next-line lines-around-comment
8
 // eslint-disable-next-line lines-around-comment
9
 // @ts-ignore
9
 // @ts-ignore
10
-import { getPinnedActiveParticipants, isStageFilmstripEnabled } from '../filmstrip/functions.web';
10
+import { getPinnedActiveParticipants, isStageFilmstripEnabled } from '../filmstrip/functions';
11
 import { shouldDisplayTileView } from '../video-layout/functions';
11
 import { shouldDisplayTileView } from '../video-layout/functions';
12
 
12
 
13
 import { FOLLOW_ME_COMMAND } from './constants';
13
 import { FOLLOW_ME_COMMAND } from './constants';

+ 1
- 0
react/features/notifications/types.ts 查看文件

8
     description?: string | React.ReactNode;
8
     description?: string | React.ReactNode;
9
     descriptionArguments?: Object;
9
     descriptionArguments?: Object;
10
     descriptionKey?: string;
10
     descriptionKey?: string;
11
+    hideErrorSupportLink?: boolean;
11
     icon?: string;
12
     icon?: string;
12
     maxLines?: number;
13
     maxLines?: number;
13
     sticky?: boolean;
14
     sticky?: boolean;

react/features/overlay/functions.js → react/features/overlay/functions.ts 查看文件

1
-// @flow
1
+import { IReduxState } from '../app/types';
2
 
2
 
3
 import { getOverlays } from './overlays';
3
 import { getOverlays } from './overlays';
4
 
4
 
5
 /**
5
 /**
6
  * Returns the overlay to be currently rendered.
6
  * Returns the overlay to be currently rendered.
7
  *
7
  *
8
- * @param {Object} state - The Redux state.
8
+ * @param {IReduxState} state - The Redux state.
9
  * @returns {?React$ComponentType<*>}
9
  * @returns {?React$ComponentType<*>}
10
  */
10
  */
11
-export function getOverlayToRender(state: Object) {
11
+export function getOverlayToRender(state: IReduxState) {
12
     for (const overlay of getOverlays()) {
12
     for (const overlay of getOverlays()) {
13
         // react-i18n / react-redux wrap components and thus we cannot access
13
         // react-i18n / react-redux wrap components and thus we cannot access
14
         // the wrapped component's static methods directly.
14
         // the wrapped component's static methods directly.
15
+        // @ts-ignore
15
         const component = overlay.WrappedComponent || overlay;
16
         const component = overlay.WrappedComponent || overlay;
16
 
17
 
17
         if (component.needsRender(state)) {
18
         if (component.needsRender(state)) {
25
 /**
26
 /**
26
  * Returns the visibility of the media permissions prompt.
27
  * Returns the visibility of the media permissions prompt.
27
  *
28
  *
28
- * @param {Object} state - The Redux state.
29
+ * @param {IReduxState} state - The Redux state.
29
  * @returns {boolean}
30
  * @returns {boolean}
30
  */
31
  */
31
-export function getMediaPermissionPromptVisibility(state: Object) {
32
+export function getMediaPermissionPromptVisibility(state: IReduxState) {
32
     return state['features/overlay'].isMediaPermissionPromptVisible;
33
     return state['features/overlay'].isMediaPermissionPromptVisible;
33
 }
34
 }

react/features/overlay/logger.js → react/features/overlay/logger.ts 查看文件

1
-// @flow
2
-
3
 import { getLogger } from '../base/logging/functions';
1
 import { getLogger } from '../base/logging/functions';
4
 
2
 
5
 export default getLogger('features/overlay');
3
 export default getLogger('features/overlay');

react/features/overlay/middleware.js → react/features/overlay/middleware.ts 查看文件

1
-// @flow
2
-
1
+import { IStore } from '../app/types';
3
 import { JitsiConferenceErrors } from '../base/lib-jitsi-meet';
2
 import { JitsiConferenceErrors } from '../base/lib-jitsi-meet';
4
 import {
3
 import {
5
     isFatalJitsiConferenceError,
4
     isFatalJitsiConferenceError,
6
     isFatalJitsiConnectionError
5
     isFatalJitsiConnectionError
7
 } from '../base/lib-jitsi-meet/functions';
6
 } from '../base/lib-jitsi-meet/functions';
8
-import { StateListenerRegistry } from '../base/redux';
7
+import StateListenerRegistry from '../base/redux/StateListenerRegistry';
9
 
8
 
10
 import { setFatalError } from './actions';
9
 import { setFatalError } from './actions';
11
 
10
 
12
-declare var APP: Object;
13
-
14
 /**
11
 /**
15
  * Error type. Basically like Error, but augmented with a recoverable property.
12
  * Error type. Basically like Error, but augmented with a recoverable property.
16
  */
13
  */
17
-type ErrorType = {|
14
+type ErrorType = {
18
 
15
 
19
     /**
16
     /**
20
      * Error message.
17
      * Error message.
21
      */
18
      */
22
-    message?: string,
19
+    message?: string;
23
 
20
 
24
     /**
21
     /**
25
      * Error name.
22
      * Error name.
26
      */
23
      */
27
-    name: string,
24
+    name: string;
28
 
25
 
29
     /**
26
     /**
30
      * Indicates whether this event is recoverable or not.
27
      * Indicates whether this event is recoverable or not.
31
      */
28
      */
32
-    recoverable?: boolean
33
-|};
29
+    recoverable?: boolean;
30
+};
34
 
31
 
35
 /**
32
 /**
36
  * List of errors that are not fatal (or handled differently) so then the overlays won't kick in.
33
  * List of errors that are not fatal (or handled differently) so then the overlays won't kick in.
54
  * @param {Object|string} error - The error to process.
51
  * @param {Object|string} error - The error to process.
55
  * @returns {void}
52
  * @returns {void}
56
  */
53
  */
57
-const getErrorExtraInfo = (getState, error) => {
54
+const getErrorExtraInfo = (getState: IStore['getState'], error: ErrorType) => {
58
     const state = getState();
55
     const state = getState();
59
     const { error: conferenceError } = state['features/base/conference'];
56
     const { error: conferenceError } = state['features/base/conference'];
60
     const { error: configError } = state['features/base/config'];
57
     const { error: configError } = state['features/base/config'];
62
 
59
 
63
     if (error === conferenceError) {
60
     if (error === conferenceError) {
64
         return {
61
         return {
65
-            type: ERROR_TYPES.CONFERENCE,
62
+            type: ERROR_TYPES.CONFERENCE, // @ts-ignore
66
             isFatal: isFatalJitsiConferenceError(error.name || error)
63
             isFatal: isFatalJitsiConferenceError(error.name || error)
67
         };
64
         };
68
     }
65
     }
76
 
73
 
77
     if (error === connectionError) {
74
     if (error === connectionError) {
78
         return {
75
         return {
79
-            type: ERROR_TYPES.CONNECTION,
76
+            type: ERROR_TYPES.CONNECTION, // @ts-ignore
80
             isFatal: isFatalJitsiConnectionError(error.name || error)
77
             isFatal: isFatalJitsiConnectionError(error.name || error)
81
         };
78
         };
82
     }
79
     }

+ 0
- 16
react/features/overlay/overlays.native.js 查看文件

1
-// @flow
2
-
3
-import {
4
-    PageReloadOverlay
5
-} from './components/native';
6
-
7
-/**
8
- * Returns the list of available platform specific overlays.
9
- *
10
- * @returns {Array<React$Element>}
11
- */
12
-export function getOverlays(): Array<React$Element<*>> {
13
-    return [
14
-        PageReloadOverlay
15
-    ];
16
-}

+ 15
- 0
react/features/overlay/overlays.native.ts 查看文件

1
+import { ReactElement } from 'react';
2
+
3
+// @ts-ignore
4
+import { PageReloadOverlay } from './components/native';
5
+
6
+/**
7
+ * Returns the list of available platform specific overlays.
8
+ *
9
+ * @returns {Array<ReactElement>}
10
+ */
11
+export function getOverlays(): Array<ReactElement> {
12
+    return [
13
+        PageReloadOverlay
14
+    ];
15
+}

react/features/overlay/overlays.web.js → react/features/overlay/overlays.web.ts 查看文件

1
-// @flow
2
-
3
 import {
1
 import {
4
     PageReloadOverlay,
2
     PageReloadOverlay,
5
     SuspendedOverlay,
3
     SuspendedOverlay,
6
     UserMediaPermissionsOverlay
4
     UserMediaPermissionsOverlay
5
+
6
+    // @ts-ignore
7
 } from './components/web';
7
 } from './components/web';
8
 
8
 
9
 /**
9
 /**

+ 1
- 1
react/features/prejoin/functions.ts 查看文件

1
 import { IReduxState } from '../app/types';
1
 import { IReduxState } from '../app/types';
2
 import { getRoomName } from '../base/conference/functions';
2
 import { getRoomName } from '../base/conference/functions';
3
-import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions.web';
3
+import { getDialOutStatusUrl, getDialOutUrl } from '../base/config/functions';
4
 import { isAudioMuted, isVideoMutedByUser } from '../base/media/functions';
4
 import { isAudioMuted, isVideoMutedByUser } from '../base/media/functions';
5
 
5
 
6
 /**
6
 /**

+ 13
- 1
react/features/reactions/actions.any.ts 查看文件

4
     FLUSH_REACTION_BUFFER,
4
     FLUSH_REACTION_BUFFER,
5
     PUSH_REACTIONS,
5
     PUSH_REACTIONS,
6
     SEND_REACTIONS,
6
     SEND_REACTIONS,
7
-    SET_REACTION_QUEUE
7
+    SET_REACTION_QUEUE,
8
+    SHOW_SOUNDS_NOTIFICATION
8
 } from './actionTypes';
9
 } from './actionTypes';
9
 import { IReactionEmojiProps } from './constants';
10
 import { IReactionEmojiProps } from './constants';
10
 import { IReactionsAction } from './reducer';
11
 import { IReactionsAction } from './reducer';
98
         reactions
99
         reactions
99
     };
100
     };
100
 }
101
 }
102
+
103
+/**
104
+ * Displays the disable sounds notification.
105
+ *
106
+ * @returns {void}
107
+ */
108
+export function displayReactionSoundsNotification(): IReactionsAction {
109
+    return {
110
+        type: SHOW_SOUNDS_NOTIFICATION
111
+    };
112
+}

+ 1
- 0
react/features/reactions/actions.native.ts 查看文件

1
+export * from './actions.any';

+ 2
- 12
react/features/reactions/actions.web.ts 查看文件

1
 import {
1
 import {
2
-    SHOW_SOUNDS_NOTIFICATION,
3
     TOGGLE_REACTIONS_VISIBLE
2
     TOGGLE_REACTIONS_VISIBLE
4
 } from './actionTypes';
3
 } from './actionTypes';
5
 import { IReactionsAction } from './reducer';
4
 import { IReactionsAction } from './reducer';
6
 
5
 
6
+export * from './actions.any';
7
+
7
 /**
8
 /**
8
  * Toggles the visibility of the reactions menu.
9
  * Toggles the visibility of the reactions menu.
9
  *
10
  *
14
         type: TOGGLE_REACTIONS_VISIBLE
15
         type: TOGGLE_REACTIONS_VISIBLE
15
     };
16
     };
16
 }
17
 }
17
-
18
-/**
19
- * Displays the disable sounds notification.
20
- *
21
- * @returns {void}
22
- */
23
-export function displayReactionSoundsNotification(): IReactionsAction {
24
-    return {
25
-        type: SHOW_SOUNDS_NOTIFICATION
26
-    };
27
-}

+ 2
- 2
react/features/reactions/middleware.ts 查看文件

28
 } from './actionTypes';
28
 } from './actionTypes';
29
 import {
29
 import {
30
     addReactionsToChat,
30
     addReactionsToChat,
31
+    displayReactionSoundsNotification,
31
     flushReactionBuffer,
32
     flushReactionBuffer,
32
     pushReactions,
33
     pushReactions,
33
     sendReactions,
34
     sendReactions,
34
     setReactionQueue
35
     setReactionQueue
35
-} from './actions.any';
36
-import { displayReactionSoundsNotification } from './actions.web';
36
+} from './actions';
37
 import {
37
 import {
38
     ENDPOINT_REACTION_NAME,
38
     ENDPOINT_REACTION_NAME,
39
     IMuteCommandAttributes,
39
     IMuteCommandAttributes,

+ 2
- 2
react/features/screen-share/actions.web.ts 查看文件

1
 import { IStore } from '../app/types';
1
 import { IStore } from '../app/types';
2
 import { openDialog } from '../base/dialog/actions';
2
 import { openDialog } from '../base/dialog/actions';
3
 import { browser } from '../base/lib-jitsi-meet';
3
 import { browser } from '../base/lib-jitsi-meet';
4
-import { shouldHideShareAudioHelper } from '../base/settings/functions';
5
-import { toggleScreensharing } from '../base/tracks/actions';
4
+import { shouldHideShareAudioHelper } from '../base/settings/functions.web';
5
+import { toggleScreensharing } from '../base/tracks/actions.web';
6
 
6
 
7
 import {
7
 import {
8
     SET_SCREENSHARE_TRACKS,
8
     SET_SCREENSHARE_TRACKS,

+ 2
- 2
react/features/screen-share/components/web/ShareAudioDialog.tsx 查看文件

5
 import { translate } from '../../../base/i18n/functions';
5
 import { translate } from '../../../base/i18n/functions';
6
 import { connect } from '../../../base/redux/functions';
6
 import { connect } from '../../../base/redux/functions';
7
 import { updateSettings } from '../../../base/settings/actions';
7
 import { updateSettings } from '../../../base/settings/actions';
8
-import { shouldHideShareAudioHelper } from '../../../base/settings/functions.any';
9
-import { toggleScreensharing } from '../../../base/tracks/actions';
8
+import { shouldHideShareAudioHelper } from '../../../base/settings/functions.web';
9
+import { toggleScreensharing } from '../../../base/tracks/actions.web';
10
 import Checkbox from '../../../base/ui/components/web/Checkbox';
10
 import Checkbox from '../../../base/ui/components/web/Checkbox';
11
 import Dialog from '../../../base/ui/components/web/Dialog';
11
 import Dialog from '../../../base/ui/components/web/Dialog';
12
 
12
 

+ 1
- 1
react/features/settings/middleware.web.ts 查看文件

1
 import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
1
 import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
2
 import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
2
 import { SETTINGS_UPDATED } from '../base/settings/actionTypes';
3
-import { getHideSelfView } from '../base/settings/functions';
3
+import { getHideSelfView } from '../base/settings/functions.web';
4
 import { showNotification } from '../notifications/actions';
4
 import { showNotification } from '../notifications/actions';
5
 import { DISABLE_SELF_VIEW_NOTIFICATION_ID, NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
5
 import { DISABLE_SELF_VIEW_NOTIFICATION_ID, NOTIFICATION_TIMEOUT_TYPE } from '../notifications/constants';
6
 
6
 

+ 1
- 1
react/features/toolbox/actions.any.ts 查看文件

22
  *     enabled: boolean
22
  *     enabled: boolean
23
  * }}
23
  * }}
24
  */
24
  */
25
-export function setToolboxEnabled(enabled: boolean): Object {
25
+export function setToolboxEnabled(enabled: boolean) {
26
     return {
26
     return {
27
         type: SET_TOOLBOX_ENABLED,
27
         type: SET_TOOLBOX_ENABLED,
28
         enabled
28
         enabled

+ 1
- 1
react/features/video-layout/functions.web.ts 查看文件

26
  * @returns {number}
26
  * @returns {number}
27
  */
27
  */
28
 export function getMaxColumnCount(state: IReduxState, options: {
28
 export function getMaxColumnCount(state: IReduxState, options: {
29
-    disableResponsiveTiles?: boolean; disableTileEnlargement?: boolean; width?: number; } = {}) {
29
+    disableResponsiveTiles?: boolean; disableTileEnlargement?: boolean; width?: number | null; } = {}) {
30
     if (typeof interfaceConfig === 'undefined') {
30
     if (typeof interfaceConfig === 'undefined') {
31
         return DEFAULT_MAX_COLUMNS;
31
         return DEFAULT_MAX_COLUMNS;
32
     }
32
     }

+ 2
- 2
react/features/video-layout/subscriber.ts 查看文件

2
 import { equals } from '../base/redux/functions';
2
 import { equals } from '../base/redux/functions';
3
 import { isFollowMeActive } from '../follow-me/functions';
3
 import { isFollowMeActive } from '../follow-me/functions';
4
 
4
 
5
-import { virtualScreenshareParticipantsUpdated } from './actions.web';
6
-import { getAutoPinSetting, updateAutoPinnedParticipant } from './functions.web';
5
+import { virtualScreenshareParticipantsUpdated } from './actions';
6
+import { getAutoPinSetting, updateAutoPinnedParticipant } from './functions';
7
 
7
 
8
 StateListenerRegistry.register(
8
 StateListenerRegistry.register(
9
     /* selector */ state => state['features/base/participants'].sortedRemoteVirtualScreenshareParticipants,
9
     /* selector */ state => state['features/base/participants'].sortedRemoteVirtualScreenshareParticipants,

+ 2
- 1
react/features/video-quality/subscriber.ts 查看文件

16
 } from '../filmstrip/functions';
16
 } from '../filmstrip/functions';
17
 import { LAYOUTS } from '../video-layout/constants';
17
 import { LAYOUTS } from '../video-layout/constants';
18
 import {
18
 import {
19
+    getCurrentLayout,
19
     getVideoQualityForLargeVideo,
20
     getVideoQualityForLargeVideo,
20
     getVideoQualityForResizableFilmstripThumbnails,
21
     getVideoQualityForResizableFilmstripThumbnails,
22
+    getVideoQualityForScreenSharingFilmstrip,
21
     getVideoQualityForStageThumbnails,
23
     getVideoQualityForStageThumbnails,
22
     shouldDisplayTileView
24
     shouldDisplayTileView
23
 } from '../video-layout/functions';
25
 } from '../video-layout/functions';
24
-import { getCurrentLayout, getVideoQualityForScreenSharingFilmstrip } from '../video-layout/functions.any';
25
 
26
 
26
 import {
27
 import {
27
     setMaxReceiverVideoQualityForLargeVideo,
28
     setMaxReceiverVideoQualityForLargeVideo,

正在加载...
取消
保存