[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 AudioAutoplayPrompt from '../autoplay/component';
|
||||||
import Settings from '/imports/ui/services/settings';
|
import Settings from '/imports/ui/services/settings';
|
||||||
import CaptionsSelectContainer from '/imports/ui/components/audio/captions/select/container';
|
import CaptionsSelectContainer from '/imports/ui/components/audio/captions/select/container';
|
||||||
|
import { showModal } from '/imports/ui/components/common/modal/service';
|
||||||
|
|
||||||
const propTypes = {
|
const propTypes = {
|
||||||
intl: PropTypes.shape({
|
intl: PropTypes.shape({
|
||||||
@ -175,9 +176,8 @@ class AudioModal extends Component {
|
|||||||
listenOnlyMode,
|
listenOnlyMode,
|
||||||
audioLocked,
|
audioLocked,
|
||||||
isUsingAudio,
|
isUsingAudio,
|
||||||
handleCloseAudioModal
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
window.addEventListener("CLOSE_AUDIO_MODAL", handleCloseAudioModal);
|
window.addEventListener("CLOSE_AUDIO_MODAL", this.handleCloseAudioModal);
|
||||||
|
|
||||||
if (!isUsingAudio) {
|
if (!isUsingAudio) {
|
||||||
if (forceListenOnlyAttendee || audioLocked) return this.handleJoinListenOnly();
|
if (forceListenOnlyAttendee || audioLocked) return this.handleJoinListenOnly();
|
||||||
@ -206,14 +206,13 @@ class AudioModal extends Component {
|
|||||||
isEchoTest,
|
isEchoTest,
|
||||||
exitAudio,
|
exitAudio,
|
||||||
resolve,
|
resolve,
|
||||||
handleCloseAudioModal,
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
if (isEchoTest) {
|
if (isEchoTest) {
|
||||||
exitAudio();
|
exitAudio();
|
||||||
}
|
}
|
||||||
if (resolve) resolve();
|
if (resolve) resolve();
|
||||||
window.removeEventListener("CLOSE_AUDIO_MODAL", handleCloseAudioModal);
|
window.removeEventListener("CLOSE_AUDIO_MODAL", this.handleCloseAudioModal);
|
||||||
Session.set('audioModalIsOpen', false);
|
Session.set('audioModalIsOpen', false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -253,6 +252,10 @@ class AudioModal extends Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleCloseAudioModal = () => {
|
||||||
|
showModal(null);
|
||||||
|
}
|
||||||
|
|
||||||
handleGoToEchoTest() {
|
handleGoToEchoTest() {
|
||||||
const { AudioError } = this.props;
|
const { AudioError } = this.props;
|
||||||
const { MIC_ERROR } = AudioError;
|
const { MIC_ERROR } = AudioError;
|
||||||
|
@ -14,7 +14,6 @@ import {
|
|||||||
closeModal,
|
closeModal,
|
||||||
joinListenOnly,
|
joinListenOnly,
|
||||||
leaveEchoTest,
|
leaveEchoTest,
|
||||||
handleCloseAudioModal,
|
|
||||||
} from './service';
|
} from './service';
|
||||||
import Storage from '/imports/ui/services/storage/session';
|
import Storage from '/imports/ui/services/storage/session';
|
||||||
import Service from '../service';
|
import Service from '../service';
|
||||||
@ -100,6 +99,5 @@ export default lockContextContainer(withModalMounter(withTracker(({ userLocks })
|
|||||||
notify: Service.notify,
|
notify: Service.notify,
|
||||||
isRTL,
|
isRTL,
|
||||||
AudioError,
|
AudioError,
|
||||||
handleCloseAudioModal: handleCloseAudioModal,
|
|
||||||
});
|
});
|
||||||
})(AudioModalContainer)));
|
})(AudioModalContainer)));
|
||||||
|
@ -21,10 +21,6 @@ export const didUserSelectedListenOnly = () => (
|
|||||||
!!Storage.getItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY)
|
!!Storage.getItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const handleCloseAudioModal = () => {
|
|
||||||
showModal(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
export const joinMicrophone = (skipEchoTest = false) => {
|
export const joinMicrophone = (skipEchoTest = false) => {
|
||||||
Storage.setItem(CLIENT_DID_USER_SELECTED_MICROPHONE_KEY, true);
|
Storage.setItem(CLIENT_DID_USER_SELECTED_MICROPHONE_KEY, true);
|
||||||
Storage.setItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY, false);
|
Storage.setItem(CLIENT_DID_USER_SELECTED_LISTEN_ONLY_KEY, false);
|
||||||
|
Loading…
Reference in New Issue
Block a user