init(device:previewLayer:configuration:)
An external display configurator instance that attempts to synchronize the preview layer configuration with the device capture configuration.
Declaration
init(device: AVCaptureDevice, previewLayer: CALayer, configuration: AVCaptureExternalDisplayConfiguration)Parameters
- device:
The device for which to monitor the configuration.
- previewLayer:
The layer that is being used on an external display for displaying the camera preview.
- configuration:
A configuration specifying which aspects of the camera’s active format to monitor and configure on the external display.
Return Value
An AVCaptureExternalDisplayConfigurator instance.
Discussion
An AVCaptureExternalDisplayConfigurator is only applicable to external displays. It determines which properties to configure on the external display based on your provided configuration (see AVCaptureExternalDisplayConfiguration). The configurator observes changes to your camera’‘s configuration, and when changes are observed, it modifies the external display’s properties to match.
If multiple configurators are linked to the same external display ,the last one created becomes the active configurator for the external display (see isActive).