enhance video player layout by ensuring full width and maintaining aspect ratio

This commit is contained in:
timonrieger
2026-03-17 18:08:56 +01:00
parent 96fbc97032
commit 86aef3ecc9

View File

@@ -165,7 +165,13 @@
</div>
{:else}
<!-- dir=ltr based on https://github.com/videojs/video.js/issues/949 -->
<media-controller dir="ltr" nohotkeys class="h-full w-full dark" defaultduration={duration}>
<media-controller
dir="ltr"
nohotkeys
class="h-full max-w-full dark"
style={asset.width != null && asset.height != null ? `aspect-ratio: ${asset.width} / ${asset.height};` : undefined}
defaultduration={duration}
>
<video
bind:this={videoPlayer}
slot="media"