mirror of
https://github.com/immich-app/immich.git
synced 2025-11-26 00:20:47 +09:00
refactor(web): use ImmichApi to create urls (#2435)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { api } from '@api';
|
||||
import { fade } from 'svelte/transition';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import LoadingSpinner from '../shared-components/loading-spinner.svelte';
|
||||
import { getFileUrl } from '@api';
|
||||
|
||||
export let assetId: string;
|
||||
export let publicSharedKey = '';
|
||||
export let publicSharedKey: string | undefined = undefined;
|
||||
|
||||
let isVideoLoading = true;
|
||||
const dispatch = createEventDispatcher();
|
||||
@@ -31,7 +31,7 @@
|
||||
on:canplay={handleCanPlay}
|
||||
on:ended={() => dispatch('onVideoEnded')}
|
||||
>
|
||||
<source src={getFileUrl(assetId, false, true, publicSharedKey)} type="video/mp4" />
|
||||
<source src={api.getAssetFileUrl(assetId, false, true, publicSharedKey)} type="video/mp4" />
|
||||
<track kind="captions" />
|
||||
</video>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user