Skip to content

Commit 42e17b2

Browse files
authored
fix(error-display): avoids displaying visual components when an error 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
1 parent 80ae35b commit 42e17b2

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

src/css/components/_captions-settings.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
height: 70%;
66
}
77

8+
// Hide if an error occurs
9+
.vjs-error .vjs-text-track-settings {
10+
display: none;
11+
}
12+
813
// Layout divs
914
.vjs-text-track-settings .vjs-modal-dialog-content {
1015
display: table;

src/css/components/_loading.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
animation: vjs-spinner-show 0s linear 0.3s forwards;
2828
}
2929

30+
// Hide if an error occurs
31+
.vjs-error .vjs-loading-spinner {
32+
display: none;
33+
}
34+
3035
.vjs-loading-spinner:before,
3136
.vjs-loading-spinner:after {
3237
content: "";

src/css/components/_text-track.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
pointer-events: none;
99
}
1010

11+
// Hide if an error occurs
12+
.vjs-error .vjs-text-track-display {
13+
display: none;
14+
}
15+
1116
// Move captions down when controls aren't being shown
1217
.video-js.vjs-controls-disabled .vjs-text-track-display,
1318
.video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display {

src/css/components/_title-bar.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
width: 100%;
2323
}
2424

25+
// Hide if an error occurs
26+
.vjs-error .vjs-title-bar {
27+
display: none;
28+
}
29+
2530
.vjs-title-bar-title,
2631
.vjs-title-bar-description {
2732
margin: 0;

0 commit comments

Comments
 (0)