Skip to content

Commit

Permalink
fix: use tryUpdateStyle to update textTrackDisplay for consistency wi…
Browse files Browse the repository at this point in the history
…th the rest of the code
  • Loading branch information
CarlosVillasenor committed Aug 14, 2024
1 parent 3e17e4d commit 2686b51
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/js/tracks/text-track-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ class TextTrackDisplay extends Component {
this.updateForTrack(descriptionsTrack);
}

if (!window.CSS.supports('inset', '10px')) {
if (window.CSS.supports('inset', '10px')) {
const textTrackDisplay = this.el_;
const vjsTextTrackCues = textTrackDisplay.querySelectorAll('.vjs-text-track-cue');

Expand All @@ -341,10 +341,10 @@ class TextTrackDisplay extends Component {
}

// textrack style updates, this styles are required to be inline
textTrackDisplay.style.position = 'relative';
textTrackDisplay.style.height = textTrackDisplayHeight + 'px';
textTrackDisplay.style.top = 'unset';
textTrackDisplay.style.bottom = '0px';
tryUpdateStyle(textTrackDisplay, 'position', 'relative');
tryUpdateStyle(textTrackDisplay, 'height', textTrackDisplayHeight + 'px');
tryUpdateStyle(textTrackDisplay, 'top', 'unset');
tryUpdateStyle(textTrackDisplay, 'bottom', '0px');
}
}

Expand Down

0 comments on commit 2686b51

Please sign in to comment.