Files
jitsi-meet/react/features/status-label/components/StatusLabel.js
Saúl Ibarra Corretgé 9ba3a1c4ff feat(conference): add audio only mode
Audio only mode can be used to save bandwidth. In this mode local video is muted
and last N is set to 0, thus disabling all remote video.

When this mode is enabled avatars are shown.
2017-05-05 09:27:59 -07:00

59 lines
1.3 KiB
JavaScript

import React, { Component } from 'react';
import { connect } from 'react-redux';
import AudioOnlyLabel from './AudioOnlyLabel';
/**
* Component responsible for displaying a label that indicates some state of the
* current conference. The AudioOnlyLabel component will be displayed when the
* conference is in audio only mode.
*/
export class StatusLabel extends Component {
/**
* StatusLabel component's property types.
*
* @static
*/
static propTypes = {
/**
* The redux store representation of the current conference.
*/
_conference: React.PropTypes.object
}
/**
* Implements React's {@link Component#render()}.
*
* @inheritdoc
* @returns {ReactElement|null}
*/
render() {
if (!this.props._conference.audioOnly) {
return null;
}
return (
<div className = 'moveToCorner'>
<AudioOnlyLabel />
</div>
);
}
}
/**
* Maps (parts of) the Redux state to the associated StatusLabel's props.
*
* @param {Object} state - The Redux state.
* @private
* @returns {{
* _conference: Object,
* }}
*/
function _mapStateToProps(state) {
return {
_conference: state['features/base/conference']
};
}
export default connect(_mapStateToProps)(StatusLabel);