LivePhotoDemo icon indicating copy to clipboard operation
LivePhotoDemo copied to clipboard

Live Photo not working on Apple Watch

Open wahkiz opened this issue 10 years ago • 4 comments

Hey Guys,

This is kind of weird, as the live photo was showing up on the phone, but somehow when transferred into the Apple Watch and made into a watch face it does not work, the screen will be completely black.

wahkiz avatar Dec 06 '15 16:12 wahkiz

Any updates?

genadyo avatar Mar 19 '16 18:03 genadyo

Hey @genadyo !

This is still a problem today. I've been trying to figure this out for a while now, what I realized is that in iOS 11 in the Photos app you can edit your Key Frame for the Live Photo and when you put the Live Photo to a frame other than the first frame it works (this is not valid for iOS 10). You usually get most of the LivePhoto playing if you set it between the middle of the duration to the end.

Moreover, with the way the provided code does things right now, whatever image you set right now at whatever time, in the Photos app, when editing the LivePhoto, the Key frame will always be the first Frame there, thus the black screen described above.

I'm guessing maybe while saving the JPEG image, or maybe relating the JPEG to the MOV file, you have to also mention the duration of where the JPEG image has been extracted from the MOV file in the metadata. I tried to do this with no success honestly, maybe I'm missing something. Files and metadata aren't my fields of expertise, but I tried to workaround it as much as I can. I tried to achieve this by doing the following:

        fileprivate func metadataForStillImageTime() -> AVMetadataItem {
		let item = AVMutableMetadataItem()
		item.key = kKeyStillImageTime as (NSCopying & NSObjectProtocol)?
		item.keySpace = .quickTimeMetadata
		item.value = 0 as (NSCopying & NSObjectProtocol)?
                // Set the duration for the AVMetaDataItem here
		item.duration = CMTimeMultiplyByRatio(asset.duration, 1, 2)
		item.dataType = "com.apple.metadata.datatype.int8"
		return item
	}

Also, recently I watched this video LivePhotoEditing and Raw Processing. While checking the APIs the PHLivePhotoEditingContext has a property called photoTime (This is a get only property), as mentioned above no matter what time the still image is being set with the provided code this value will be 0.

I would appreciate some help and hints, and gladly revamp the project and submit a PR to fix all these problems.

SerjPridestar avatar Jul 06 '18 09:07 SerjPridestar

Reopened, I don't have time now but maybe someone else does.

genadyo avatar Jul 06 '18 20:07 genadyo

@genadyo understood! Do you have any quick thoughts about the matter so I could do further investigation?

SerjPridestar avatar Jul 09 '18 07:07 SerjPridestar