---
title: activePrimaryConstituent
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedevice/activeprimaryconstituent
---

# activePrimaryConstituent

A virtual device’s active primary constituent device.

## Declaration

```swift
var activePrimaryConstituent: AVCaptureDevice? { get }
```

## Discussion

Discussion The primary constituent device may change when zoom, exposure, or focus changes. The value is nil for nonvirtual devices. This property is key-value observable.

## See Also

### Restricting camera switching

- [setPrimaryConstituentDeviceSwitchingBehavior(_:restrictedSwitchingBehaviorConditions:)](avfoundation/avcapturedevice/setprimaryconstituentdeviceswitchingbehavior(_:restrictedswitchingbehaviorconditions:).md)
- [primaryConstituentDeviceSwitchingBehavior](avfoundation/avcapturedevice/primaryconstituentdeviceswitchingbehavior-swift.property.md)
- [primaryConstituentDeviceRestrictedSwitchingBehaviorConditions](avfoundation/avcapturedevice/primaryconstituentdevicerestrictedswitchingbehaviorconditions-swift.property.md)
- [activePrimaryConstituentDeviceSwitchingBehavior](avfoundation/avcapturedevice/activeprimaryconstituentdeviceswitchingbehavior.md)
- [activePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions](avfoundation/avcapturedevice/activeprimaryconstituentdevicerestrictedswitchingbehaviorconditions.md)
- [AVCaptureDevice.PrimaryConstituentDeviceSwitchingBehavior](avfoundation/avcapturedevice/primaryconstituentdeviceswitchingbehavior-swift.enum.md)
- [AVCaptureDevice.PrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions](avfoundation/avcapturedevice/primaryconstituentdevicerestrictedswitchingbehaviorconditions-swift.struct.md)
- [supportedFallbackPrimaryConstituentDevices](avfoundation/avcapturedevice/supportedfallbackprimaryconstituentdevices.md)
- [fallbackPrimaryConstituentDevices](avfoundation/avcapturedevice/fallbackprimaryconstituentdevices.md)
