Skip to content

Commit

Permalink
Merge pull request #16990 from GuiLeme/issue-16872
Browse files Browse the repository at this point in the history
fix (html5): not showing invitation when user is moved to another breakout room
  • Loading branch information
antobinary committed Mar 14, 2023
2 parents e292162 + 4f3931c commit af06006
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import AudioDial from '../audio-dial/component';
import AudioAutoplayPrompt from '../autoplay/component';
import Settings from '/imports/ui/services/settings';
import CaptionsSelectContainer from '/imports/ui/components/audio/captions/select/container';
import { showModal } from '/imports/ui/components/common/modal/service';

const propTypes = {
intl: PropTypes.shape({
Expand Down Expand Up @@ -176,6 +177,7 @@ class AudioModal extends Component {
audioLocked,
isUsingAudio,
} = this.props;
window.addEventListener("CLOSE_AUDIO_MODAL", this.handleCloseAudioModal);

if (!isUsingAudio) {
if (forceListenOnlyAttendee || audioLocked) return this.handleJoinListenOnly();
Expand Down Expand Up @@ -210,6 +212,7 @@ class AudioModal extends Component {
exitAudio();
}
if (resolve) resolve();
window.removeEventListener("CLOSE_AUDIO_MODAL", this.handleCloseAudioModal);
Session.set('audioModalIsOpen', false);
}

Expand Down Expand Up @@ -249,6 +252,10 @@ class AudioModal extends Component {
});
}

handleCloseAudioModal = () => {
showModal(null);
}

handleGoToEchoTest() {
const { AudioError } = this.props;
const { MIC_ERROR } = AudioError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const joinMicrophone = (skipEchoTest = false) => {
});

return call.then(() => {
showModal(null);
window.dispatchEvent(new Event("CLOSE_AUDIO_MODAL"));
}).catch((error) => {
throw error;
});
Expand All @@ -55,7 +55,7 @@ export const joinListenOnly = () => {
// prop transitions to a state where it was handled OR the user opts
// to close the modal.
if (!Service.autoplayBlocked()) {
showModal(null);
window.dispatchEvent(new Event("CLOSE_AUDIO_MODAL"));
}
resolve();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class AudioContainer extends PureComponent {
/**
* Helper function to determine wheter user is returning from breakout room
* to main room.
* @param {[Object} prevProps prevProps param from componentDidUpdate
* @param {Object} prevProps prevProps param from componentDidUpdate
* @return {boolean} True if user is returning from breakout room
* to main room. False, otherwise.
*/
Expand Down

0 comments on commit af06006

Please sign in to comment.