diff --git a/ui/controls.js b/ui/controls.js index 8f36c4e9c5..d051ef1fbd 100644 --- a/ui/controls.js +++ b/ui/controls.js @@ -1095,6 +1095,14 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget { * @private */ isHovered_() { + if (!window.matchMedia('hover: hover').matches) { + // This is primarily a touch-screen device, so the :hover query below + // doesn't make sense. In spite of this, the :hover query on an element + // can still return true on such a device after a touch ends. + // See https://bit.ly/34dBORX for details. + return false; + } + return this.showOnHoverControls_.some((element) => { return element.matches(':hover'); });