-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix(accessibility): By default, show track selection buttons at all responsive breakpoints #7603
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,18 +4,23 @@ | |
// - Play button | ||
// - Volume Mute button | ||
// - Progress bar | ||
// - Subs-Caps button | ||
// - Track buttons | ||
// - Native PiP button | ||
// - Fullscreen button | ||
// | ||
// When the player is "small", display only: | ||
// When the player is "x-small", display only: | ||
// - Play button | ||
// - Volume Mute button | ||
// - Progress bar | ||
// - Spacer | ||
// - Track buttons | ||
// - Native PiP button | ||
// - Fullscreen button | ||
// | ||
// When the player is "tiny", display only: | ||
// - Play button | ||
// - Volume Mute button | ||
// - Track buttons | ||
// - Native PiP button | ||
// - Fullscreen Button | ||
// | ||
.video-js { | ||
|
@@ -28,11 +33,6 @@ | |
.vjs-duration, | ||
.vjs-remaining-time, | ||
.vjs-playback-rate, | ||
.vjs-chapters-button, | ||
.vjs-descriptions-button, | ||
.vjs-captions-button, | ||
.vjs-subtitles-button, | ||
.vjs-audio-button, | ||
.vjs-volume-control { | ||
display: none; | ||
} | ||
|
@@ -50,20 +50,18 @@ | |
} | ||
} | ||
|
||
// Hide the subs-caps button for non-Live UI "x-small" and for "tiny" players. | ||
&.vjs-layout-x-small:not(.vjs-liveui), | ||
&.vjs-layout-x-small:not(.vjs-live), | ||
// At x-small and tiny, the progress control is too narrow to be useful. | ||
&.vjs-layout-x-small, | ||
&.vjs-layout-tiny { | ||
.vjs-subs-caps-button { | ||
|
||
.vjs-progress-control { | ||
Comment on lines
+53
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Progress control is now hidden in all cases of |
||
display: none; | ||
} | ||
} | ||
|
||
// With the new Live UI, we can have the same treatment as "tiny". At | ||
// "x-small", the Live UI makes the progress control very small and almost | ||
// useless. | ||
&.vjs-layout-x-small.vjs-liveui, | ||
&.vjs-layout-tiny { | ||
// At x-small, the buttons alone leave a large gap on the right. Fill it with | ||
// the spacer element. | ||
&.vjs-layout-x-small { | ||
Comment on lines
+62
to
+64
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even with the progress control hidden, there is still some real estate left in some cases at |
||
|
||
.vjs-custom-control-spacer { | ||
@include flex(auto); | ||
|
@@ -73,9 +71,5 @@ | |
&.vjs-no-flex .vjs-custom-control-spacer { | ||
width: auto; | ||
} | ||
|
||
.vjs-progress-control { | ||
display: none; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of simply showing the subtitles/captions button, show all track selection buttons, by default. This seemed more prudent in the light of accessibility concerns.