feat: Hide self-view and buttons in visitors mode.
This commit is contained in:
parent
50c4748d40
commit
863fd12488
|
@ -61,6 +61,11 @@ export const PREMEETING_BUTTONS = [ 'microphone', 'camera', 'select-background',
|
||||||
*/
|
*/
|
||||||
export const THIRD_PARTY_PREJOIN_BUTTONS = [ 'microphone', 'camera', 'select-background' ];
|
export const THIRD_PARTY_PREJOIN_BUTTONS = [ 'microphone', 'camera', 'select-background' ];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The toolbar buttons to show when in visitors mode.
|
||||||
|
*/
|
||||||
|
export const VISITORS_MODE_BUTTONS = [ 'hangup', 'tileview' ];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The set of feature flags.
|
* The set of feature flags.
|
||||||
*
|
*
|
||||||
|
|
|
@ -114,11 +114,12 @@ export function shouldHideShareAudioHelper(state: IReduxState): boolean | undefi
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the disable self view setting.
|
* Gets the disabled self view setting.
|
||||||
*
|
*
|
||||||
* @param {Object} state - Redux state.
|
* @param {Object} state - Redux state.
|
||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
export function getHideSelfView(state: IReduxState) {
|
export function getHideSelfView(state: IReduxState) {
|
||||||
return state['features/base/config'].disableSelfView || state['features/base/settings'].disableSelfView;
|
return state['features/base/config'].disableSelfView || state['features/base/settings'].disableSelfView
|
||||||
|
|| state['features/visitors'].enabled;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { ACTION_SHORTCUT_TRIGGERED, createShortcutEvent, createToolbarEvent } fr
|
||||||
import { sendAnalytics } from '../../../analytics/functions';
|
import { sendAnalytics } from '../../../analytics/functions';
|
||||||
import { IReduxState } from '../../../app/types';
|
import { IReduxState } from '../../../app/types';
|
||||||
import { IJitsiConference } from '../../../base/conference/reducer';
|
import { IJitsiConference } from '../../../base/conference/reducer';
|
||||||
|
import { VISITORS_MODE_BUTTONS } from '../../../base/config/constants';
|
||||||
import {
|
import {
|
||||||
getButtonsWithNotifyClick,
|
getButtonsWithNotifyClick,
|
||||||
getMultipleVideoSendingSupportFeatureFlag,
|
getMultipleVideoSendingSupportFeatureFlag,
|
||||||
|
@ -1562,7 +1563,11 @@ function _mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
|
||||||
const localParticipant = getLocalParticipant(state);
|
const localParticipant = getLocalParticipant(state);
|
||||||
const localVideo = getLocalVideoTrack(state['features/base/tracks']);
|
const localVideo = getLocalVideoTrack(state['features/base/tracks']);
|
||||||
const { clientWidth } = state['features/base/responsive-ui'];
|
const { clientWidth } = state['features/base/responsive-ui'];
|
||||||
const toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);
|
let toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);
|
||||||
|
|
||||||
|
if (state['features/visitors'].enabled) {
|
||||||
|
toolbarButtons = VISITORS_MODE_BUTTONS.filter(e => toolbarButtons.indexOf(e) > -1);
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
_backgroundType: state['features/virtual-background'].backgroundType ?? '',
|
_backgroundType: state['features/virtual-background'].backgroundType ?? '',
|
||||||
|
|
Loading…
Reference in New Issue