mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 12:16:20 -04:00
* First version of video looping for the web * Use prop for slideshow state * refactor asset settings and add autoloop video setting * rename variables and adjust description * loop videos based on user settings in gallery viewer * make asset viewer setting a stateless widget * do not update video playback value if looping is enabled * add some translations * adjust description * add missing id * WIP * chore: clean up --------- Co-authored-by: Alex <alex.tran1502@gmail.com> Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
17 lines
645 B
Svelte
17 lines
645 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;
|
|
export let loopVideo: boolean;
|
|
</script>
|
|
|
|
{#if projectionType === ProjectionType.EQUIRECTANGULAR}
|
|
<PanoramaViewer asset={{ id: assetId, type: AssetTypeEnum.Video }} />
|
|
{:else}
|
|
<VideoNativeViewer {loopVideo} {assetId} on:onVideoEnded on:onVideoStarted />
|
|
{/if}
|