Closed duhrer closed 7 months ago
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:
paused
play
if it's paused, pause
if it isn'tSimilar 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.
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 ourclick
action. With a mouse click or keyboard (space, enter), the video starts or pauses. Using ourclick
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.