---
title: "init(device:previewLayer:configuration:)"
framework: AVFoundation
role: symbol
role_heading: Initializer
platforms: [iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+, macOS 26.0+, tvOS 26.0+]
path: "avfoundation/avcaptureexternaldisplayconfigurator/init(device:previewlayer:configuration:)"
---

# init(device:previewLayer:configuration:)

An external display configurator instance that attempts to synchronize the preview layer configuration with the device capture configuration.

## Declaration

```swift
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

Return Value An AVCaptureExternalDisplayConfigurator instance.

## Discussion

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). important: An NSInvalidArgumentException is thrown if any of the AVCaptureExternalDisplayConfiguration options are not supported.
