Skip to content

Commit

Permalink
Background color only should apply to nested cues in UITextDisplayer (#…
Browse files Browse the repository at this point in the history
…2624)

Closes #2623

Backported to v2.5.x

Change-Id: I299c704a580ffb4402bc6bf9b6058b6f1c4d2820
  • Loading branch information
Alvaro Velad authored and joeyparrish committed Jun 10, 2020
1 parent b34714c commit d5e34a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/text_displayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ shaka.ui.TextDisplayer = class {
// Set white-space to 'pre-line' to enable showing line breaks in the text.
captionsStyle.whiteSpace = 'pre-line';
captions.textContent = cue.payload;
captionsStyle.backgroundColor = cue.backgroundColor;
if (isNested) {
captionsStyle.backgroundColor = cue.backgroundColor;
}
captionsStyle.color = cue.color;
captionsStyle.direction = cue.direction;

Expand Down

0 comments on commit d5e34a3

Please sign in to comment.