Skip to content

Commit

Permalink
Merge pull request #5653 from dmitrylyzo/fix-videoosd-hide
Browse files Browse the repository at this point in the history
Fix video OSD not fully hiding
  • Loading branch information
thornbill authored Jun 4, 2024
2 parents 7854c4b + cbedc38 commit 74a3bd8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/controllers/playback/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,18 +323,14 @@ export default function (view) {
}

function clearHideAnimationEventListeners(elem) {
dom.removeEventListener(elem, transitionEndEventName, onHideAnimationComplete, {
once: true
});
elem.removeEventListener(transitionEndEventName, onHideAnimationComplete);
}

function onHideAnimationComplete(e) {
const elem = e.target;
if (elem != osdBottomElement) return;
elem.classList.add('hide');
dom.removeEventListener(elem, transitionEndEventName, onHideAnimationComplete, {
once: true
});
elem.removeEventListener(transitionEndEventName, onHideAnimationComplete);
}

const _focus = debounce((focusElement) => focusManager.focus(focusElement), 50);
Expand Down Expand Up @@ -364,9 +360,7 @@ export default function (view) {
clearHideAnimationEventListeners(elem);
elem.classList.add('videoOsdBottom-hidden');

dom.addEventListener(elem, transitionEndEventName, onHideAnimationComplete, {
once: true
});
elem.addEventListener(transitionEndEventName, onHideAnimationComplete);
currentVisibleMenu = null;
toggleSubtitleSync('hide');

Expand Down

0 comments on commit 74a3bd8

Please sign in to comment.