mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
feat(config) add connection indicators flags
This commit is contained in:
@@ -64,6 +64,11 @@ type Props = AbstractProps & {
|
||||
*/
|
||||
_connectionStatus: string,
|
||||
|
||||
/**
|
||||
* Disable/enable inactive indicator.
|
||||
*/
|
||||
_connectionIndicatorInactiveDisabled: boolean,
|
||||
|
||||
/**
|
||||
* Whether or not the component should ignore setting a visibility class for
|
||||
* hiding the component when the connection quality is not strong.
|
||||
@@ -224,8 +229,11 @@ class ConnectionIndicator extends AbstractConnectionIndicator<Props, AbstractSta
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
_renderIcon() {
|
||||
if (this.props._connectionStatus
|
||||
=== JitsiParticipantConnectionStatus.INACTIVE) {
|
||||
if (this.props._connectionStatus === JitsiParticipantConnectionStatus.INACTIVE) {
|
||||
if (this.props._connectionIndicatorInactiveDisabled) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<span className = 'connection_ninja'>
|
||||
<Icon
|
||||
@@ -289,6 +297,8 @@ export function _mapStateToProps(state: Object, ownProps: Props) {
|
||||
= participantId ? getParticipantById(state, participantId) : getLocalParticipant(state);
|
||||
|
||||
return {
|
||||
_connectionIndicatorInactiveDisabled:
|
||||
Boolean(state['features/base/config'].connectionIndicators?.inactiveDisabled),
|
||||
_connectionStatus: participant?.connectionStatus
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user