A Boolean value that specifies whether to automatically trim Live Photo movie captures to avoid excessive movement.
SDKs
- iOS 10.0+
- Mac Catalyst 13.0+
Framework
- AVFoundation
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 is
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 AVCapture
start
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.