Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using the click action on a <video> element doesn't do anything. #132

Closed
duhrer opened this issue Dec 18, 2023 · 1 comment
Closed

Using the click action on a <video> element doesn't do anything. #132

duhrer opened this issue Dec 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@duhrer
Copy link
Contributor

duhrer commented Dec 18, 2023

At the moment, <video> elements without controls are not reachable using next/previous item navigation. (See #131 for more background.)

However, <video> elements with controls are reachable, but don't work with our click action. With a mouse click or keyboard (space, enter), the video starts or pauses. Using our click action on a video element with controls doesn't do anything.

Once we have an approach that resolves #131, we need to test video click separately.

@duhrer
Copy link
Contributor Author

duhrer commented Dec 18, 2023

There's no way to get to the (generated) shadow root associated with a <video> element, but thankfully there are methods it provides as an HTMLMediaElement that we can use to:

  1. Check to see if the video is paused
  2. play if it's paused, pause if it isn't

Similar to <select> elements and text <input> elements, we would special-case handling of <video>a (and perhaps <audio>) elements in the click action.

We still need an approach for videos that don't enable controls by default, I'd suggest adding a user-configurable preference to control whether controls are added to all videos. Then we'd have something within the mutation observer that automatically enables controls for any videos that have them turned off.

duhrer added a commit to duhrer/gamepad-navigator that referenced this issue Dec 19, 2023
@duhrer duhrer closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant