Adds option to add custom timeout for hiding toolbar.
This commit is contained in:
parent
974a0334df
commit
1a554828e1
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue