mirror of
https://github.com/videojs/video.js.git
synced 2024-11-24 08:42:25 +02:00
feat(emulated-tracks): add class to force cues to be center aligned (#8625)
https://github.com/videojs/http-streaming/pull/1408 updated 608 captions to default to be left aligned. This may be unwanted by some folks and we should provide an easier way to force them to be centered. This PR adds a player level class that will override the text alignment to be `center`. It also overrides the `width` to `80%` because otherwise the cue box isn't set up correctly to be 10% from the right of the display area (a side effect of hardcoding a width value and using inset in the generation of the cues).
This commit is contained in:
parent
3f32de30ca
commit
d715e0fe03
@ -40,3 +40,9 @@ video::-webkit-media-text-track-display {
|
||||
.video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display {
|
||||
@include transform(translateY(-1.5em));
|
||||
}
|
||||
|
||||
// force cues to be center aligned
|
||||
.video-js.vjs-force-center-align-cues .vjs-text-track-cue {
|
||||
text-align: center !important;
|
||||
width: 80% !important;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user