{ this.renderContent() }
diff --git a/bigbluebutton-html5/imports/ui/components/audio/audio-modal/container.jsx b/bigbluebutton-html5/imports/ui/components/audio/audio-modal/container.jsx
index 7afd5189a5..62bdea0b28 100644
--- a/bigbluebutton-html5/imports/ui/components/audio/audio-modal/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/audio/audio-modal/container.jsx
@@ -8,21 +8,35 @@ const AudioModalContainer = props =>
;
const APP_CONFIG = Meteor.settings.public.app;
+const { listenOnlyMode, forceListenOnly, skipCheck } = APP_CONFIG;
+
export default withModalMounter(withTracker(({ mountModal }) =>
({
closeModal: () => {
if (!Service.isConnecting()) mountModal(null);
},
- joinMicrophone: () =>
- new Promise((resolve, reject) => {
- Service.joinMicrophone().then(() => {
+ joinMicrophone: () => {
+ if (APP_CONFIG.skipCheck) {
+ return new Promise((resolve, reject) => {
+ Service.joinMicrophone().then(() => {
+ mountModal(null);
+ resolve();
+ }).catch(() => {
+ Service.exitAudio();
+ reject();
+ });
+ });
+ }
+ return new Promise((resolve, reject) => {
+ Service.transferCall().then(() => {
mountModal(null);
resolve();
}).catch(() => {
Service.exitAudio();
reject();
});
- }),
+ });
+ },
joinListenOnly: () => Service.joinListenOnly().then(() => mountModal(null)),
leaveEchoTest: () => {
if (!Service.isEchoTest()) {
@@ -40,6 +54,9 @@ export default withModalMounter(withTracker(({ mountModal }) =>
inputDeviceId: Service.inputDeviceId(),
outputDeviceId: Service.outputDeviceId(),
showPermissionsOvelay: Service.isWaitingPermissions(),
- listenOnlyMode: APP_CONFIG.listenOnlyMode,
- skipCheck: APP_CONFIG.skipCheck,
+ listenOnlyMode,
+ skipCheck,
+ joinFullAudioImmediately: !listenOnlyMode && skipCheck,
+ joinFullAudioEchoTest: !listenOnlyMode && !skipCheck && !forceListenOnly,
+ forceListenOnlyAttendee: listenOnlyMode && forceListenOnly && !Service.isUserModerator(),
}))(AudioModalContainer));
diff --git a/bigbluebutton-html5/imports/ui/components/audio/service.js b/bigbluebutton-html5/imports/ui/components/audio/service.js
index 81fc11b73f..03d5ea58cd 100644
--- a/bigbluebutton-html5/imports/ui/components/audio/service.js
+++ b/bigbluebutton-html5/imports/ui/components/audio/service.js
@@ -8,7 +8,7 @@ const init = (messages) => {
if (AudioManager.initialized) return;
const meetingId = Auth.meetingID;
const userId = Auth.userID;
- const sessionToken = Auth.sessionToken;
+ const { sessionToken } = Auth;
const User = Users.findOne({ userId });
const username = User.name;
const Meeting = Meetings.findOne({ meetingId: User.meetingId });
@@ -53,4 +53,5 @@ export default {
outputDeviceId: () => AudioManager.outputDeviceId,
isEchoTest: () => AudioManager.isEchoTest,
error: () => AudioManager.error,
+ isUserModerator: () => Users.findOne({ userId: Auth.userID }).moderator,
};