Преглед на файлове

ref: reduce device popup bundle size

master
Bettenbuk Zoltan преди 5 години
родител
ревизия
382ec011eb

+ 3
- 3
react/features/base/dialog/components/web/AbstractDialogTab.js Целия файл

29
  *
29
  *
30
  * @extends Component
30
  * @extends Component
31
  */
31
  */
32
-class AbstractDialogTab extends Component<Props> {
32
+class AbstractDialogTab<P: Props, S: *> extends Component<P, S> {
33
     /**
33
     /**
34
      * Initializes a new {@code AbstractDialogTab} instance.
34
      * Initializes a new {@code AbstractDialogTab} instance.
35
      *
35
      *
36
-     * @param {Object} props - The read-only properties with which the new
36
+     * @param {P} props - The read-only properties with which the new
37
      * instance is to be initialized.
37
      * instance is to be initialized.
38
      */
38
      */
39
-    constructor(props: Props) {
39
+    constructor(props: P) {
40
         super(props);
40
         super(props);
41
 
41
 
42
         // Bind event handler so it is only bound once for every instance.
42
         // Bind event handler so it is only bound once for every instance.

+ 3
- 2
react/features/base/dialog/components/web/DialogWithTabs.js Целия файл

3
 import Tabs from '@atlaskit/tabs';
3
 import Tabs from '@atlaskit/tabs';
4
 import React, { Component } from 'react';
4
 import React, { Component } from 'react';
5
 
5
 
6
-import { StatelessDialog } from '../../../dialog';
7
-import { translate } from '../../../i18n';
6
+import { translate } from '../../../i18n/functions';
8
 
7
 
9
 import logger from '../../logger';
8
 import logger from '../../logger';
10
 
9
 
10
+import StatelessDialog from './StatelessDialog';
11
+
11
 /**
12
 /**
12
  * The type of the React {@code Component} props of {@link DialogWithTabs}.
13
  * The type of the React {@code Component} props of {@link DialogWithTabs}.
13
  */
14
  */

+ 1
- 1
react/features/base/dialog/components/web/StatelessDialog.js Целия файл

5
 import _ from 'lodash';
5
 import _ from 'lodash';
6
 import React, { Component } from 'react';
6
 import React, { Component } from 'react';
7
 
7
 
8
-import { translate } from '../../../i18n';
8
+import { translate } from '../../../i18n/functions';
9
 
9
 
10
 import type { DialogProps } from '../../constants';
10
 import type { DialogProps } from '../../constants';
11
 
11
 

+ 1
- 1
react/features/base/logging/functions.js Целия файл

33
     }
33
     }
34
 
34
 
35
     // Lazy load it to avoid cycles in early web bootstrap code.
35
     // Lazy load it to avoid cycles in early web bootstrap code.
36
-    const { default: JitsiMeetJS } = require('../lib-jitsi-meet');
36
+    const { default: JitsiMeetJS } = require('../lib-jitsi-meet/_');
37
 
37
 
38
     Logger.setGlobalOptions(DEFAULT_RN_OPTS);
38
     Logger.setGlobalOptions(DEFAULT_RN_OPTS);
39
     JitsiMeetJS.setGlobalLogOptions(DEFAULT_RN_OPTS);
39
     JitsiMeetJS.setGlobalLogOptions(DEFAULT_RN_OPTS);

+ 1
- 1
react/features/base/media/components/AbstractAudio.js Целия файл

36
      * @type {Object | string}
36
      * @type {Object | string}
37
      */
37
      */
38
     src: Object | string,
38
     src: Object | string,
39
-    stream: Object,
39
+    stream?: Object,
40
     loop?: ?boolean
40
     loop?: ?boolean
41
 }
41
 }
42
 
42
 

+ 5
- 0
react/features/base/media/components/Audio.native.js Целия файл

1
+// @flow
2
+
3
+import Audio from './native/Audio';
4
+
5
+export default Audio;

+ 5
- 0
react/features/base/media/components/Audio.web.js Целия файл

1
+// @flow
2
+
3
+import Audio from './web/Audio';
4
+
5
+export default Audio;

+ 5
- 0
react/features/base/media/components/Video.native.js Целия файл

1
+// @flow
2
+
3
+import Video from './native/Video';
4
+
5
+export default Video;

+ 5
- 0
react/features/base/media/components/Video.web.js Целия файл

1
+// @flow
2
+
3
+import Video from './web/Video';
4
+
5
+export default Video;

+ 1
- 1
react/features/base/media/components/web/Video.js Целия файл

21
     /**
21
     /**
22
      * Optional callback to invoke once the video starts playing.
22
      * Optional callback to invoke once the video starts playing.
23
      */
23
      */
24
-    onVideoPlaying: Function,
24
+    onVideoPlaying?: Function,
25
 
25
 
