diff --git a/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx b/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx index 222443ee1b..c9d8896d0c 100644 --- a/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/audio/audio-modal/component.jsx @@ -27,6 +27,9 @@ const propTypes = { showPermissionsOvelay: PropTypes.bool.isRequired, listenOnlyMode: PropTypes.bool.isRequired, skipCheck: PropTypes.bool.isRequired, + joinFullAudioImmediately: PropTypes.bool.isRequired, + joinFullAudioEchoTest: PropTypes.bool.isRequired, + forceListenOnlyAttendee: PropTypes.bool.isRequired, }; const defaultProps = { @@ -120,9 +123,23 @@ class AudioModal extends Component { } componentWillMount() { - if (this.props.skipCheck) { + const { + joinFullAudioImmediately, + joinFullAudioEchoTest, + forceListenOnlyAttendee, + } = this.props; + + if (joinFullAudioImmediately) { this.handleJoinMicrophone(); } + + if (joinFullAudioEchoTest) { + this.handleGoToEchoTest(); + } + + if (forceListenOnlyAttendee) { + this.handleJoinListenOnly(); + } } componentWillUnmount() { @@ -153,8 +170,14 @@ class AudioModal extends Component { const { inputDeviceId, outputDeviceId, + skipCheck, } = this.props; + + if (skipCheck) { + return this.handleJoinMicrophone(); + } + return this.joinEchoTest().then(() => { console.log(inputDeviceId, outputDeviceId); this.setState({ @@ -195,18 +218,22 @@ class AudioModal extends Component { const { intl, listenOnlyMode, + forceListenOnlyAttendee, } = this.props; return ( -