mirror of
https://github.com/immich-app/immich.git
synced 2025-06-10 09:04:52 -04:00
* [web]: support 360 video * lint * lint * fix typing --------- Co-authored-by: Alex <alex.tran1502@gmail.com>
16 lines
600 B
Svelte
16 lines
600 B
Svelte
<script lang="ts">
|
|
import { AssetTypeEnum } from '@immich/sdk';
|
|
import { ProjectionType } from '$lib/constants';
|
|
import VideoNativeViewer from '$lib/components/asset-viewer/video-native-viewer.svelte';
|
|
import PanoramaViewer from '$lib/components/asset-viewer/panorama-viewer.svelte';
|
|
|
|
export let assetId: string;
|
|
export let projectionType: string | null | undefined;
|
|
</script>
|
|
|
|
{#if projectionType === ProjectionType.EQUIRECTANGULAR}
|
|
<PanoramaViewer asset={{ id: assetId, type: AssetTypeEnum.Video }} />
|
|
{:else}
|
|
<VideoNativeViewer {assetId} on:onVideoEnded on:onVideoStarted />
|
|
{/if}
|