diff --git a/conference.js b/conference.js index 3dc45c35a..cd004a860 100644 --- a/conference.js +++ b/conference.js @@ -17,6 +17,7 @@ import mediaDeviceHelper from './modules/devices/mediaDeviceHelper'; import {reportError} from './modules/util/helpers'; import UIErrors from './modules/UI/UIErrors'; +import UIUtil from './modules/UI/util/UIUtil'; const ConnectionEvents = JitsiMeetJS.events.connection; const ConnectionErrors = JitsiMeetJS.errors.connection; @@ -1278,6 +1279,11 @@ export default { APP.UI.setAudioLevel(id, lvl); }); + room.on(ConferenceEvents.TALK_WHILE_MUTED, () => { + APP.UI.showToolbar(6000); + UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000); + }); + room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => { //FIXME if (config.muteLocalVideoIfNotInLastN) { diff --git a/lang/main.json b/lang/main.json index b20ec0039..42746f48e 100644 --- a/lang/main.json +++ b/lang/main.json @@ -90,6 +90,7 @@ "dialpad": "Show dialpad", "sharedVideoMutedPopup": "Your shared video has been muted so
that you can talk to the other participants.", "micMutedPopup": "Your microphone has been muted so that you
would fully enjoy your shared video.", + "talkWhileMutedPopup": "Trying to speak? You are muted.", "unableToUnmutePopup": "You cannot un-mute while the shared video is on.", "cameraDisabled": "Camera is not available", "micDisabled": "Microphone is not available", diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 1eec27d2f..9a3f68add 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -884,8 +884,8 @@ UI.clickOnVideo = function (videoNumber) { }; //Used by torture -UI.showToolbar = function () { - return ToolbarToggler.showToolbar(); +UI.showToolbar = function (timeout) { + return ToolbarToggler.showToolbar(timeout); }; //Used by torture diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index f6d239e7e..ef0d5e0cc 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.js @@ -209,6 +209,11 @@ const defaultToolbarButtons = { id: "unableToUnmutePopup", className: "loginmenu", dataAttr: "[html]toolbar.unableToUnmutePopup" + }, + { + id: "talkWhileMutedPopup", + className: "loginmenu", + dataAttr: "[html]toolbar.talkWhileMutedPopup" } ], content: "Mute / Unmute", diff --git a/modules/UI/toolbars/ToolbarToggler.js b/modules/UI/toolbars/ToolbarToggler.js index 33db77b38..a15663554 100644 --- a/modules/UI/toolbars/ToolbarToggler.js +++ b/modules/UI/toolbars/ToolbarToggler.js @@ -89,8 +89,9 @@ const ToolbarToggler = { /** * Shows the main toolbar. + * @param timeout (optional) to specify custom timeout value */ - showToolbar () { + showToolbar (timeout) { if (interfaceConfig.filmStripOnly) { return; } @@ -107,7 +108,8 @@ const ToolbarToggler = { clearTimeout(toolbarTimeoutObject); toolbarTimeoutObject = null; } - toolbarTimeoutObject = setTimeout(hideToolbar, toolbarTimeout); + toolbarTimeoutObject + = setTimeout(hideToolbar, timeout || toolbarTimeout); toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT; } diff --git a/modules/UI/util/UIUtil.js b/modules/UI/util/UIUtil.js index 6cddc1d49..6cf1fc51a 100644 --- a/modules/UI/util/UIUtil.js +++ b/modules/UI/util/UIUtil.js @@ -143,11 +143,9 @@ const TOOLTIP_POSITIONS = { * @param element the element to remove the tooltip from */ removeTooltip: function (element) { - AJS.$(element).tooltip('destroy'); - element.setAttribute('data-tooltip', ''); - element.setAttribute('data-i18n',''); - element.setAttribute('content',''); - element.setAttribute('shortcut',''); + element.removeAttribute('data-tooltip', ''); + element.removeAttribute('data-i18n',''); + element.removeAttribute('content',''); }, /**