2018-10-24 01:18:09 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import AudioService from '/imports/ui/components/audio/service';
|
2019-10-18 04:42:14 +08:00
|
|
|
import AudioManager from '/imports/ui/services/audio-manager';
|
2018-10-24 01:18:09 +08:00
|
|
|
import BreakoutComponent from './component';
|
|
|
|
import Service from './service';
|
|
|
|
|
|
|
|
const BreakoutContainer = props => <BreakoutComponent {...props} />;
|
|
|
|
|
|
|
|
|
|
|
|
export default withTracker((props) => {
|
|
|
|
const {
|
|
|
|
endAllBreakouts,
|
|
|
|
requestJoinURL,
|
2018-10-30 03:36:45 +08:00
|
|
|
findBreakouts,
|
2018-10-24 01:18:09 +08:00
|
|
|
breakoutRoomUser,
|
|
|
|
transferUserToMeeting,
|
|
|
|
transferToBreakout,
|
|
|
|
meetingId,
|
2019-09-07 04:28:02 +08:00
|
|
|
amIModerator,
|
2018-10-26 23:16:29 +08:00
|
|
|
closeBreakoutPanel,
|
2019-09-19 02:55:06 +08:00
|
|
|
isUserInBreakoutRoom,
|
2018-10-24 01:18:09 +08:00
|
|
|
} = Service;
|
2019-10-18 04:42:14 +08:00
|
|
|
|
2018-10-30 03:36:45 +08:00
|
|
|
const breakoutRooms = findBreakouts();
|
2018-10-24 01:18:09 +08:00
|
|
|
const isMicrophoneUser = AudioService.isConnected() && !AudioService.isListenOnly();
|
2019-06-27 00:29:34 +08:00
|
|
|
const isMeteorConnected = Meteor.status().connected;
|
2021-02-26 02:36:11 +08:00
|
|
|
const { setReturningFromBreakoutAudioTransfer } = AudioService;
|
2018-10-24 01:18:09 +08:00
|
|
|
|
|
|
|
return {
|
|
|
|
...props,
|
|
|
|
breakoutRooms,
|
|
|
|
endAllBreakouts,
|
|
|
|
requestJoinURL,
|
|
|
|
breakoutRoomUser,
|
|
|
|
transferUserToMeeting,
|
|
|
|
transferToBreakout,
|
|
|
|
isMicrophoneUser,
|
2018-11-05 20:27:56 +08:00
|
|
|
meetingId: meetingId(),
|
2019-09-07 04:28:02 +08:00
|
|
|
amIModerator: amIModerator(),
|
2018-10-26 23:16:29 +08:00
|
|
|
closeBreakoutPanel,
|
2019-06-27 00:29:34 +08:00
|
|
|
isMeteorConnected,
|
2019-09-19 02:55:06 +08:00
|
|
|
isUserInBreakoutRoom,
|
2019-10-18 04:42:14 +08:00
|
|
|
exitAudio: () => AudioManager.exitAudio(),
|
2021-02-26 02:36:11 +08:00
|
|
|
setReturningFromBreakoutAudioTransfer,
|
2018-10-24 01:18:09 +08:00
|
|
|
};
|
|
|
|
})(BreakoutContainer);
|