fix(frontend): paint video poster frames, clip round videos to circle
This commit is contained in:
1 parent
525ce024bc
commit
6b6edc9a0d
9 files changed
+79
-6
No files matched your search
@@ -9,6 +9,7 @@
|
||||
import Spinner from "$lib/components/ui/Spinner.svelte";
|
||||
import { formatListDate } from "$lib/format/datetime";
|
||||
import { formatBytes, mediaKindLabel } from "$lib/format/media";
|
||||
import { poster } from "$lib/media/poster";
|
||||
import { accounts } from "$lib/stores/accounts.svelte";
|
||||
import { ui } from "$lib/stores/ui.svelte";
|
||||
|
||||
@@ -132,7 +133,13 @@
|
||||
{#if preview(item)?.state === "ready"}
|
||||
{@const ready = preview(item) as Extract<InlineMedia, { state: "ready" }>}
|
||||
{#if visualKind(item.kind) === "video"}
|
||||
<video src={ready.url} muted preload="metadata"></video>
|
||||
<video
|
||||
src={ready.url}
|
||||
muted
|
||||
playsinline
|
||||
preload="metadata"
|
||||
use:poster
|
||||
></video>
|
||||
<span class="play"><Icon name="play" size="1.5rem" /></span>
|
||||
{:else}
|
||||
<img src={ready.url} alt="">
|
||||
|
||||
Reference in new issue
Block a user