show audio modal when breakout room ends
This commit is contained in:
parent
2b880141fb
commit
6cbd83e51d
@ -117,15 +117,7 @@ export default withRouter(injectIntl(withModalMounter(createContainer((
|
||||
Auth.clearCredentials().then(window.close);
|
||||
},
|
||||
});
|
||||
Breakouts.find().observeChanges({
|
||||
removed() {
|
||||
notify('fechou a breakout room');
|
||||
|
||||
if(wasInAudio) {
|
||||
notify('join audio');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
closedCaption: getCaptionsStatus() ? <ClosedCaptionsContainer /> : null,
|
||||
fontSize: getFontSize(),
|
||||
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||
import { createContainer } from 'meteor/react-meteor-data';
|
||||
import { withModalMounter } from '/imports/ui/components/modal/service';
|
||||
import PropTypes from 'prop-types';
|
||||
import Breakouts from '/imports/api/2.0/breakouts';
|
||||
import Service from './service';
|
||||
import Audio from './component';
|
||||
import AudioModal from './audio-modal/component';
|
||||
@ -26,12 +27,22 @@ export default withModalMounter(createContainer(({ mountModal }) => {
|
||||
const APP_CONFIG = Meteor.settings.public.app;
|
||||
|
||||
const { autoJoinAudio } = APP_CONFIG;
|
||||
const openAudioModal = mountModal.bind(null,
|
||||
<AudioModal
|
||||
handleJoinListenOnly={Service.joinListenOnly}
|
||||
/>);
|
||||
|
||||
Breakouts.find().observeChanges({
|
||||
removed() {
|
||||
openAudioModal();
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
init: () => {
|
||||
Service.init();
|
||||
if (!autoJoinAudio || didMountAutoJoin) return;
|
||||
mountModal(<AudioModal handleJoinListenOnly={Service.joinListenOnly} />);
|
||||
openAudioModal();
|
||||
didMountAutoJoin = true;
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user