Skip to content

Commit

Permalink
feat(UI): Allow show/hide ui programmatically (#6117)
Browse files Browse the repository at this point in the history
Closes #6116
  • Loading branch information
avelad committed Jan 18, 2024
1 parent 1671a3e commit 4e599cb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ui/controls.js
Expand Up @@ -1702,6 +1702,21 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
this.eventManager_.unlisten(window, 'mousedown');
}

/**
* @export
*/
showUI() {
const event = new Event('mousemove', {bubbles: false, cancelable: false});
this.onMouseMove_(event);
}

/**
* @export
*/
hideUI() {
this.onMouseLeave_();
}

/**
* Create a localization instance already pre-loaded with all the locales that
* we support.
Expand Down

0 comments on commit 4e599cb

Please sign in to comment.