bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/audio-controls/container.jsx
Gabriel Carvalho de Campes 81f35bac4f Fix concerns from review
2017-10-26 15:14:56 -02:00

20 lines
952 B
JavaScript

import React from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import { withModalMounter } from '/imports/ui/components/modal/service';
import AudioControls from './component';
import AudioModalContainer from '../audio-modal/container';
import Service from '../service';
const AudioControlsContainer = props => <AudioControls {...props} />;
export default withModalMounter(createContainer(({ mountModal }) =>
({
mute: Service.isConnected() && !Service.isListenOnly() && !Service.isEchoTest(),
unmute: Service.isConnected() && !Service.isListenOnly() && Service.isMuted(),
join: Service.isConnected() && !Service.isEchoTest(),
disable: Service.isConnecting() || Service.isHangingUp(),
handleToggleMuteMicrophone: () => Service.toggleMuteMicrophone(),
handleJoinAudio: () => mountModal(<AudioModalContainer />),
handleLeaveAudio: () => Service.exitAudio(),
}), AudioControlsContainer));