[PB-6484] feature/Live photo support in Photos#490
Open
CandelR wants to merge 2 commits into
Open
Conversation
1638a83 to
1f5ea1e
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Add Live Photo support: upload both components (photo and video), pair them by naming convention, and reconstruct a real Live Photo on save to gallery.
Summary
PHAssetExportModule.swift+.m: two new native methods.exportLivePhotoComponentsextracts the photo and paired video as raw resource bytes viaPHAssetResourceManager.writeData.saveLivePhotoreconstructs a real Live Photo in the camera roll usingPHAssetCreationRequest.addResource.LivePhotoNativeModule.ts: typed TS wrapper for both native methods.PhotoUploadService: Live Photo assets upload both components. The photo component is uploaded first from the native temp export. The paired video follows. Both temps are cleaned up infinally. Return shape changed fromPromise<string>toPromise<{ photoUuid: string; pairedVideoUuid?: string }>. If the video upload fails, the photo is still marked synced and the video is retried in the next cycle.PhotoCloudBrowser:fetchMonthFromFoldernow runs two passes per day folder,buildPlainNameIndexindexes all plain names first, thenbuildCloudAssetEntriesresolves Live Photo pairing without ordering dependency. Orphan.livephoto.movfiles are treated as normal videos.cloud_assetschema: new columnsis_live_photo,live_photo_role,paired_remote_file_id. Paired video rows are stored but filtered out of the timeline .PhotoActionsService:saveToDevicebranches onisLivePhoto, downloads both components viaPhotoAssetFetchService.fetchLivePhotoComponentsand callssaveLivePhotoToLibrary. Falls back to photo-only save if the video download or native call fails.PhotoItem: LIVE badge in the top-left corner, mirroring theVideoBadgepattern.Android unaffected:
isLivePhotoAssetalways returns false, no native code runs.