mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
prioritize participants with screen shares support local screen share track auto pin screen share support screen share for large video ensure fake screen share participants are sorted fix local screen share in vertical filmstrip fix local screen share in tile mode use FakeScreenShareParticipant component for screen share thumbnails ensure changes are behind feature flag and update jsdocs fix bug where local screen share was not rendering update receiver constraints to include SS source names remove fake ss participant creation on track update fix: handle screenshare muted change and track removal refactor: update key values for sortedFakeScreenShareParticipants address PR comments refactor getter for screenshare tracks rename state to sortedRemoteFakeScreenShareParticipants
98 lines
2.6 KiB
JavaScript
98 lines
2.6 KiB
JavaScript
// @flow
|
|
|
|
import { makeStyles } from '@material-ui/styles';
|
|
import React from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { isDisplayNameVisible, isNameReadOnly } from '../../../base/config/functions.any';
|
|
import DisplayName from '../../../display-name/components/web/DisplayName';
|
|
import { LAYOUTS } from '../../../video-layout';
|
|
|
|
import StatusIndicators from './StatusIndicators';
|
|
|
|
declare var interfaceConfig: Object;
|
|
|
|
type Props = {
|
|
|
|
/**
|
|
* The current layout of the filmstrip.
|
|
*/
|
|
currentLayout: string,
|
|
|
|
/**
|
|
* Class name for indicators container.
|
|
*/
|
|
className: string,
|
|
|
|
/**
|
|
* Whether or not the indicators are for the local participant.
|
|
*/
|
|
local: boolean,
|
|
|
|
/**
|
|
* Id of the participant for which the component is displayed.
|
|
*/
|
|
participantId: string,
|
|
|
|
/**
|
|
* Whether or not to show the status indicators.
|
|
*/
|
|
showStatusIndicators: string
|
|
}
|
|
|
|
const useStyles = makeStyles(() => {
|
|
return {
|
|
nameContainer: {
|
|
display: 'flex',
|
|
overflow: 'hidden',
|
|
padding: '2px 0',
|
|
|
|
'&>div': {
|
|
display: 'flex',
|
|
overflow: 'hidden'
|
|
},
|
|
|
|
'&:first-child': {
|
|
marginLeft: '6px'
|
|
}
|
|
}
|
|
};
|
|
});
|
|
|
|
const ThumbnailBottomIndicators = ({
|
|
className,
|
|
currentLayout,
|
|
local,
|
|
participantId,
|
|
showStatusIndicators = true
|
|
}: Props) => {
|
|
const styles = useStyles();
|
|
const _allowEditing = !useSelector(isNameReadOnly);
|
|
const _defaultLocalDisplayName = interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME;
|
|
const _showDisplayName = useSelector(isDisplayNameVisible);
|
|
|
|
return (<div className = { className }>
|
|
{
|
|
showStatusIndicators && <StatusIndicators
|
|
audio = { true }
|
|
moderator = { true }
|
|
participantID = { participantId }
|
|
screenshare = { currentLayout === LAYOUTS.TILE_VIEW } />
|
|
}
|
|
{
|
|
_showDisplayName && (
|
|
<span className = { styles.nameContainer }>
|
|
<DisplayName
|
|
allowEditing = { local ? _allowEditing : false }
|
|
currentLayout = { currentLayout }
|
|
displayNameSuffix = { local ? _defaultLocalDisplayName : '' }
|
|
elementID = { local ? 'localDisplayName' : `participant_${participantId}_name` }
|
|
participantID = { participantId } />
|
|
</span>
|
|
)
|
|
}
|
|
</div>);
|
|
};
|
|
|
|
export default ThumbnailBottomIndicators;
|