---
title: activePrimaryConstituentDeviceSwitchingBehavior
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturedevice/activeprimaryconstituentdeviceswitchingbehavior
---

# activePrimaryConstituentDeviceSwitchingBehavior

The switching behavior of the active constituent device.

## Declaration

```swift
var activePrimaryConstituentDeviceSwitchingBehavior: AVCaptureDevice.PrimaryConstituentDeviceSwitchingBehavior { get }
```

## Discussion

Discussion For virtual devices with multiple constituent devices, this property provides the active switching behavior. It equals the value of the primaryConstituentDeviceSwitchingBehavior property except when you record with an AVCaptureMovieFileOutput that you configure to use different behavior. The value of this property is AVCaptureDevice.PrimaryConstituentDeviceSwitchingBehavior.unsupported for devices that don’t support constituent device switching. 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)
- [activePrimaryConstituentDeviceRestrictedSwitchingBehaviorConditions](avfoundation/avcapturedevice/activeprimaryconstituentdevicerestrictedswitchingbehaviorconditions.md)
- [activePrimaryConstituent](avfoundation/avcapturedevice/activeprimaryconstituent.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)
