2023-03-21 09:47:52 +02:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
|
2023-05-02 11:09:38 +03:00
|
|
|
import { IReduxState } from '../../../app/types';
|
2023-04-03 13:49:19 +03:00
|
|
|
import { translate } from '../../../base/i18n/functions';
|
|
|
|
|
import { isLocalParticipantModerator } from '../../../base/participants/functions';
|
2021-07-30 12:46:49 +03:00
|
|
|
import AbstractMuteVideoButton, { _mapStateToProps as _abstractMapStateToProps } from '../AbstractMuteVideoButton';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Maps part of the Redux state to the props of this component.
|
|
|
|
|
*
|
|
|
|
|
* @param {Object} state - The Redux state.
|
|
|
|
|
* @param {Object} ownProps - Properties of component.
|
|
|
|
|
* @returns {Props}
|
|
|
|
|
*/
|
2023-05-02 11:09:38 +03:00
|
|
|
function _mapStateToProps(state: IReduxState, ownProps: any) {
|
2021-07-30 12:46:49 +03:00
|
|
|
return {
|
|
|
|
|
..._abstractMapStateToProps(state, ownProps),
|
|
|
|
|
visible: isLocalParticipantModerator(state)
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default translate(connect(_mapStateToProps)(AbstractMuteVideoButton));
|