From 800901b40bd2d639c61f07eac34b3bce5a43ed11 Mon Sep 17 00:00:00 2001 From: Philipp Date: Fri, 24 May 2024 18:18:43 +0200 Subject: [PATCH] fix magic value for thumbnail video height Previously the height of the thumbnail videos was fixed at 180px, now we use the previous height of the div to set the height for the preview video appropriately. --- materialious/src/lib/Thumbnail.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/materialious/src/lib/Thumbnail.svelte b/materialious/src/lib/Thumbnail.svelte index 123ebffa..8115647c 100644 --- a/materialious/src/lib/Thumbnail.svelte +++ b/materialious/src/lib/Thumbnail.svelte @@ -28,6 +28,7 @@ let videoPreview: VideoPlay | null = null; let videoPreviewMuted: boolean = true; let videoPreviewVolume: number = 0.4; + let imgHeight: number; let proxyVideos = get(playerProxyVideosStore); @@ -210,6 +211,7 @@ on:mouseover={previewVideo} on:mouseleave={() => (showVideoPreview = false)} on:focus={() => {}} + bind:clientHeight={imgHeight} role="region" > {:else if loaded} {#if showVideoPreview && videoPreview} -
+