Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds option to add custom timeout for hiding toolbar.

damencho1a554828e196
diff --git a/modules/UI/UI.js b/modules/UI/UI.js
index 568fbd2baf..725d980920 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 33db77b385..4a344cf0af 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;
}