feat(visitors): Adds option to disable self-demote button.

Fixes #14539
pull/14867/head jitsi-meet_9599
damencho 11 months ago committed by Дамян Минков
parent f0fc63f573
commit b969fba433
  1. 3
      config.js
  2. 1
      react/features/base/config/configType.ts
  3. 1
      react/features/base/config/configWhitelist.ts
  4. 3
      react/features/video-menu/components/native/LocalVideoMenu.tsx
  5. 4
      react/features/video-menu/components/web/LocalVideoMenuTriggerButton.tsx

@ -121,6 +121,9 @@ var config = {
// Disables polls feature.
// disablePolls: false,
// Disables demote button from self-view
// disableSelfDemote: false,
// Disables self-view tile. (hides it from tile view and from filmstrip)
// disableSelfView: false,

@ -287,6 +287,7 @@ export interface IConfig {
disableRemoveRaisedHandOnFocus?: boolean;
disableResponsiveTiles?: boolean;
disableRtx?: boolean;
disableSelfDemote?: boolean;
disableSelfView?: boolean;
disableSelfViewSettings?: boolean;
disableShortcuts?: boolean;

@ -116,6 +116,7 @@ export default [
'disableRemoteMute',
'disableResponsiveTiles',
'disableRtx',
'disableSelfDemote',
'disableSelfView',
'disableSelfViewSettings',
'disableShortcuts',

@ -141,12 +141,13 @@ class LocalVideoMenu extends PureComponent<IProps> {
* @returns {IProps}
*/
function _mapStateToProps(state: IReduxState) {
const { disableSelfDemote } = state['features/base/config'];
const participant = getLocalParticipant(state);
return {
_participant: participant,
_participantDisplayName: getParticipantDisplayName(state, participant?.id ?? ''),
_showDemote: getParticipantCount(state) > 1
_showDemote: !disableSelfDemote && getParticipantCount(state) > 1
};
}

@ -268,7 +268,7 @@ const LocalVideoMenuTriggerButton = ({
function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
const { thumbnailType } = ownProps;
const localParticipant = getLocalParticipant(state);
const { disableLocalVideoFlip, disableSelfViewSettings } = state['features/base/config'];
const { disableLocalVideoFlip, disableSelfDemote, disableSelfViewSettings } = state['features/base/config'];
const videoTrack = getLocalVideoTrack(state['features/base/tracks']);
const { overflowDrawer } = state['features/toolbox'];
const { showConnectionInfo } = state['features/base/connection'];
@ -292,7 +292,7 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
return {
_menuPosition,
_showDemote: getParticipantCount(state) > 1,
_showDemote: !disableSelfDemote && getParticipantCount(state) > 1,
_showLocalVideoFlipButton: !disableLocalVideoFlip && videoTrack?.videoType !== 'desktop',
_showHideSelfViewButton: showHideSelfViewButton,
_overflowDrawer: overflowDrawer,

Loading…
Cancel
Save