mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): use thumbhash as a cache key (#16106)
Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
c524fcf084
commit
f386b4d377
8 changed files with 41 additions and 38 deletions
|
|
@ -13,7 +13,7 @@
|
|||
interface Props {
|
||||
assetId: string;
|
||||
loopVideo: boolean;
|
||||
checksum: string;
|
||||
cacheKey: string | null;
|
||||
onPreviousAsset?: () => void;
|
||||
onNextAsset?: () => void;
|
||||
onVideoEnded?: () => void;
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
let {
|
||||
assetId,
|
||||
loopVideo,
|
||||
checksum,
|
||||
cacheKey,
|
||||
onPreviousAsset = () => {},
|
||||
onNextAsset = () => {},
|
||||
onVideoEnded = () => {},
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
onMount(() => {
|
||||
if (videoPlayer) {
|
||||
assetFileUrl = getAssetPlaybackUrl({ id: assetId, checksum });
|
||||
assetFileUrl = getAssetPlaybackUrl({ id: assetId, cacheKey });
|
||||
forceMuted = false;
|
||||
videoPlayer.load();
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
onclose={() => onClose()}
|
||||
muted={forceMuted || $videoViewerMuted}
|
||||
bind:volume={$videoViewerVolume}
|
||||
poster={getAssetThumbnailUrl({ id: assetId, size: AssetMediaSize.Preview, checksum })}
|
||||
poster={getAssetThumbnailUrl({ id: assetId, size: AssetMediaSize.Preview, cacheKey })}
|
||||
src={assetFileUrl}
|
||||
>
|
||||
</video>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue