---
title: "init(displayID:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avcapturescreeninput/init(displayid:)"
---

# init(displayID:)

Initializes a capture screen input that provides media data from the specified display.

## Declaration

```swift
init?(displayID: CGDirectDisplayID)
```

## Parameters

- `displayID`: The ID of the display from which to capture video. CGDirectDisplayID is defined in <CoreGraphics/CGDirectDisplay.h>.

## Return Value

Return Value A capture screen input initialized to provide media data from a given display. If the display cannot be used (because it is not available on the system, for example), returns nil.

## See Also

### Initializing a capture screen input

- [init()](avfoundation/avcapturescreeninput/init().md)
