From e7e7c7d5a0a4ff7b6c32e4c9fb39d6141793b440 Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 8 Sep 2016 20:19:18 -0500 Subject: [PATCH 1/6] Handles talk while muted event. --- conference.js | 6 ++++++ lang/main.json | 1 + 2 files changed, 7 insertions(+) diff --git a/conference.js b/conference.js index 4fd421b00..bffe1f5d3 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; @@ -1097,6 +1098,11 @@ export default { APP.UI.setAudioLevel(id, lvl); }); + room.on(ConferenceEvents.TALK_WHILE_MUTED, () => { + APP.UI.showToolbar(); + 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 d98229c7d..5f51bd79a 100644 --- a/lang/main.json +++ b/lang/main.json @@ -91,6 +91,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": "Your microphone is muted
while you are trying to talk.", "unableToUnmutePopup": "You cannot un-mute while the shared video is on.", "cameraDisabled": "Camera is not available", "micDisabled": "Microphone is not available", From 974a0334df24f8257fee96cf0951430099c000fe Mon Sep 17 00:00:00 2001 From: damencho Date: Thu, 8 Sep 2016 20:41:41 -0500 Subject: [PATCH 2/6] Updates text for talk while muted. --- lang/main.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/main.json b/lang/main.json index 5f51bd79a..84d557f09 100644 --- a/lang/main.json +++ b/lang/main.json @@ -91,7 +91,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": "Your microphone is muted
while you are trying to talk.", + "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", From 1a554828e196a99edfc0c3cf724067b44d31ceee Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 9 Sep 2016 14:37:04 -0500 Subject: [PATCH 3/6] Adds option to add custom timeout for hiding toolbar. --- modules/UI/UI.js | 4 ++-- modules/UI/toolbars/ToolbarToggler.js | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/UI/UI.js b/modules/UI/UI.js index 568fbd2ba..725d98092 100644 --- a/modules/UI/UI.js +++ b/modules/UI/UI.js @@ -853,8 +853,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/ToolbarToggler.js b/modules/UI/toolbars/ToolbarToggler.js index 33db77b38..4a344cf0a 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 ? timeout : toolbarTimeout); toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT; } From c43b1f54c7deea0d8e277a97368b9eda973006ec Mon Sep 17 00:00:00 2001 From: damencho Date: Fri, 9 Sep 2016 14:37:47 -0500 Subject: [PATCH 4/6] Shows toolbar before showing talk while muted notification. --- conference.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conference.js b/conference.js index bffe1f5d3..92920c3d9 100644 --- a/conference.js +++ b/conference.js @@ -1099,7 +1099,7 @@ export default { }); room.on(ConferenceEvents.TALK_WHILE_MUTED, () => { - APP.UI.showToolbar(); + APP.UI.showToolbar(6000); UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000); }); From 3ee61df319185768fab0598253d20d79fd3114a2 Mon Sep 17 00:00:00 2001 From: damencho Date: Tue, 13 Sep 2016 16:23:38 -0500 Subject: [PATCH 5/6] Updates talk while muted indication after latest ui changes. --- modules/UI/toolbars/Toolbar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index 876b6f108..6a03ec6a8 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.js @@ -199,6 +199,11 @@ const defaultToolbarButtons = { id: "unableToUnmutePopup", className: "loginmenu", dataAttr: "[html]toolbar.unableToUnmutePopup" + }, + { + id: "talkWhileMutedPopup", + className: "loginmenu", + dataAttr: "[html]toolbar.talkWhileMutedPopup" } ], content: "Mute / Unmute", From 2f92aa9645b95af152496fe52363983f74285997 Mon Sep 17 00:00:00 2001 From: Maxim Voloshin Date: Fri, 30 Sep 2016 14:06:57 +0300 Subject: [PATCH 6/6] Completely remove attributes to destroy tooltip properly --- modules/UI/util/UIUtil.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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',''); }, /**