Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(filmstrip): move AudioTracksContainer outside (#17000)

Calinteodor5c92faccf634
diff --git a/react/features/filmstrip/components/web/AudioTracksContainer.tsx b/react/features/base/media/components/web/AudioTracksContainer.tsx
similarity index 89%
rename from react/features/filmstrip/components/web/AudioTracksContainer.tsx
rename to react/features/base/media/components/web/AudioTracksContainer.tsx
index f555cdd04d..4bde6a7eb1 100644
--- a/react/features/filmstrip/components/web/AudioTracksContainer.tsx
+++ b/react/features/base/media/components/web/AudioTracksContainer.tsx
@@ -1,10 +1,11 @@
import React from 'react';
import { connect } from 'react-redux';
-import { IReduxState } from '../../../app/types';
-import AudioTrack from '../../../base/media/components/web/AudioTrack';
-import { MEDIA_TYPE } from '../../../base/media/constants';
-import { ITrack } from '../../../base/tracks/types';
+import { IReduxState } from '../../../../app/types';
+import { ITrack } from '../../../tracks/types';
+import { MEDIA_TYPE } from '../../constants';
+
+import AudioTrack from './AudioTrack';
/**
* The type of the React {@code Component} props of {@link AudioTracksContainer}.
diff --git a/react/features/conference/components/web/Conference.tsx b/react/features/conference/components/web/Conference.tsx
index 0813f351d2..6f2b6825da 100644
--- a/react/features/conference/components/web/Conference.tsx
+++ b/react/features/conference/components/web/Conference.tsx
@@ -8,8 +8,9 @@ import VideoLayout from '../../../../../modules/UI/videolayout/VideoLayout';
import { IReduxState, IStore } from '../../../app/types';
import { getConferenceNameForTitle } from '../../../base/conference/functions';
import { hangup } from '../../../base/connection/actions.web';
-import { isMobileBrowser } from '../../../base/environment/utils';
+import { isMobileBrowser } from '../../../base/environment/utils.web';
import { translate } from '../../../base/i18n/functions';
+import AudioTracksContainer from '../../../base/media/components/web/AudioTracksContainer';
import { setColorAlpha } from '../../../base/util/helpers';
import { openChat, setFocusedTab } from '../../../chat/actions.web';
import Chat from '../../../chat/components/web/Chat';
@@ -258,10 +259,8 @@ class Conference extends AbstractConference<IProps, any> {
id = 'videospace'
onTouchStart = { this._onVideospaceTouchStart }>
<LargeVideo />
- <StageFilmstrip />
- <ScreenshareFilmstrip />
- <MainFilmstrip />
</div>
+ <AudioTracksContainer />
<span
aria-level = { 1 }
className = 'sr-only'
@@ -300,7 +299,7 @@ class Conference extends AbstractConference<IProps, any> {
</>)
}
</div>
-
+ <AudioTracksContainer />
{ _showPrejoin || _showLobby || (
<>
<span
@@ -319,9 +318,7 @@ class Conference extends AbstractConference<IProps, any> {
</JitsiPortal>
: this.renderNotificationsContainer())
}
-
<CalleeInfoContainer />
-
{ shouldShowPrejoin(this.props) && <Prejoin />}
{ (_showLobby && !_showVisitorsQueue) && <LobbyScreen />}
{ _showVisitorsQueue && <VisitorsQueue />}
diff --git a/react/features/filmstrip/components/web/Filmstrip.tsx b/react/features/filmstrip/components/web/Filmstrip.tsx
index 2819042a2e..4a26881911 100644
--- a/react/features/filmstrip/components/web/Filmstrip.tsx
+++ b/react/features/filmstrip/components/web/Filmstrip.tsx
@@ -10,7 +10,7 @@ import { withStyles } from 'tss-react/mui';
import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } from '../../../analytics/AnalyticsEvents';
import { sendAnalytics } from '../../../analytics/functions';
import { IReduxState, IStore } from '../../../app/types';
-import { isMobileBrowser, isTouchDevice, shouldEnableResize } from '../../../base/environment/utils';
+import { isMobileBrowser, isTouchDevice, shouldEnableResize } from '../../../base/environment/utils.web';
import { translate } from '../../../base/i18n/functions';
import Icon from '../../../base/icons/components/Icon';
import { IconArrowDown, IconArrowUp } from '../../../base/icons/svg';
@@ -52,7 +52,6 @@ import {
shouldRemoteVideosBeVisible
} from '../../functions.web';
-import AudioTracksContainer from './AudioTracksContainer';
import Thumbnail from './Thumbnail';
import ThumbnailWrapper from './ThumbnailWrapper';
@@ -385,11 +384,6 @@ export interface IProps extends WithTranslation {
*/
_maxTopPanelHeight: number;
- /**
- * Whethere reduced UI feature is enabled or not.
- */
- _reducedUI: boolean;
-
/**
* The participants in the call.
*/
@@ -605,7 +599,6 @@ class Filmstrip extends PureComponent <IProps, IState> {
_filmstripDisabled,
_localScreenShareId,
_mainFilmstripVisible,
- _reducedUI,
_resizableFilmstrip,
_topPanelFilmstrip,
_topPanelMaxHeight,
@@ -649,13 +642,6 @@ class Filmstrip extends PureComponent <IProps, IState> {
}
}
- // FIX: Until we move AudioTracksContainer to a more global place,
- // we apply this css hot fix to hide Filmstrip but keep AudioTracksContainer in the DOM,
- // so we don't have audio problems when reduced UI is enabled.
- if (_reducedUI) {
- filmstripStyle.display = 'none';
- }
-
let toolbar: React.ReactNode = null;
if (!this.props._iAmRecorder && this.props._isFilmstripButtonEnabled
@@ -741,7 +727,6 @@ class Filmstrip extends PureComponent <IProps, IState> {
</div>
: filmstrip
}
- <AudioTracksContainer />
</div>
);
}
@@ -952,7 +937,6 @@ class Filmstrip extends PureComponent <IProps, IState> {
_filmstripHeight,
_thumbnailWidth,
_thumbnailHeight,
- _isVerticalFilmstrip
} = this.props;
// Calculate fully visible count (excluding partially visible tiles)
@@ -1244,7 +1228,6 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
const _currentLayout = getCurrentLayout(state);
const _isVerticalFilmstrip = _currentLayout === LAYOUTS.VERTICAL_FILMSTRIP_VIEW
|| (filmstripType === FILMSTRIP_TYPE.MAIN && _currentLayout === LAYOUTS.STAGE_FILMSTRIP_VIEW);
- const { reducedUI } = state['features/base/responsive-ui'];
return {
_className: className,
@@ -1262,7 +1245,6 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
_mainFilmstripVisible: notDisabled,
_maxFilmstripWidth: videoSpaceWidth - MIN_STAGE_VIEW_WIDTH,
_maxTopPanelHeight: clientHeight - MIN_STAGE_VIEW_HEIGHT,
- _reducedUI: reducedUI,
_remoteParticipantsLength: _remoteParticipants?.length ?? 0,
_topPanelHeight: topPanelHeight.current,
_topPanelMaxHeight: topPanelHeight.current || TOP_FILMSTRIP_HEIGHT,