mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
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.
59 lines
1.3 KiB
JavaScript
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);
|