diff --git a/bigbluebutton-html5/imports/startup/client/base.jsx b/bigbluebutton-html5/imports/startup/client/base.jsx index 2230a1bac5..27175f8767 100755 --- a/bigbluebutton-html5/imports/startup/client/base.jsx +++ b/bigbluebutton-html5/imports/startup/client/base.jsx @@ -311,6 +311,17 @@ const BaseContainer = withTracker(() => { }, }); + Users.find({}, { fields: { validated: 1 } }).observe({ + changed: (newDocument, oldDocument) => { + if (Settings.application.userJoinAudioAlerts + && !oldDocument.validated + && newDocument.validated) { + const audio = new Audio(`${Meteor.settings.public.app.cdn + Meteor.settings.public.app.basename}/resources/sounds/userJoin.mp3`); + audio.play(); + } + }, + }); + return { approved, ejected, diff --git a/bigbluebutton-html5/imports/ui/components/settings/component.jsx b/bigbluebutton-html5/imports/ui/components/settings/component.jsx index 587a401b10..0db1410ba6 100644 --- a/bigbluebutton-html5/imports/ui/components/settings/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/settings/component.jsx @@ -69,6 +69,7 @@ const propTypes = { application: PropTypes.shape({ chatAudioAlerts: PropTypes.bool, chatPushAlerts: PropTypes.bool, + userJoinAudioAlerts: PropTypes.bool, fallbackLocale: PropTypes.string, fontSize: PropTypes.string, locale: PropTypes.string, diff --git a/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx b/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx index a92d20bdfc..fdb3438a2d 100644 --- a/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/settings/submenus/application/component.jsx @@ -26,6 +26,10 @@ const intlMessages = defineMessages({ id: 'app.submenu.application.pushAlertLabel', description: 'push notifiation label', }, + userJoinAudioAlertLabel: { + id: 'app.submenu.application.userJoinAudioAlertLabel', + description: 'audio notification when a user joins', + }, fontSizeControlLabel: { id: 'app.submenu.application.fontSizeControlLabel', description: 'label for font size ontrol', @@ -240,6 +244,25 @@ class ApplicationMenu extends BaseMenu { ) : null } +
+ +
+
+ this.handleToggle('userJoinAudioAlerts')} + ariaLabel={intl.formatMessage(intlMessages.userJoinAudioAlertLabel)} + /> +
+
+