bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/breakout-room/container.jsx
Mario Jr ff6cba8d53 Store information about user status during breakout room audio transfer
Currently this information is lost everytime breakout-room component is
unmounted, causing the panel to shows wrong information during next renders
Fixes #11333
2021-03-08 14:55:05 -03:00

54 lines
1.4 KiB
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import AudioService from '/imports/ui/components/audio/service';
import AudioManager from '/imports/ui/services/audio-manager';
import BreakoutComponent from './component';
import Service from './service';
const BreakoutContainer = props => <BreakoutComponent {...props} />;
export default withTracker((props) => {
const {
endAllBreakouts,
requestJoinURL,
findBreakouts,
breakoutRoomUser,
transferUserToMeeting,
transferToBreakout,
meetingId,
amIModerator,
closeBreakoutPanel,
isUserInBreakoutRoom,
} = Service;
const breakoutRooms = findBreakouts();
const isMicrophoneUser = AudioService.isConnected() && !AudioService.isListenOnly();
const isMeteorConnected = Meteor.status().connected;
const isReconnecting = AudioService.isReconnecting();
const {
setBreakoutAudioTransferStatus,
getBreakoutAudioTransferStatus,
} = AudioService;
return {
...props,
breakoutRooms,
endAllBreakouts,
requestJoinURL,
breakoutRoomUser,
transferUserToMeeting,
transferToBreakout,
isMicrophoneUser,
meetingId: meetingId(),
amIModerator: amIModerator(),
closeBreakoutPanel,
isMeteorConnected,
isUserInBreakoutRoom,
exitAudio: () => AudioManager.exitAudio(),
isReconnecting,
setBreakoutAudioTransferStatus,
getBreakoutAudioTransferStatus,
};
})(BreakoutContainer);