Skip to content

Commit

Permalink
fix(control-bar): incorrect display when control bar display is locked (
Browse files Browse the repository at this point in the history
#8435)

The control bar is not displayed correctly when the display is locked because `.vjs-lock-showing` uses `display` `block` instead of `flex`.

- use `display` `flex` instead of `display` `block` when the control bar has `.vjs-lock-showing` class
- ensure that the control bar is not displayed if the `player` has classes:
  - `.vjs-controls-disabled`
  - `.vjs-using-native-controls`
  - `.vjs-error`
  • Loading branch information
amtins authored Sep 27, 2023
1 parent 68f1429 commit 473176f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/css/components/_control-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
@include background-color-with-alpha($primary-background-color, $primary-background-transparency);
}

// Locks the display only if:
// - controls are not disabled
// - native controls are not used
// - there is no error
.video-js:not(.vjs-controls-disabled, .vjs-using-native-controls, .vjs-error) .vjs-control-bar.vjs-lock-showing {
display: flex !important;
}

// Video has started playing or we are in audioOnlyMode
.vjs-has-started .vjs-control-bar,
.vjs-audio-only-mode .vjs-control-bar {
Expand Down

0 comments on commit 473176f

Please sign in to comment.