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

Play Control Button is focused on click of Big Play Button #185

Open
rtritto opened this issue Jan 4, 2025 · 5 comments
Open

Play Control Button is focused on click of Big Play Button #185

rtritto opened this issue Jan 4, 2025 · 5 comments

Comments

@rtritto
Copy link

rtritto commented Jan 4, 2025

Description

As default Video.js displays Big Play (vjs-big-play-button CSS class).

When vjs-big-play-button is clicked, the vjs-play-control is focused:

2025-01-07.011304.mp4

Solutions

  1. hide vjs-big-play-button and show a similar Mobile Big Play Button component.
// /videojs-mobile-ui/src/plugin.css
.video-js.vjs-mobile-ui {
+  .vjs-big-play-button {
+    display: none;
+  }
+  // implementation to show Mobile Big Play Button
}
  1. replace default behavior of video.js:

Repro

https://stackblitz.com/edit/vercel-next-js-dykavrxx

@rtritto rtritto changed the title Hide Big Play Button Big Play Button isn't properly displayed Jan 4, 2025
@rtritto
Copy link
Author

rtritto commented Jan 7, 2025

FYI @mister-ben

@rtritto
Copy link
Author

rtritto commented Jan 7, 2025

Maybe the focus issue can be fixed in video.js.

@rtritto
Copy link
Author

rtritto commented Jan 7, 2025

I created discussion videojs/video.js#8954

@rtritto rtritto changed the title Big Play Button isn't properly displayed Play Control Button is focused on click of Big Play Button Jan 7, 2025
@mister-ben
Copy link
Owner

The stackblitz doesn't run, but the video shows Video.js's normal behaviour. Why do you thunk that is an issue? The keyboard focus doesn't change how the touch overlay works.

@rtritto
Copy link
Author

rtritto commented Jan 8, 2025

The stackblitz doesn't run

Did you wait until "Ready" log? Next you can reload the stackblitz inner page.

Why do you thunk that is an issue?

With the click event (desktop), the Play Control isn't focused.
While, with the touch event (mobile), the Play Control is focused.

In mobile, that focus is confusing and I want to remove it like in the desktop one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants