mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-17 16:26:39 +03:00
fix(UI): Allow configure close menu delay time (#8235)
Fixes https://github.com/shaka-project/shaka-player/issues/8224
This commit is contained in:
committed by
GitHub
parent
3c789eca42
commit
de4bb9e8a8
Vendored
+2
-1
@@ -134,7 +134,8 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
|
||||
// seconds in case a user immediately initiates another mouse move to
|
||||
// interact with the menus. If that didn't happen, go ahead and hide
|
||||
// the menus.
|
||||
this.hideSettingsMenusTimer_.tickAfter(/* seconds= */ 2);
|
||||
this.hideSettingsMenusTimer_.tickAfter(
|
||||
/* seconds= */ this.config_.closeMenusDelay);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -81,6 +81,7 @@ shaka.extern.UIVolumeBarColors;
|
||||
* trackLabelFormat: shaka.ui.Overlay.TrackLabelFormat,
|
||||
* textTrackLabelFormat: shaka.ui.Overlay.TrackLabelFormat,
|
||||
* fadeDelay: number,
|
||||
* closeMenusDelay: number,
|
||||
* doubleClickForFullscreen: boolean,
|
||||
* singleClickForPlayAndPause: boolean,
|
||||
* enableKeyboardPlaybackControls: boolean,
|
||||
@@ -182,6 +183,9 @@ shaka.extern.UIVolumeBarColors;
|
||||
* interacting with them. We recommend setting this to 3 on your cast
|
||||
* receiver UI.
|
||||
* Defaults to 0.
|
||||
* @property {number} closeMenusDelay
|
||||
* The delay (in seconds) before close the opened menus when the UI is hidden.
|
||||
* Defaults to 2.
|
||||
* @property {boolean} doubleClickForFullscreen
|
||||
* Whether or not double-clicking on the UI should cause it to enter
|
||||
* fullscreen.
|
||||
|
||||
@@ -321,6 +321,7 @@ shaka.ui.Overlay = class {
|
||||
trackLabelFormat: shaka.ui.Overlay.TrackLabelFormat.LANGUAGE,
|
||||
textTrackLabelFormat: shaka.ui.Overlay.TrackLabelFormat.LANGUAGE,
|
||||
fadeDelay: 0,
|
||||
closeMenusDelay: 2,
|
||||
doubleClickForFullscreen: true,
|
||||
singleClickForPlayAndPause: true,
|
||||
enableKeyboardPlaybackControls: true,
|
||||
|
||||
Reference in New Issue
Block a user