Skip to content

Commit

Permalink
fix(error-display): avoids displaying visual components when an error…
Browse files Browse the repository at this point in the history
… occurs (#8389)

When an error occurs, only the error screen should be displayed to maintain visual consistency.

- Hides the Title Bar
- Hides the Loading Spinner
- Hides the Captions Settings
- Hides the Text Track Display
  • Loading branch information
amtins authored Aug 17, 2023
1 parent 80ae35b commit 42e17b2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/css/components/_captions-settings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
height: 70%;
}

// Hide if an error occurs
.vjs-error .vjs-text-track-settings {
display: none;
}

// Layout divs
.vjs-text-track-settings .vjs-modal-dialog-content {
display: table;
Expand Down
5 changes: 5 additions & 0 deletions src/css/components/_loading.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
animation: vjs-spinner-show 0s linear 0.3s forwards;
}

// Hide if an error occurs
.vjs-error .vjs-loading-spinner {
display: none;
}

.vjs-loading-spinner:before,
.vjs-loading-spinner:after {
content: "";
Expand Down
5 changes: 5 additions & 0 deletions src/css/components/_text-track.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
pointer-events: none;
}

// Hide if an error occurs
.vjs-error .vjs-text-track-display {
display: none;
}

// Move captions down when controls aren't being shown
.video-js.vjs-controls-disabled .vjs-text-track-display,
.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {
Expand Down
5 changes: 5 additions & 0 deletions src/css/components/_title-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
width: 100%;
}

// Hide if an error occurs
.vjs-error .vjs-title-bar {
display: none;
}

.vjs-title-bar-title,
.vjs-title-bar-description {
margin: 0;
Expand Down

0 comments on commit 42e17b2

Please sign in to comment.