import PropTypes from 'prop-types'; import React, { Component } from 'react'; import { connect } from 'react-redux'; import { setFollowMe, setStartMutedPolicy } from '../../base/conference'; import { translate } from '../../base/i18n'; /** * Implements a React {@link Component} which displays checkboxes for enabling * and disabling moderator-only conference features. * * @extends Component */ class ModeratorCheckboxes extends Component { /** * {@code ModeratorCheckboxes} component's property types. * * @static */ static propTypes = { /** * Whether or not the Follow Me feature is currently enabled. */ _followMeEnabled: PropTypes.bool, /** * Whether or not new members will join the conference as audio muted. */ _startAudioMutedPolicy: PropTypes.bool, /** * Whether or note new member will join the conference as video muted. */ _startVideoMutedPolicy: PropTypes.bool, /** * Invoked to enable and disable moderator-only conference features. */ dispatch: PropTypes.func, /** * Whether or not the title should be displayed. */ showTitle: PropTypes.bool, /** * Invokted to obtain translated strings. */ t: PropTypes.func }; /** * Initializes a new {@code ModeratorCheckboxes} instance. * * @param {Object} props - The read-only properties with which the new * instance is to be initialized. */ constructor(props) { super(props); // Bind event handlers so they are only bound once for every instance. this._onSetFollowMeSetting = this._onSetFollowMeSetting.bind(this); this._onSetStartAudioMutedPolicy = this._onSetStartAudioMutedPolicy.bind(this); this._onSetStartVideoMutedPolicy = this._onSetStartVideoMutedPolicy.bind(this); } /** * Implements React's {@link Component#render()}. * * @inheritdoc * @returns {ReactElement} */ render() { const { _followMeEnabled, _startAudioMutedPolicy, _startVideoMutedPolicy, showTitle, t } = this.props; return (