Skip to content

Commit

Permalink
fix: show chrome on pointermove for custom video (#604)
Browse files Browse the repository at this point in the history
this makes media chrome show the controls even when the pointermove is
detected from `media-controller`.

for some custom video elements is not possible always to detect this
from the media element itself because of pointerevents none on the child
elements in the media element.

I think it's okay but let me know if you see any issues with this

fixes #451 related #298
  • Loading branch information
luwes authored May 11, 2023
1 parent 3d96b16 commit de8035b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/js/media-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ class MediaContainer extends window.HTMLElement {
// so, only run pointermove for mouse
if (e.pointerType !== 'mouse') return;

if (e.target === this) return;

setActive();
// Stay visible if hovered over control bar
window.clearTimeout(this._inactiveTimeout);
Expand Down

1 comment on commit de8035b

@vercel
Copy link

@vercel vercel bot commented on de8035b May 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.