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
|
//Used by torture
|
||||||
UI.showToolbar = function () {
|
UI.showToolbar = function (timeout) {
|
||||||
return ToolbarToggler.showToolbar();
|
return ToolbarToggler.showToolbar(timeout);
|
||||||
};
|
};
|
||||||
|
|
||||||
//Used by torture
|
//Used by torture
|
||||||
|
|
|
@ -89,8 +89,9 @@ const ToolbarToggler = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows the main toolbar.
|
* Shows the main toolbar.
|
||||||
|
* @param timeout (optional) to specify custom timeout value
|
||||||
*/
|
*/
|
||||||
showToolbar () {
|
showToolbar (timeout) {
|
||||||
if (interfaceConfig.filmStripOnly) {
|
if (interfaceConfig.filmStripOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -107,7 +108,8 @@ const ToolbarToggler = {
|
||||||
clearTimeout(toolbarTimeoutObject);
|
clearTimeout(toolbarTimeoutObject);
|
||||||
toolbarTimeoutObject = null;
|
toolbarTimeoutObject = null;
|
||||||
}
|
}
|
||||||
toolbarTimeoutObject = setTimeout(hideToolbar, toolbarTimeout);
|
toolbarTimeoutObject = setTimeout(hideToolbar,
|
||||||
|
timeout ? timeout : toolbarTimeout);
|
||||||
toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
|
toolbarTimeout = interfaceConfig.TOOLBAR_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue