#200 motion photo (Live Photo) support
Show a badge on the gallery thumbnail and a lightbox toggle that plays the photo's clip over the still, matching Immich's own viewer. The clip is a hidden Immich asset, but the existing share key already authorises it - checkSharedLinkAccess whitelists each shared asset's livePhotoVideoId - so no new upstream access is involved. The video route accepts a clip id only when a shared still points at it. Both enumeration paths already carry the field (AssetResponseDto for individual shares, TimeBucketAssetResponseDto for album buckets), so album shares cost no extra upstream requests. Gated by ipp.motionPhotos (default true). The clip is preload="none" and is only fetched when a visitor presses the toggle.
This commit is contained in:
@@ -61,6 +61,10 @@ export interface Asset {
|
||||
height?: number;
|
||||
// Base64-encoded thumbhash for tasteful blur placeholders during lazy-load
|
||||
thumbhash?: string;
|
||||
// Motion photo (Live Photo) clip. A separate, hidden Immich asset; the same
|
||||
// shared-link key authorises it (Immich's checkSharedLinkAccess whitelists
|
||||
// each shared asset's livePhotoVideoId alongside the asset itself).
|
||||
livePhotoVideoId?: string;
|
||||
// True for album assets enumerated via the timeline API, which give us only
|
||||
// grid fields (id, type, ratio, thumbhash, isTrashed, fileCreatedAt). Their
|
||||
// exif / originalFileName / description are fetched lazily when the asset is
|
||||
@@ -101,6 +105,8 @@ export interface TimelineBucketAssets {
|
||||
// UTC offset (hours, may be fractional) at the time each photo was taken.
|
||||
// Applying it to fileCreatedAt yields the photographer's local time.
|
||||
localOffsetHours: number[];
|
||||
// Motion photo (Live Photo) clip id; null for ordinary assets.
|
||||
livePhotoVideoId: (string | null)[];
|
||||
}
|
||||
|
||||
export interface SharedLink {
|
||||
|
||||
Reference in New Issue
Block a user