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): fixed indicators container dissapear when not in tile view (#14031)

Calinteodor83c4ce98b492
diff --git a/react/features/filmstrip/components/native/Thumbnail.tsx b/react/features/filmstrip/components/native/Thumbnail.tsx
index 36f89bbf82..fa0ea37665 100644
--- a/react/features/filmstrip/components/native/Thumbnail.tsx
+++ b/react/features/filmstrip/components/native/Thumbnail.tsx
@@ -34,6 +34,7 @@ import {
showSharedVideoMenu
} from '../../../participants-pane/actions.native';
import { toggleToolboxVisible } from '../../../toolbox/actions.native';
+import { shouldDisplayTileView } from '../../../video-layout/functions.native';
import { SQUARE_TILE_ASPECT_RATIO } from '../../constants';
import AudioMutedIndicator from './AudioMutedIndicator';
@@ -43,6 +44,7 @@ import RaisedHandIndicator from './RaisedHandIndicator';
import ScreenShareIndicator from './ScreenShareIndicator';
import styles, { AVATAR_SIZE } from './styles';
+
/**
* Thumbnail component's property types.
*/
@@ -111,6 +113,8 @@ interface IProps {
*/
_renderModeratorIndicator: boolean;
+ _shouldDisplayTileView: boolean;
+
/**
* The video track that will be displayed in the thumbnail.
*/
@@ -206,14 +210,25 @@ class Thumbnail extends PureComponent<IProps> {
_fakeParticipant,
_isScreenShare: isScreenShare,
_isVirtualScreenshare,
- _renderModeratorIndicator: renderModeratorIndicator,
_participantId: participantId,
_pinned,
+ _renderModeratorIndicator: renderModeratorIndicator,
+ _shouldDisplayTileView,
renderDisplayName,
tileView
} = this.props;
const indicators = [];
+ let bottomIndicatorsContainerStyle;
+
+ if (_shouldDisplayTileView) {
+ bottomIndicatorsContainerStyle = styles.bottomIndicatorsContainer;
+ } else if (audioMuted || renderModeratorIndicator) {
+ bottomIndicatorsContainerStyle = styles.bottomIndicatorsContainer;
+ } else {
+ bottomIndicatorsContainerStyle = null;
+ }
+
if (!_fakeParticipant || _isVirtualScreenshare) {
indicators.push(<View
key = 'top-left-indicators'
@@ -228,9 +243,9 @@ class Thumbnail extends PureComponent<IProps> {
</View>);
indicators.push(<Container
key = 'bottom-indicators'
- style = { styles.thumbnailIndicatorContainer }>
+ style = { styles.thumbnailIndicatorContainer as StyleType }>
<Container
- style = { styles.bottomIndicatorsContainer as StyleType }>
+ style = { bottomIndicatorsContainerStyle as StyleType }>
{ audioMuted && !_isVirtualScreenshare && <AudioMutedIndicator /> }
{ !tileView && _pinned && <PinnedIndicator />}
{ renderModeratorIndicator && !_isVirtualScreenshare && <ModeratorIndicator />}
@@ -421,6 +436,7 @@ function _mapStateToProps(state: IReduxState, ownProps: any) {
_raisedHand: hasRaisedHand(participant),
_renderDominantSpeakerIndicator: renderDominantSpeakerIndicator,
_renderModeratorIndicator: renderModeratorIndicator,
+ _shouldDisplayTileView: shouldDisplayTileView(state),
_videoTrack: videoTrack
};
}