2024-04-21 12:14:54 -07:00
|
|
|
<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;
|
2024-05-14 21:31:47 +02:00
|
|
|
export let loopVideo: boolean;
|
2024-04-21 12:14:54 -07:00
|
|
|
</script>
|
|
|
|
|
|
|
|
{#if projectionType === ProjectionType.EQUIRECTANGULAR}
|
|
|
|
<PanoramaViewer asset={{ id: assetId, type: AssetTypeEnum.Video }} />
|
|
|
|
{:else}
|
2024-05-14 21:31:47 +02:00
|
|
|
<VideoNativeViewer {loopVideo} {assetId} on:onVideoEnded on:onVideoStarted />
|
2024-04-21 12:14:54 -07:00
|
|
|
{/if}
|