diff --git a/src/css/components/_text-track.scss b/src/css/components/_text-track.scss index 23ceae4f61..6c9c83d0aa 100644 --- a/src/css/components/_text-track.scss +++ b/src/css/components/_text-track.scss @@ -47,7 +47,7 @@ video::-webkit-media-text-track-display { width: 80% !important; } -.video-js .inset-alternative { +.video-js .vjs-text-track-display-inset { top: 0; right: 0; bottom: 0; diff --git a/src/js/tracks/text-track-display.js b/src/js/tracks/text-track-display.js index fa2828c63d..686c690c6c 100644 --- a/src/js/tracks/text-track-display.js +++ b/src/js/tracks/text-track-display.js @@ -331,7 +331,7 @@ class TextTrackDisplay extends Component { textTrackDisplay.style = ''; // Add custom class to textTrackDisplay div child for not inset support styles - textTrackDisplay.firstChild.classList.add('inset-alternative'); + textTrackDisplay.firstChild.classList.add('vjs-text-track-display-inset'); // textrack style updates, this styles are required to be inline tryUpdateStyle(textTrackDisplay, 'position', 'relative'); diff --git a/test/unit/tracks/text-track-display.test.js b/test/unit/tracks/text-track-display.test.js index 88f5a6660f..d6b09fe782 100644 --- a/test/unit/tracks/text-track-display.test.js +++ b/test/unit/tracks/text-track-display.test.js @@ -575,7 +575,7 @@ if (!Html5.supportsNativeTextTracks()) { assert.ok(player.textTrackDisplay.el_.querySelector('.vjs-text-track-cue').style.left === 'unset', 'Style of left for vjs-text-track-cue element should be unset'); assert.ok(player.textTrackDisplay.el_.querySelector('.vjs-text-track-cue').style.top === '1px', 'Style of top for vjs-text-track-cue element should be 1px'); assert.ok(player.textTrackDisplay.el_.querySelector('.vjs-text-track-cue').style.right === '2px', 'Style of right for vjs-text-track-cue element should be 2px'); - assert.ok(player.textTrackDisplay.el_.firstChild.classList.contains('inset-alternative'), 'Child of textTrackDisplay should contain class of inset-alternative'); + assert.ok(player.textTrackDisplay.el_.firstChild.classList.contains('vjs-text-track-display-inset'), 'Child of textTrackDisplay should contain class of inset-alternative'); player.dispose(); }); }