Update VideoPlayer.vue

This commit is contained in:
Dragos 2022-11-08 19:04:01 +02:00 committed by GitHub
parent c27e0e1436
commit bae10c8ca7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@
<div <div
ref="container" ref="container"
data-shaka-player-container data-shaka-player-container
class="w-full max-h-screen flex justify-center" class="w-full max-h-screen flex justify-center efy_trans_filter_off"
:class="{ 'player-container': !isEmbed }" :class="{ 'player-container': !isEmbed }"
> >
<video ref="videoEl" class="w-full" data-shaka-player :autoplay="shouldAutoPlay" :loop="selectedAutoLoop" /> <video ref="videoEl" class="w-full" data-shaka-player :autoplay="shouldAutoPlay" :loop="selectedAutoLoop" />
@ -652,10 +652,11 @@ export default {
<style> <style>
.player-container { .player-container {
@apply max-h-75vh min-h-64 bg-black; @apply max-h-75vh min-h-64;
background: #000;
} }
[efy_theme="dark_black"] .player-container { [efy_theme="dark_black"] .player-container {
box-shadow: 0 0 0 1.5rem var(--efy_color_border); box-shadow: 0 0 0 1.5rem var(--efy_bg1);
} }
.shaka-video-container:-webkit-full-screen { .shaka-video-container:-webkit-full-screen {
max-height: none !important; max-height: none !important;
@ -664,15 +665,19 @@ export default {
/*Captions*/ /*Captions*/
.shaka-text-wrapper * { .shaka-text-wrapper * {
text-align: left !important; text-align: left !important;
font-family: "nunito" !important;
} }
.shaka-text-wrapper > span { .shaka-text-wrapper > span {
background: #0008; background: #0008 !important;
backdrop-filter: blur(20rem); backdrop-filter: blur(20rem);
border: 1.5rem solid var(--efy_color_border); border: 1.5rem solid var(--efy_color_border);
border-radius: var(--efy_radius); border-radius: var(--efy_radius);
padding: 8rem 12rem; padding: 8rem 12rem;
line-height: 28rem; line-height: 28rem;
} }
.shaka-text-wrapper > span:empty {
display: none !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 */ /* 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 { .shaka-text-wrapper > span > span *:first-child:last-child {
background: transparent !important; background: transparent !important;
@ -727,4 +732,7 @@ html .shaka-range-element:focus {
background: var(--efy_bg1) !important; background: var(--efy_bg1) !important;
box-shadow: inset 0 0 0 1.5px var(--efy_bg1); box-shadow: inset 0 0 0 1.5px var(--efy_bg1);
} }
.shaka-controls-container {
border-radius: var(--efy_radius) !important;
}
</style> </style>