diff --git a/react/features/base/dialog/components/web/AbstractDialogTab.js b/react/features/base/dialog/components/web/AbstractDialogTab.js index 3fc4e17d1..0f1d29488 100644 --- a/react/features/base/dialog/components/web/AbstractDialogTab.js +++ b/react/features/base/dialog/components/web/AbstractDialogTab.js @@ -29,14 +29,14 @@ export type Props = { * * @extends Component */ -class AbstractDialogTab extends Component { +class AbstractDialogTab extends Component { /** * Initializes a new {@code AbstractDialogTab} instance. * - * @param {Object} props - The read-only properties with which the new + * @param {P} props - The read-only properties with which the new * instance is to be initialized. */ - constructor(props: Props) { + constructor(props: P) { super(props); // Bind event handler so it is only bound once for every instance. diff --git a/react/features/base/dialog/components/web/DialogWithTabs.js b/react/features/base/dialog/components/web/DialogWithTabs.js index 52037e7ff..3b599ed12 100644 --- a/react/features/base/dialog/components/web/DialogWithTabs.js +++ b/react/features/base/dialog/components/web/DialogWithTabs.js @@ -3,11 +3,12 @@ import Tabs from '@atlaskit/tabs'; import React, { Component } from 'react'; -import { StatelessDialog } from '../../../dialog'; -import { translate } from '../../../i18n'; +import { translate } from '../../../i18n/functions'; import logger from '../../logger'; +import StatelessDialog from './StatelessDialog'; + /** * The type of the React {@code Component} props of {@link DialogWithTabs}. */ diff --git a/react/features/base/dialog/components/web/StatelessDialog.js b/react/features/base/dialog/components/web/StatelessDialog.js index 5b6de4f01..550752084 100644 --- a/react/features/base/dialog/components/web/StatelessDialog.js +++ b/react/features/base/dialog/components/web/StatelessDialog.js @@ -5,7 +5,7 @@ import Modal, { ModalFooter } from '@atlaskit/modal-dialog'; import _ from 'lodash'; import React, { Component } from 'react'; -import { translate } from '../../../i18n'; +import { translate } from '../../../i18n/functions'; import type { DialogProps } from '../../constants'; diff --git a/react/features/base/logging/functions.js b/react/features/base/logging/functions.js index 54cd32019..6977863df 100644 --- a/react/features/base/logging/functions.js +++ b/react/features/base/logging/functions.js @@ -33,7 +33,7 @@ export const _initLogging = _.once(() => { } // Lazy load it to avoid cycles in early web bootstrap code. - const { default: JitsiMeetJS } = require('../lib-jitsi-meet'); + const { default: JitsiMeetJS } = require('../lib-jitsi-meet/_'); Logger.setGlobalOptions(DEFAULT_RN_OPTS); JitsiMeetJS.setGlobalLogOptions(DEFAULT_RN_OPTS); diff --git a/react/features/base/media/components/AbstractAudio.js b/react/features/base/media/components/AbstractAudio.js index 698d539bc..dc2778d93 100644 --- a/react/features/base/media/components/AbstractAudio.js +++ b/react/features/base/media/components/AbstractAudio.js @@ -36,7 +36,7 @@ type Props = { * @type {Object | string} */ src: Object | string, - stream: Object, + stream?: Object, loop?: ?boolean } diff --git a/react/features/base/media/components/Audio.native.js b/react/features/base/media/components/Audio.native.js new file mode 100644 index 000000000..883aa0124 --- /dev/null +++ b/react/features/base/media/components/Audio.native.js @@ -0,0 +1,5 @@ +// @flow + +import Audio from './native/Audio'; + +export default Audio; diff --git a/react/features/base/media/components/Audio.web.js b/react/features/base/media/components/Audio.web.js new file mode 100644 index 000000000..bcac3bad9 --- /dev/null +++ b/react/features/base/media/components/Audio.web.js @@ -0,0 +1,5 @@ +// @flow + +import Audio from './web/Audio'; + +export default Audio; diff --git a/react/features/base/media/components/Video.native.js b/react/features/base/media/components/Video.native.js new file mode 100644 index 000000000..6f5cfbc43 --- /dev/null +++ b/react/features/base/media/components/Video.native.js @@ -0,0 +1,5 @@ +// @flow + +import Video from './native/Video'; + +export default Video; diff --git a/react/features/base/media/components/Video.web.js b/react/features/base/media/components/Video.web.js new file mode 100644 index 000000000..3243aade8 --- /dev/null +++ b/react/features/base/media/components/Video.web.js @@ -0,0 +1,5 @@ +// @flow + +import Video from './web/Video'; + +export default Video; diff --git a/react/features/base/media/components/web/Video.js b/react/features/base/media/components/web/Video.js index 601213c92..8b678d811 100644 --- a/react/features/base/media/components/web/Video.js +++ b/react/features/base/media/components/web/Video.js @@ -21,7 +21,7 @@ type Props = { /** * Optional callback to invoke once the video starts playing. */ - onVideoPlaying: Function, + onVideoPlaying?: Function, /** * The JitsiLocalTrack to display. diff --git a/react/features/device-selection/components/AudioInputPreview.js b/react/features/device-selection/components/AudioInputPreview.js index 2953568c4..5c0df3ce2 100644 --- a/react/features/device-selection/components/AudioInputPreview.js +++ b/react/features/device-selection/components/AudioInputPreview.js @@ -2,7 +2,9 @@ import React, { Component } from 'react'; -import { JitsiTrackEvents } from '../../base/lib-jitsi-meet'; +import JitsiMeetJS from '../../base/lib-jitsi-meet/_'; + +const JitsiTrackEvents = JitsiMeetJS.events.track; /** * The type of the React {@code Component} props of {@link AudioInputPreview}. diff --git a/react/features/device-selection/components/AudioOutputPreview.js b/react/features/device-selection/components/AudioOutputPreview.js index 0d855be67..0d5e67a4e 100644 --- a/react/features/device-selection/components/AudioOutputPreview.js +++ b/react/features/device-selection/components/AudioOutputPreview.js @@ -2,8 +2,8 @@ import React, { Component } from 'react'; -import { translate } from '../../base/i18n'; -import { Audio } from '../../base/media'; +import { translate } from '../../base/i18n/functions'; +import Audio from '../../base/media/components/Audio'; const TEST_SOUND_PATH = 'sounds/ring.wav'; diff --git a/react/features/device-selection/components/DeviceSelection.js b/react/features/device-selection/components/DeviceSelection.js index 136ec62c2..ede0efd18 100644 --- a/react/features/device-selection/components/DeviceSelection.js +++ b/react/features/device-selection/components/DeviceSelection.js @@ -2,10 +2,12 @@ import React from 'react'; -import { AbstractDialogTab } from '../../base/dialog'; -import type { Props as AbstractDialogTabProps } from '../../base/dialog'; -import { translate } from '../../base/i18n'; -import JitsiMeetJS, { createLocalTrack } from '../../base/lib-jitsi-meet'; +import AbstractDialogTab, { + type Props as AbstractDialogTabProps +} from '../../base/dialog/components/web/AbstractDialogTab'; +import { translate } from '../../base/i18n/functions'; +import JitsiMeetJS from '../../base/lib-jitsi-meet/_'; +import { createLocalTrack } from '../../base/lib-jitsi-meet/functions'; import logger from '../logger'; diff --git a/react/features/device-selection/components/DeviceSelector.web.js b/react/features/device-selection/components/DeviceSelector.web.js index 68db750a3..8d3b08429 100644 --- a/react/features/device-selection/components/DeviceSelector.web.js +++ b/react/features/device-selection/components/DeviceSelector.web.js @@ -4,7 +4,7 @@ import AKDropdownMenu from '@atlaskit/dropdown-menu'; import ChevronDownIcon from '@atlaskit/icon/glyph/chevron-down'; import React, { Component } from 'react'; -import { translate } from '../../base/i18n'; +import { translate } from '../../base/i18n/functions'; /** * The type of the React {@code Component} props of {@link DeviceSelector}. diff --git a/react/features/device-selection/components/VideoInputPreview.js b/react/features/device-selection/components/VideoInputPreview.js index 984758af1..e8e1154f5 100644 --- a/react/features/device-selection/components/VideoInputPreview.js +++ b/react/features/device-selection/components/VideoInputPreview.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; -import { Video } from '../../base/media'; +import Video from '../../base/media/components/Video'; const VIDEO_ERROR_CLASS = 'video-preview-has-error'; @@ -15,7 +15,7 @@ type Props = { * An error message to display instead of a preview. Displaying an error * will take priority over displaying a video preview. */ - error: string, + error: ?string, /** * The JitsiLocalTrack to display. diff --git a/react/features/settings/components/web/DeviceSelectionPopup.js b/react/features/settings/components/web/DeviceSelectionPopup.js index a7b184cb3..617e13a06 100644 --- a/react/features/settings/components/web/DeviceSelectionPopup.js +++ b/react/features/settings/components/web/DeviceSelectionPopup.js @@ -20,9 +20,9 @@ import { setVideoInputDevice } from '../../../../../modules/API/external/functions'; -import { parseURLParams } from '../../../base/config'; -import { DialogWithTabs } from '../../../base/dialog'; -import { DeviceSelection } from '../../../device-selection'; +import parseURLParams from '../../../base/config/parseURLParams'; +import DialogWithTabs from '../../../base/dialog/components/web/DialogWithTabs'; +import DeviceSelection from '../../../device-selection/components/DeviceSelection'; /** * Implements a class that renders the React components for the device selection diff --git a/webpack.config.js b/webpack.config.js index fe1057f20..5edd336af 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -182,7 +182,7 @@ module.exports = [ entry: { 'device_selection_popup_bundle': './react/features/settings/popup.js' }, - performance: getPerformanceHints(2.5 * 1024 * 1024) + performance: getPerformanceHints(700 * 1024) }), Object.assign({}, config, { entry: {