26
     /**
26
     /**
27
      * The JitsiLocalTrack to display.
27
      * The JitsiLocalTrack to display.

+ 3
- 1
react/features/device-selection/components/AudioInputPreview.js Целия файл

2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
-import { JitsiTrackEvents } from '../../base/lib-jitsi-meet';
5
+import JitsiMeetJS from '../../base/lib-jitsi-meet/_';
6
+
7
+const JitsiTrackEvents = JitsiMeetJS.events.track;
6
 
8
 
7
 /**
9
 /**
8
  * The type of the React {@code Component} props of {@link AudioInputPreview}.
10
  * The type of the React {@code Component} props of {@link AudioInputPreview}.

+ 2
- 2
react/features/device-selection/components/AudioOutputPreview.js Целия файл

2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
-import { translate } from '../../base/i18n';
6
-import { Audio } from '../../base/media';
5
+import { translate } from '../../base/i18n/functions';
6
+import Audio from '../../base/media/components/Audio';
7
 
7
 
8
 const TEST_SOUND_PATH = 'sounds/ring.wav';
8
 const TEST_SOUND_PATH = 'sounds/ring.wav';
9
 
9
 

+ 6
- 4
react/features/device-selection/components/DeviceSelection.js Целия файл

2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
 
4
 
5
-import { AbstractDialogTab } from '../../base/dialog';
6
-import type { Props as AbstractDialogTabProps } from '../../base/dialog';
7
-import { translate } from '../../base/i18n';
8
-import JitsiMeetJS, { createLocalTrack } from '../../base/lib-jitsi-meet';
5
+import AbstractDialogTab, {
6
+    type Props as AbstractDialogTabProps
7
+} from '../../base/dialog/components/web/AbstractDialogTab';
8
+import { translate } from '../../base/i18n/functions';
9
+import JitsiMeetJS from '../../base/lib-jitsi-meet/_';
10
+import { createLocalTrack } from '../../base/lib-jitsi-meet/functions';
9
 
11
 
10
 import logger from '../logger';
12
 import logger from '../logger';
11
 
13
 

+ 1
- 1
react/features/device-selection/components/DeviceSelector.web.js Целия файл

4
 import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
4
 import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down';
5
 import React, { Component } from 'react';
5
 import React, { Component } from 'react';
6
 
6
 
7
-import { translate } from '../../base/i18n';
7
+import { translate } from '../../base/i18n/functions';
8
 
8
 
9
 /**
9
 /**
10
  * The type of the React {@code Component} props of {@link DeviceSelector}.
10
  * The type of the React {@code Component} props of {@link DeviceSelector}.

+ 2
- 2
react/features/device-selection/components/VideoInputPreview.js Целия файл

2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 
4
 
5
-import { Video } from '../../base/media';
5
+import Video from '../../base/media/components/Video';
6
 
6
 
7
 const VIDEO_ERROR_CLASS = 'video-preview-has-error';
7
 const VIDEO_ERROR_CLASS = 'video-preview-has-error';
8
 
8
 
15
      * An error message to display instead of a preview. Displaying an error
15
      * An error message to display instead of a preview. Displaying an error
16
      * will take priority over displaying a video preview.
16
      * will take priority over displaying a video preview.
17
      */
17
      */
18
-    error: string,
18
+    error: ?string,
19
 
19
 
20
     /**
20
     /**
21
      * The JitsiLocalTrack to display.
21
      * The JitsiLocalTrack to display.

+ 3
- 3
react/features/settings/components/web/DeviceSelectionPopup.js Целия файл

20
     setVideoInputDevice
20
     setVideoInputDevice
21
 } from '../../../../../modules/API/external/functions';
21
 } from '../../../../../modules/API/external/functions';
22
 
22
 
23
-import { parseURLParams } from '../../../base/config';
24
-import { DialogWithTabs } from '../../../base/dialog';
25
-import { DeviceSelection } from '../../../device-selection';
23
+import parseURLParams from '../../../base/config/parseURLParams';
24
+import DialogWithTabs from '../../../base/dialog/components/web/DialogWithTabs';
25
+import DeviceSelection from '../../../device-selection/components/DeviceSelection';
26
 
26
 
27
 /**
27
 /**
28
  * Implements a class that renders the React components for the device selection
28
  * Implements a class that renders the React components for the device selection

+ 1
- 1
webpack.config.js Целия файл

182
         entry: {
182
         entry: {
183
             'device_selection_popup_bundle': './react/features/settings/popup.js'
183
             'device_selection_popup_bundle': './react/features/settings/popup.js'
184
         },
184
         },
185
-        performance: getPerformanceHints(2.5 * 1024 * 1024)
185
+        performance: getPerformanceHints(700 * 1024)
186
     }),
186
     }),
187
     Object.assign({}, config, {
187
     Object.assign({}, config, {
188
         entry: {
188
         entry: {

Loading…
Отказ
Запис