Contents

photoOutput(_:didFinishProcessingLivePhotoToMovieFileAt:duration:photoDisplayTime:resolvedSettings:error:)

Provides the delegate the movie file URL resulting from a Live Photo capture.

Declaration

optional func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingLivePhotoToMovieFileAt outputFileURL: URL, duration: CMTime, photoDisplayTime: CMTime, resolvedSettings: AVCaptureResolvedPhotoSettings, error: (any Error)?)

Parameters

  • output:

    The photo output performing the capture.

  • outputFileURL:

    The file URL at which the movie content of the Live Photo was written.

  • duration:

    The duration of the Live Photo movie.

  • photoDisplayTime:

    The timestamp within the movie to which the still image part of the Live Photo corresponds.

  • resolvedSettings:

    An object describing the settings used for this capture. Match this object’s Uniqueid value to the Uniqueid property of the photo settings object you initiated capture with to determine which capture request this delegate call corresponds to. You can also use this object to find out which values the photo output has chosen for automatic settings.

  • error:

    If the capture process could not proceed successfully, an error object describing the failure; otherwise, nil.

Mentioned in

Discussion

Use this method to receive the results of a Live Photo capture. When the photo output calls this method, the movie component of the Live Photo has been written to the location specified by the outputFileURL parameter and the Live Photo is ready for consumption. (To receive the still image component of the Live Photo, implement the photoOutput(_:didFinishProcessingPhoto:previewPhoto:resolvedSettings:bracketSettings:error:) method.)

You don’t need to implement this method if you’re not requesting Live Photo capture.

The photo output calls this method only once for each Live Photo capture.

See Also

Receiving capture results