bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/audio-menu/container.jsx

22 lines
692 B
React
Raw Normal View History

import React from 'react';
import { createContainer } from 'meteor/react-meteor-data';
2017-08-01 21:10:12 +08:00
import VoiceUsers from '/imports/api/2.0/voice-users';
import Auth from '/imports/ui/services/auth/index';
2016-12-06 01:07:25 +08:00
import JoinAudioOptions from './component';
2017-08-01 21:10:12 +08:00
const JoinAudioOptionsContainer = props => (<JoinAudioOptions {...props} />);
export default createContainer((params) => {
2017-08-01 21:10:12 +08:00
const userId = Auth.userID;
const voiceUser = VoiceUsers.findOne({ intId: userId });
const { joined, listenOnly } = voiceUser;
return {
2017-08-01 21:41:24 +08:00
isInAudio: joined,
isInListenOnly: listenOnly,
2017-03-15 06:34:57 +08:00
handleJoinAudio: params.handleJoinAudio,
handleCloseAudio: params.handleCloseAudio,
};
2016-12-06 01:07:25 +08:00
}, JoinAudioOptionsContainer);