[issue-16872] - Changes in review
This commit is contained in:
parent
e68997e673
commit
4f3931c0ff
@ -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({
|
||||
@ -175,9 +176,8 @@ class AudioModal extends Component {
|
||||
listenOnlyMode,
|
||||
audioLocked,
|
||||
isUsingAudio,
|
||||
handleCloseAudioModal
|
||||
} = this.props;
|
||||
window.addEventListener("CLOSE_AUDIO_MODAL", handleCloseAudioModal);
|
||||
window.addEventListener("CLOSE_AUDIO_MODAL", this.handleCloseAudioModal);
|
||||
|
||||
if (!isUsingAudio) {
|
||||
if (forceListenOnlyAttendee || audioLocked) return this.handleJoinListenOnly();
|
||||
@ -206,14 +206,13 @@ class AudioModal extends Component {
|
||||
isEchoTest,
|
||||
exitAudio,
|
||||
resolve,
|
||||
handleCloseAudioModal,
|
||||
} = this.props;
|
||||
|
||||
if (isEchoTest) {
|
||||
exitAudio();
|
||||
}
|
||||
if (resolve) resolve();
|
||||
window.removeEventListener("CLOSE_AUDIO_MODAL", handleCloseAudioModal);
|
||||
window.removeEventListener("CLOSE_AUDIO_MODAL", this.handleCloseAudioModal);
|
||||
Session.set('audioModalIsOpen', false);
|
||||
}
|
||||
|
||||
@ -253,6 +252,10 @@ class AudioModal extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
handleCloseAudioModal = () => {
|
||||
showModal(null);
|
||||
}
|
||||
|
||||
handleGoToEchoTest() {
|
||||
const { AudioError } = this.props;
|
||||
const { MIC_ERROR } = AudioError;
|
||||
|
@ -14,7 +14,6 @@ import {
|
||||
closeModal,
|
||||
joinListenOnly,
|
||||
leaveEchoTest,
|
||||
handleCloseAudioModal,
|
||||
} from './service';
|
||||
import Storage from '/imports/ui/services/storage/session';
|
||||
import Service from '../service';
|
||||
@ -100,6 +99,5 @@ export default lockContextContainer(withModalMounter(withTracker(({ userLocks })
|
||||
notify: Service.notify,
|
||||
isRTL,
|
||||
AudioError,
|
||||
handleCloseAudioModal: handleCloseAudioModal,
|
||||
});
|
||||
})(AudioModalContainer)));
|
||||
|
@ -21,10 +21,6 @@ export const didUserSelectedListenOnly = () => (
|
||||
!!Storage.getItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY)
|
||||
);
|
||||
|
||||
export const handleCloseAudioModal = () => {
|
||||
showModal(null);
|
||||
}
|
||||
|
||||
export const joinMicrophone = (skipEchoTest = false) => {
|
||||
Storage.setItem(CLIENT_DID_USER_SELECTED_MICROPHONE_KEY, true);
|
||||
Storage.setItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY, false);
|
||||
|
Loading…
Reference in New Issue
Block a user