Skip to content

Commit

Permalink
Merge pull request #327 from Spaenny/fix-thumbnail
Browse files Browse the repository at this point in the history
fix #326 magic value for thumbnail video height
  • Loading branch information
WardPearce committed May 24, 2024
2 parents 72879ea + 800901b commit 7652699
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions materialious/src/lib/Thumbnail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -210,6 +211,7 @@
on:mouseover={previewVideo}
on:mouseleave={() => (showVideoPreview = false)}
on:focus={() => {}}
bind:clientHeight={imgHeight}
role="region"
>
<a
Expand All @@ -222,9 +224,9 @@
<progress class="circle"></progress>
{:else if loaded}
{#if showVideoPreview && videoPreview}
<div style="max-width: 100%; max-height: 200px;">
<div style="max-width: 100%; max-height: {imgHeight}px;">
<video
style="max-width: 100%; max-height: 200px;"
style="max-width: 100%; height: {imgHeight}px;"
autoplay
poster={img.src}
width="100%"
Expand Down

0 comments on commit 7652699

Please sign in to comment.