From b8bbf49158eb7cbb6ecf70a4600702c18afd1da9 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sat, 23 Jul 2022 18:15:40 +0200 Subject: [PATCH] improve captions style --- src/components/VideoPlayer.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/components/VideoPlayer.vue b/src/components/VideoPlayer.vue index a1a2c79f..247790ff 100644 --- a/src/components/VideoPlayer.vue +++ b/src/components/VideoPlayer.vue @@ -652,4 +652,19 @@ export default { .shaka-video-container:-webkit-full-screen { max-height: none !important; } + +/* captions style */ +.shaka-text-wrapper * { + text-align: left !important; +} + +.shaka-text-wrapper > span > span { + background-color: transparent !important; +} + +/* apply to all spans that don't include multiple other spans to avoid the style being applied to the text container too when the subtitles are two lines */ +.shaka-text-wrapper > span > span *:first-child:last-child { + background-color: rgba(0, 0, 0, 0.6) !important; + padding: 0.09em 0; +}