adds video support
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { isVideoURL } from "$lib/util/file_util";
|
||||
import { _ } from "svelte-i18n";
|
||||
|
||||
interface Props {
|
||||
@@ -38,6 +39,10 @@
|
||||
class="group relative h-32 w-32 rounded-xl bg-cover bg-no-repeat"
|
||||
style="background-image: url({src});"
|
||||
>
|
||||
{#if isVideoURL(src)}
|
||||
<!-- svelte-ignore a11y_media_has_caption -->
|
||||
<video autoplay loop class="h-32 w-32 rounded-xl object-cover" {src}></video>
|
||||
{/if}
|
||||
{#if isThumbnail && showThumbnailControls}
|
||||
<i
|
||||
class="fa fa-file-image absolute top-2 right-2 text-primary bg-white rounded-full px-[10px] py-2 shadow-lg"
|
||||
|
||||
Reference in New Issue
Block a user