Ver código fonte

Merge branch 'talk-muted'

j8
Lyubomir Marinov 8 anos atrás
pai
commit
b2a70b263a

+ 6
- 0
conference.js Ver arquivo

@@ -17,6 +17,7 @@ import mediaDeviceHelper from './modules/devices/mediaDeviceHelper';
17 17
 import {reportError} from './modules/util/helpers';
18 18
 
19 19
 import UIErrors from './modules/UI/UIErrors';
20
+import UIUtil from './modules/UI/util/UIUtil';
20 21
 
21 22
 const ConnectionEvents = JitsiMeetJS.events.connection;
22 23
 const ConnectionErrors = JitsiMeetJS.errors.connection;
@@ -1278,6 +1279,11 @@ export default {
1278 1279
             APP.UI.setAudioLevel(id, lvl);
1279 1280
         });
1280 1281
 
1282
+        room.on(ConferenceEvents.TALK_WHILE_MUTED, () => {
1283
+            APP.UI.showToolbar(6000);
1284
+            UIUtil.animateShowElement($("#talkWhileMutedPopup"), true, 5000);
1285
+        });
1286
+
1281 1287
         room.on(ConferenceEvents.IN_LAST_N_CHANGED, (inLastN) => {
1282 1288
             //FIXME
1283 1289
             if (config.muteLocalVideoIfNotInLastN) {

+ 1
- 0
lang/main.json Ver arquivo

@@ -90,6 +90,7 @@
90 90
         "dialpad": "Show dialpad",
91 91
         "sharedVideoMutedPopup": "Your shared video has been muted so<br/>that you can talk to the other participants.",
92 92
         "micMutedPopup": "Your microphone has been muted so that you<br/>would fully enjoy your shared video.",
93
+        "talkWhileMutedPopup": "Trying to speak? You are muted.",
93 94
         "unableToUnmutePopup": "You cannot un-mute while the shared video is on.",
94 95
         "cameraDisabled": "Camera is not available",
95 96
         "micDisabled": "Microphone is not available",

+ 2
- 2
modules/UI/UI.js Ver arquivo

@@ -884,8 +884,8 @@ UI.clickOnVideo = function (videoNumber) {
884 884
 };
885 885
 
886 886
 //Used by torture
887
-UI.showToolbar = function () {
888
-    return ToolbarToggler.showToolbar();
887
+UI.showToolbar = function (timeout) {
888
+    return ToolbarToggler.showToolbar(timeout);
889 889
 };
890 890
 
891 891
 //Used by torture

+ 5
- 0
modules/UI/toolbars/Toolbar.js Ver arquivo

@@ -209,6 +209,11 @@ const defaultToolbarButtons = {
209 209
                 id: "unableToUnmutePopup",
210 210
                 className: "loginmenu",
211 211
                 dataAttr: "[html]toolbar.unableToUnmutePopup"
212
+            },
213
+            {
214
+                id: "talkWhileMutedPopup",
215
+                className: "loginmenu",
216
+                dataAttr: "[html]toolbar.talkWhileMutedPopup"
212 217
             }
213 218
         ],
214 219
         content: "Mute / Unmute",

+ 4
- 2
modules/UI/toolbars/ToolbarToggler.js Ver arquivo

@@ -89,8 +89,9 @@ const ToolbarToggler = {
89 89
 
90 90
     /**
91 91
      * Shows the main toolbar.
92
+     * @param timeout (optional) to specify custom timeout value
92 93
      */
93
-    showToolbar () {
94
+    showToolbar (timeout) {
94 95
         if (interfaceConfig.filmStripOnly) {
95 96
             return;
96 97
         }
@@ -107,7 +108,8 @@ const ToolbarToggler = {
107 108
                 clearTimeout(toolbarTimeoutObject);
108 109
                 toolbarTimeoutObject = null;
109 110
             }
110
-            toolbarTimeoutObject = setTimeout(hideToolbar, toolbarTimeout);
111
+            toolbarTimeoutObject
112
+                = setTimeout(hideToolbar, timeout || toolbarTimeout);
111 113
             toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
112 114
         }
113 115
 

Carregando…
Cancelar
Salvar