Instance Property

isLivePhotoAutoTrimmingEnabled

A Boolean value that specifies whether to automatically trim Live Photo movie captures to avoid excessive movement.

Declaration

var isLivePhotoAutoTrimmingEnabled: Bool { get set }

Discussion

Use this option to enable the same automatic trimming behavior found in the Camera app. By default, a Live Photo capture is about three seconds in duration (centered on the time of the capture request). However, if the user raises or lowers the camera during capture, iOS analyzes the movie capture in real time and automatically trims the duration of the Live Photo to avoid capturing excess movement.

When the isLivePhotoCaptureSupported is true, this property’s value also defaults to true.

Enabling or disabling this feature requires that a capture session set up its internal rendering pipeline differently. For best results, change this property’s value before calling the AVCaptureSession startRunning() method. Changing this property while the session is running requires a lengthy reconfiguration of the capture render pipeline: Live Photo captures in progress will end immediately, unfulfilled photo requests will abort, and video preview will temporarily freeze.

See Also

Configuring Live Photo Capture

var isLivePhotoCaptureSupported: Bool

A Boolean value indicating whether the capture output currently supports Live Photo capture.

var isLivePhotoCaptureEnabled: Bool

A Boolean value that specifies whether to configure the capture pipeline for Live Photo capture.

var isLivePhotoCaptureSuspended: Bool

A Boolean value that specifies whether to suspend, but not disable, Live Photo capture.

var availableLivePhotoVideoCodecTypes: [AVVideoCodecType]

The list of video codecs currently available for capturing Live Photos with the photo output.