Skip to content

Commit affc061

Browse files
authored
fix(text-track): don't overlap captions when font-size changes (#6874)
For whatever reason, when the font size for text tracks is changed in the text track settings dialog, we set a bottom of 2px on the cue. This was added as part of the initial vtt work for Video.js in 4e5c28c#diff-8169d53aa7eee6cab5f85b6641ef3117R176. However, this doesn't seem to be doing anything right now and having it means that when font-size is changed, multiple cues end up with a button value of 2px causing them to overlap and obscure each other. This works fine if the cues are positioned away from each other, however, if multiple cues are positioned by default and a large font size is used, while they will now stay on their lines, they may partially obscure each other. This does not fix that issue and may require modification (addition of overrides) to vtt.js to properly support.
1 parent 8e5a1af commit affc061

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/js/tracks/text-track-display.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ class TextTrackDisplay extends Component {
368368
cueDiv.style.fontSize = (fontSize * overrides.fontPercent) + 'px';
369369
cueDiv.style.height = 'auto';
370370
cueDiv.style.top = 'auto';
371-
cueDiv.style.bottom = '2px';
372371
}
373372
if (overrides.fontFamily && overrides.fontFamily !== 'default') {
374373
if (overrides.fontFamily === 'small-caps') {

0 commit comments

Comments
 (0)