Files
immich/web/src/lib/components/asset-viewer/video-wrapper-viewer.svelte
andre-antunesdesa f721a62776 feat(web): load original videos (#20041)
* added user preference for always loading original video

added ability to toggle between transcoded/original in the video viewer

add fix to static check error

* address PR comments

* Update asset-viewer-nav-bar.svelte

Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>

---------

Co-authored-by: Mert <101130780+mertalev@users.noreply.github.com>
Co-authored-by: Daniel Dietzler <36593685+danieldietzler@users.noreply.github.com>
2025-10-24 19:03:51 +00:00

48 lines
1.1 KiB
Svelte

<script lang="ts">
import VideoNativeViewer from '$lib/components/asset-viewer/video-native-viewer.svelte';
import VideoPanoramaViewer from '$lib/components/asset-viewer/video-panorama-viewer.svelte';
import { ProjectionType } from '$lib/constants';
interface Props {
assetId: string;
projectionType: string | null | undefined;
cacheKey: string | null;
loopVideo: boolean;
playOriginalVideo: boolean;
onClose?: () => void;
onPreviousAsset?: () => void;
onNextAsset?: () => void;
onVideoEnded?: () => void;
onVideoStarted?: () => void;
}
let {
assetId,
projectionType,
cacheKey,
loopVideo,
playOriginalVideo,
onPreviousAsset,
onClose,
onNextAsset,
onVideoEnded,
onVideoStarted,
}: Props = $props();
</script>
{#if projectionType === ProjectionType.EQUIRECTANGULAR}
<VideoPanoramaViewer {assetId} />
{:else}
<VideoNativeViewer
{loopVideo}
{cacheKey}
{assetId}
{playOriginalVideo}
{onPreviousAsset}
{onNextAsset}
{onVideoEnded}
{onVideoStarted}
{onClose}
/>
{/if}