---
title: activeInputSource
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedevice/activeinputsource
---

# activeInputSource

The currently active input source of the device.

## Declaration

```swift
var activeInputSource: AVCaptureDevice.InputSource? { get set }
```

## Discussion

Discussion You must call lockForConfiguration() before attempting to set a format. Setting a format that isn’t present in the inputSources array results in an exception. This property is key-value observable.

## See Also

### Configuring input sources

- [inputSources](avfoundation/avcapturedevice/inputsources.md)
- [AVCaptureDevice.InputSource](avfoundation/avcapturedevice/inputsource.md)
